Skip to main content
This is a deprecated flow to build your checkout manually. Integrate our Billing Web SDK instead.
The checkout flow connects your payment form with FunnelFox Billing’s subscription engine. When customers purchase subscriptions, the system generates an Order ID that links the payment with the subscription being created.

Build your checkout flow

To implement checkout, you’ll need to build a checkout form that integrates two components:
  • Primer Universal Checkout
  • FunnelFox Billing API
Check our implementation example with complete integration.

1. Integrate Primer Universal Checkout

First, integrate Primer Universal Checkout to handle payment collection and processing. Follow the Primer documentation on configuring Universal Checkout.

2. Connect FunnelFox Billing API

Your checkout form needs to communicate with FunnelFox Billing at key points during the payment process. Follow FunnelFox Billing API documentation and add calls to the endpoints below:
1

Create client session

When a user selects a product, create a client session by calling //v1/checkout/create_client_session. Include:
  • metadata — any extra fields you want to pass to your Primer workflow (analytics, internal logic).
  • email — the user’s email address.
  • external_id — the user identifier from your system.
  • pp_ident — the price point identifier for the selected product.
The response returns an order_id. Use this in later requests.
2

Update client session

If the user changes products on the same page, update the session by calling //v1/checkout/update_client_session with the new pp_ident.You don’t need to start over — you’re updating the same checkout session.
3

Create payment

After the user enters payment details, create a payment via //v1/checkout/create_payment, passing:
  • order_id — the current order ID.
  • payment_method_token — the token from the Primer SDK.
If additional authentication is required (e.g., 3DS), the response includes an action_required_token. Hand this off to the Primer SDK and, once completed, resume the payment.
4

Resume payment

After the 3DS/auth step completes, call //v1/checkout/resume_payment to finish processing.
5

Special case: multiple payments in one session

Sometimes a customer retries payment in the same session (e.g., first card is declined, then they try a different card). In that case, the second attempt can return a new order_id. Make sure you use the updated order_id when resuming the payment after 3DS.
The Order ID connects a payment in Primer with the subscription being created. It’s generated during the create_client_session step and used as the payment identifier in the API. The Order ID can be updated within a single checkout form. This happens when the first payment attempt fails and the customer retries. Each retry is treated as a new payment, generating a new Order ID. You’ll need this updated Order ID for additional steps like 3D Secure dialogs.

Implementation example

Here’s a complete implementation that demonstrates the integration:
Checkout form

Next steps

Now that you’ve successfully integrated and set up your checkout, you’re ready to Manage subscriptions.