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.
Ad-hoc prices
For advanced use cases where you need complete control over pricing, you can create ad-hoc prices directly when creating a checkout session. Ad-hoc prices are temporary prices that exist only for that specific checkout session and don’t appear in your product’s catalog. This is useful when you need to:- Apply dynamic pricing based on user-specific factors
- Create custom pricing tiers for specific customers
- Implement usage-based or calculated pricing that varies per checkout
- Test pricing variations without modifying your product catalog
prices parameter that maps product IDs to an array of price definitions. These prices will be created on-the-fly and associated with the checkout session.
Ad-hoc prices are marked with
source: "ad_hoc" in the API response, while catalog prices have source: "catalog". Ad-hoc prices are temporary and specific to the checkout session.Example
Price types
Ad-hoc prices support all the same price types as catalog prices:- Fixed: A fixed amount price
- Custom: Pay-what-you-want pricing
- Free: No charge
- Seat-based: Pricing based on number of seats
- Metered: Usage-based pricing tied to a meter
External Customer ID
Quite often, you’ll have your 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 theexternal_customer_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.


