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.
A new session answers 201. If the invoice already has a session, that one is returned with 200 instead of a new one.
Note
An invoice priced at zero, or covered in full by the customer's wallet, is marked as paid instead and
answers 200 without a payment_url. Delivery may still be queued. A free trial sold through Stripe,
PayPal, or Razorpay is the exception: the customer still has to authorise the subscription with that
provider, so the response carries a payment_url and the invoice stays pending until they do. Check
for a URL before redirecting.
An unpaid invoice that sold a trial stops being payable after 72 hours, or on Stripe, PayPal, and Razorpay once the trial it sold is about to end. Checkout then returns a 422 on invoice.checkout, and the customer has to start a new checkout.
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.
AuthorizationBearer <API Key>Provide your SellApp API key as a bearer token.
invoice*integerThe invoice path parameter.
X-STORE?stringStore 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.
Successful response.
application/json- response
message*stringpayment_url?stringinvoice*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" } }, "refund_currency": "USD", "refunded_total_cents": 0 }, "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" } ] }}