Prerequisites
Before creating a recurring payment, complete the following in Saved Payment Methods:- Create a customer and store the
customer_id. - Generate a payment token with the Element SDK.
- Confirm and store the
token_idfrom the Token Creation Notification.
Understanding the billing flow
The saved payment method and the subscription are separate records:- The saved payment method contains the reusable
customer_idandtoken_id. - The subscription defines the billing product, frequency, and lifecycle.
Integration steps
Step 1: Create a product
Define the recurring product and billing cycle. POST/product/v1/create
product_id.
Step 2: Create the subscription
Create the subscription with the saved customer, token, and recurring product. POST/subscription/v1/create
subscription_id and its current state.
Step 3: Handle subscription notifications
Implement the Subscription Webhook to receive subscription state changes and recurring billing results.Token Creation Notifications are documented separately in Saved Payment Methods.
Testing
Test the complete flow in sandbox: create the saved payment method, confirm the token notification, create a product, create the subscription, and verify webhook handling.Best practices
- Validate and process webhooks idempotently.
- Store
customer_id,token_id,product_id, andsubscription_idin your backend. - Handle failed billing and customer notifications according to your retry policy.
- Test cancellation, token replacement, and failed-payment paths before production.

