cURL
curl --request POST \ --url https://api.atlas.co/functions/v1/checkout-sessions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "mode": "payment", "line_items": [ { "price": "<string>", "quantity": 1 } ], "success_url": "<string>", "cancel_url": "<string>", "customer": "<string>", "customer_email": "<string>", "allow_promotion_codes": true, "discounts": [ { "coupon": "<string>" } ], "subscription_data": { "trial_period_days": 123 }, "expires_at": 123, "metadata": {} } '
{ "id": "<string>", "object": "checkout.session", "mode": "<string>", "status": "<string>", "url": "<string>", "customer": "<string>", "customer_email": "<string>", "payment_status": "<string>", "amount_total": 123, "currency": "<string>", "line_items": { "object": "list", "data": [ { "price": "<string>", "quantity": 123, "amount_total": 123 } ] }, "subscription": "<string>", "success_url": "<string>", "cancel_url": "<string>", "expires_at": 123, "metadata": {}, "created": 123 }
Create a hosted checkout page for payments or subscriptions.
API key (sk_test_* or sk_live_*)
payment
subscription
Show child attributes
Checkout session created
checkout.session