curl --request POST \
--url https://app.flowglad.com/api/v1/checkout-sessions \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"checkoutSession": {
"customerExternalId": "<string>",
"successUrl": "<string>",
"cancelUrl": "<string>",
"type": "<string>",
"outputMetadata": {},
"outputName": "<string>",
"priceId": "<string>",
"priceSlug": "<string>",
"quantity": 123,
"anonymous": true,
"preserveBillingCycleAnchor": true
}
}
'{
"checkoutSession": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"status": "open",
"priceId": "<string>",
"purchaseId": "<string>",
"invoiceId": "<string>",
"quantity": -1,
"organizationId": "<string>",
"customerName": "<string>",
"customerEmail": "<string>",
"customerId": "<string>",
"discountId": "<string>",
"type": "<string>",
"outputName": "<string>",
"expires": 0,
"billingAddress": {
"address": {
"country": "<string>",
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>"
},
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "[email protected]",
"phone": "<string>"
},
"paymentMethodType": "card",
"successUrl": "<string>",
"cancelUrl": "<string>",
"preserveBillingCycleAnchor": true,
"outputMetadata": {},
"targetSubscriptionId": "<unknown>",
"automaticallyUpdateSubscriptions": "<unknown>"
},
"url": "<string>"
}curl --request POST \
--url https://app.flowglad.com/api/v1/checkout-sessions \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"checkoutSession": {
"customerExternalId": "<string>",
"successUrl": "<string>",
"cancelUrl": "<string>",
"type": "<string>",
"outputMetadata": {},
"outputName": "<string>",
"priceId": "<string>",
"priceSlug": "<string>",
"quantity": 123,
"anonymous": true,
"preserveBillingCycleAnchor": true
}
}
'{
"checkoutSession": {
"id": "<string>",
"createdAt": 0,
"updatedAt": 0,
"livemode": true,
"status": "open",
"priceId": "<string>",
"purchaseId": "<string>",
"invoiceId": "<string>",
"quantity": -1,
"organizationId": "<string>",
"customerName": "<string>",
"customerEmail": "<string>",
"customerId": "<string>",
"discountId": "<string>",
"type": "<string>",
"outputName": "<string>",
"expires": 0,
"billingAddress": {
"address": {
"country": "<string>",
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>"
},
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "[email protected]",
"phone": "<string>"
},
"paymentMethodType": "card",
"successUrl": "<string>",
"cancelUrl": "<string>",
"preserveBillingCycleAnchor": true,
"outputMetadata": {},
"targetSubscriptionId": "<unknown>",
"automaticallyUpdateSubscriptions": "<unknown>"
},
"url": "<string>"
}Use this schema for new checkout sessions.
Show child attributes
Successful response
A time-limited checkout session, which captures the payment details needed to create a subscription, or purchase, or pay a standalone invoice.
Show child attributes
The URL to redirect to complete the purchase
Was this page helpful?