Checkout API
Create checkout sessions programmatically for complete control
If you want to integrate more deeply the checkout process with your website or application, you can use our dedicated API.
The first step is to create a Checkout session. For this you’ll need at least your Product ID.
You can retrieve your Product ID from Products in your dashboard, click on “context-menu” button in front of your product and click on Copy Product ID.
The API will return you an object containing all the information about the session, including an URL where you should redirect your customer so they can complete their order.
Multiple products
You can create a checkout session with multiple products. This is useful if you want to allow your customers to choose between different products before they checkout.
External Customer ID
Quite often, you’ll have our own users management system in your application, where your customer already have an ID. To ease reconciliation between Polar and your system, you can inform us about your customer ID when creating a checkout session through the customer_external_id
field.
After a successful checkout, we’ll create a Customer on Polar with the external ID you provided. It’ll be provided through the customer.external_id
property in webhooks you may have configured.
SDK examples
Using our SDK, creating a checkout session is quite straightforward.
Was this page helpful?