Create a checkout session
Get the customer payment URL for a pending invoice.
Create or reuse a payment session for a pending invoice.
The checkout flow is:
- Create an invoice.
- Call this endpoint with the returned invoice ID.
- Send the customer to the top-level
payment_urlin the response, using a link or redirect.
Note
A zero-priced checkout can return a paid invoice with no payment_url.
Delivery may still be queued. Check for a URL before redirecting.
Use the returned URL rather than building one yourself. A browser return is not proof of payment; check signed events or retrieve the current purchase state. For the full example, see Create a checkout.
Provide your SellApp API key as a bearer token.
In: header
Path Parameters
The invoice path parameter.
Header Parameters
Store slug. Required for OAuth access tokens. API keys may omit it to use their current store, or the first accessible store when no current store is selected.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://sell.app/api/v2/invoices/9001/checkout" \ -H "X-STORE: launch-lab"{
"message": "Existing payment session has been found.",
"payment_url": "https://checkout.stripe.com/c/pay/cs_example",
"invoice": {
"id": 9001,
"payment": {
"fee": {
"base": "0",
"currency": "USD",
"units": 1,
"vat": 0,
"total": {
"exclusive": "0",
"inclusive": "0"
}
},
"gateway": {
"data": {
"customer_email": "maya.chen@example.com"
},
"type": "STRIPE"
},
"subtotal": {
"base": "1999",
"currency": "USD",
"units": 1,
"vat": 0,
"total": {
"exclusive": "1999",
"inclusive": "1999"
}
},
"expires_at": "2026-09-02T12:00:01.000000Z",
"full_price": {
"base": "1999",
"currency": "USD",
"units": 1,
"vat": 0,
"total": {
"exclusive": "1999",
"inclusive": "1999"
}
},
"original_amount": {
"base": "1999",
"currency": "USD",
"units": 1,
"vat": 0,
"total": {
"exclusive": "1999",
"inclusive": "1999"
}
}
},
"status": {
"history": [],
"status": {
"status": "PENDING",
"setAt": "2026-08-30T12:00:01.000000Z",
"updatedAt": "2026-08-30T12:00:01.000000Z"
}
},
"webhooks": [],
"feedback": null,
"created_at": "2026-08-30T12:00:01.000000Z",
"updated_at": "2026-08-30T12:00:01.000000Z",
"store_id": 1,
"coupon_id": null,
"subscription_id": null,
"customer_information": {
"id": 125,
"email": "maya.chen@example.com",
"country": "Germany",
"location": "Munich",
"ip": "1.3.3.7",
"proxied": false,
"browser_agent": "Mozilla/4.9 (Windows 98; sl-SI; rv:1.9.1.20) Gecko/20110422 Firefox/21.0",
"vat": null,
"discord_data": null,
"billing_details": null
},
"product_variants": [
{
"id": 4321,
"product_id": 120,
"title": "Founder memo circle"
}
]
}
}{
"message": "Existing payment session has been found.",
"payment_url": "https://checkout.stripe.com/c/pay/cs_example",
"invoice": {
"id": 9001,
"payment": {
"fee": {
"base": "0",
"currency": "USD",
"units": 1,
"vat": 0,
"total": {
"exclusive": "0",
"inclusive": "0"
}
},
"gateway": {
"data": {
"customer_email": "maya.chen@example.com"
},
"type": "STRIPE"
},
"subtotal": {
"base": "1999",
"currency": "USD",
"units": 1,
"vat": 0,
"total": {
"exclusive": "1999",
"inclusive": "1999"
}
},
"expires_at": "2026-09-02T12:00:01.000000Z",
"full_price": {
"base": "1999",
"currency": "USD",
"units": 1,
"vat": 0,
"total": {
"exclusive": "1999",
"inclusive": "1999"
}
},
"original_amount": {
"base": "1999",
"currency": "USD",
"units": 1,
"vat": 0,
"total": {
"exclusive": "1999",
"inclusive": "1999"
}
}
},
"status": {
"history": [],
"status": {
"status": "PENDING",
"setAt": "2026-08-30T12:00:01.000000Z",
"updatedAt": "2026-08-30T12:00:01.000000Z"
}
},
"webhooks": [],
"feedback": null,
"created_at": "2026-08-30T12:00:01.000000Z",
"updated_at": "2026-08-30T12:00:01.000000Z",
"store_id": 1,
"coupon_id": null,
"subscription_id": null,
"customer_information": {
"id": 125,
"email": "maya.chen@example.com",
"country": "Germany",
"location": "Munich",
"ip": "1.3.3.7",
"proxied": false,
"browser_agent": "Mozilla/4.9 (Windows 98; sl-SI; rv:1.9.1.20) Gecko/20110422 Firefox/21.0",
"vat": null,
"discord_data": null,
"billing_details": null
},
"product_variants": [
{
"id": 4321,
"product_id": 120,
"title": "Founder memo circle"
}
]
}
}{
"type": "invalid_request_error",
"code": "bad_request",
"message": "The request could not be understood.",
"status": 400,
"param": null,
"request_id": "01992a65-e064-71ba-b38f-902b7966a6be",
"docs_url": "https://sell.app/docs/api/errors#bad-request"
}{
"type": "authentication_error",
"code": "unauthenticated",
"message": "Unauthenticated.",
"status": 401,
"param": null,
"request_id": "01992a65-e064-71ba-b38f-902b7966a6be",
"docs_url": "https://sell.app/docs/api/errors#unauthenticated"
}{
"type": "authorization_error",
"code": "forbidden",
"message": "This action is unauthorized.",
"status": 403,
"param": null,
"request_id": "01992a65-e064-71ba-b38f-902b7966a6be",
"docs_url": "https://sell.app/docs/api/errors#forbidden"
}{
"type": "not_found_error",
"code": "resource_not_found",
"message": "Not Found.",
"status": 404,
"param": null,
"request_id": "01992a65-e064-71ba-b38f-902b7966a6be",
"docs_url": "https://sell.app/docs/api/errors#resource-not-found"
}{
"type": "validation_error",
"code": "validation_failed",
"message": "The selected product variant id is invalid.",
"status": 422,
"param": "product_variant_id",
"request_id": "01992a65-e064-71ba-b38f-902b7966a6be",
"docs_url": "https://sell.app/docs/api/errors#validation-failed",
"errors": {
"product_variant_id": [
"The selected product variant id is invalid."
]
}
}{
"type": "rate_limit_error",
"code": "rate_limit_exceeded",
"message": "Too Many Attempts.",
"status": 429,
"param": null,
"request_id": "01992a65-e064-71ba-b38f-902b7966a6be",
"docs_url": "https://sell.app/docs/api/errors#rate-limit-exceeded"
}{
"type": "api_error",
"code": "api_error",
"message": "Server Error",
"status": 500,
"param": null,
"request_id": "01992a65-e064-71ba-b38f-902b7966a6be",
"docs_url": "https://sell.app/docs/api/errors#api-error"
}