Overview
Headless Universal Checkout is currently in beta for iOS, Android and React Native. The following payment methods are unsupported:
ADYEN_IDEAL
, ADYEN_DOTPAY
, ADYEN_BLIK
, XFERS_PAYNOW
, GOCARDLESS
, PRIMER_TEST_KLARNA
, PRIMER_TEST_PAYPAL
, PRIMER_TEST_SOFORT
Where there is a need for more customization and control over the checkout experience, a headless version of Primer’s Universal Checkout is available. You can use Headless Universal Checkout with your own UI, giving you more flexibility and allowing you to move faster when making design changes, while still having Universal Checkout capture sensitive PCI card data or other form data.
As with all versions of Universal Checkout, any payment method can be added and configured through Dashboard, meaning Primer handles the logic of when to display each method.
Primer Headless Universal Checkout works in a simple way:
- 1Get a
clientToken
from your server - 2Start Primer Headless Universal Checkout with the client token
- 3Primer Headless Universal Checkout will then return the
available payment methods
for the session initiated. Those payment methods that have been configured in the Dashboard and whose conditions match the current client session will be returned. - 4Show the list of available payment methods.
- 5When the user selects a payment method, show its UI to enable the user to enter their credentials. Depending on the payment method, you will have to either ask the SDK to render it, or build the UI yourself.
- 6Primer Headless Universal Checkout will then create a payment for you and manage its lifecycle. You will receive a confirmation of payment with the
checkout completed
callback.