Save a payment method
1
Create a checkout configuration in setup mode
Create a checkout configuration without a plan to collect payment details without charging. Add metadata to be able to link the member and payment method to a customer in your system.
2
Direct the user to checkout
Use embedded checkout or redirect the user to save their payment method.
- Embedded
- Redirect
3
Handle completion
Listen for the The payment method is now saved and authorized for this member.
setup_intent.succeeded webhook to get the payment method ID. The CheckoutConfiguration and its metadata will be included on the SetupIntent, which you can use to link the member and payment method to a customer in your system.Charge a saved payment method
1
Get the payment method
List saved payment methods for a member or use the payment method ID from the setup intent in the previous step.
2
Create an off-session payment
Charge the payment method without customer interaction. The create payment endpoint will respond with a payment object immediately, but
the payment will be processed asynchronously in the background.
3
Handle payment events
Listen for payment webhooks to track success or failure.
Save while charging
To save a payment method during checkout, addsetupFutureUsage: "off_session" to the embedded checkout.

