The default payment flow
When a customer reaches your checkout, here’s what happens:- Your server creates a client session and returns a
clientToken - The SDK initializes and loads available payment methods
- Customer selects a method and enters their details
- Customer submits and the SDK processes the payment
- Your app receives the result via events
Create a Client Session (Server-Side)
Create a client session on your server using the Client Session API. This returns aclientToken that you pass to your client.
Initialize and Show Checkout
- Web
- Android
- iOS
What Primer handles for you
Out of the box, Primer Checkout manages:
You don’t need to write code for any of these behaviors.
Listening for results
To react to payment outcomes, listen for payment events:- Web
- Android
- iOS
Testing in sandbox
Use these test cards to verify your integration:
Use any future expiry date and any 3-digit CVV.
Try the Web SDK example in your browser:
See also
Styling
Match the checkout to your brand
Layout
Control the structure of checkout components
Core Concepts
Understand the architecture
Track in Analytics
Send events to your analytics platform