Skip to main content
You’ve installed the SDK. You’re ready to accept payments.

The default payment flow

When a customer reaches your checkout, here’s what happens:
  1. Your server creates a client session and returns a clientToken
  2. The SDK initializes and loads available payment methods
  3. Customer selects a method and enters their details
  4. Customer submits and the SDK processes the payment
  5. 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 a clientToken that you pass to your client.

Initialize and Show Checkout

Listen for payment results:

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:

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: Try it in Stackblitz

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