Create a customer
Before creating a Checkout Session, you need to create a customer. You can create a customer using the Customers API.Create a customer
Customer object
Create a Checkout Session
To create a Checkout Session, you need to specify thecurrency, customer, description, and subscription_data.
Create a Checkout Session
url parameter.
Checkout Session object
Required parameters
Subscription data parameters
Thesubscription_data object defines the subscription that will be created when the Checkout Session completes. Only collection_method and interval are required.
Subscription item parameters
Each item insubscription_data.items requires price_data and type.
Supported payment method types
Usepayment_method_types to control which payment methods are offered to the customer.
Collect terms of service acceptance
Useconsent_collection to require the customer to accept terms of service before completing the Checkout Session, and custom_text.terms_of_service.message to override the default terms text.
Checkout Session with terms of service
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.By default, Yorlet automatically emails the URL to the customer. Set
send_email to false if you’d rather share the URL through your own application.