Create a subscription with Checkout Sessions
Learn how to create a subscription with Checkout Sessions.
Checkout Sessions are a way to set up a subscription for your customers. You can create a Checkout Session for a specific amount and currency, and share the Checkout Session URL with your customers. Your customers can then subscribe using their preferred payment method.
Create a customer
Before creating a Checkout Session, you need to create a customer. You can create a customer using the Customers API
If the request completed successfully, the response contains the customer object.
Create a Checkout Session
To create a Checkout Sessioncurrency
, customer
, description
, and subscription_data
.
If the request completed successfully, the Checkout Session object contains the url
parameter.
Share the Checkout Session URL
After creating a Checkout Session, you will receive a Checkout Session URL. Share this link with your customers so they can subscribe using their preferred payment method.
Handle the Checkout Session completion
When your customers complete the checkout process, you will receive a webhook event. You can use the Webhooks API