Checkout Sessions
Create CheckoutSession
POST
/
api
/
v1
/
checkout-sessions
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>",
"outputMetadata": {},
"outputName": "<string>",
"type": "product",
"priceId": "<string>",
"quantity": 123
}
}'
{
"checkoutSession": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"livemode": true,
"status": "open",
"billingAddress": {
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "jsmith@example.com",
"address": {
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"phone": "<string>"
},
"priceId": "<string>",
"purchaseId": "<string>",
"invoiceId": "<string>",
"quantity": 123,
"organizationId": "<string>",
"customerName": "<string>",
"customerEmail": "<string>",
"customerId": "<string>",
"paymentMethodType": "card",
"discountId": "<string>",
"successUrl": "<string>",
"cancelUrl": "<string>",
"type": "purchase",
"outputMetadata": {},
"outputName": "<string>",
"targetSubscriptionId": "null"
},
"url": "<string>"
}
Authorizations
Body
application/json
Use this schema for new checkout sessions.
Response
200
application/json
Successful response
The response is of type object
.
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>",
"outputMetadata": {},
"outputName": "<string>",
"type": "product",
"priceId": "<string>",
"quantity": 123
}
}'
{
"checkoutSession": {
"id": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"livemode": true,
"status": "open",
"billingAddress": {
"name": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"email": "jsmith@example.com",
"address": {
"name": "<string>",
"line1": "<string>",
"line2": "<string>",
"city": "<string>",
"state": "<string>",
"postal_code": "<string>",
"country": "<string>"
},
"phone": "<string>"
},
"priceId": "<string>",
"purchaseId": "<string>",
"invoiceId": "<string>",
"quantity": 123,
"organizationId": "<string>",
"customerName": "<string>",
"customerEmail": "<string>",
"customerId": "<string>",
"paymentMethodType": "card",
"discountId": "<string>",
"successUrl": "<string>",
"cancelUrl": "<string>",
"type": "purchase",
"outputMetadata": {},
"outputName": "<string>",
"targetSubscriptionId": "null"
},
"url": "<string>"
}
Assistant
Responses are generated using AI and may contain mistakes.