Skip to main content
POST
/
checkout-sessions
cURL
curl -X POST https://api.neuraldraft.io/v1/checkout-sessions \
  -H "Authorization: Bearer ndsk_live_yourkey" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"items":[{"product_id":32,"quantity":1}],"customer":{"name":"Anna","email":"anna@example.com"},"success_url":"https://lakesideyoga.uk/success","cancel_url":"https://lakesideyoga.uk/cart"}'
{
  "order_id": 902,
  "stripe_session_id": "cs_live_a1b2c3d4",
  "checkout_url": "https://checkout.stripe.com/c/pay/cs_live_a1b2c3d4",
  "expires_at": "2026-04-19T11:14:02Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.neuraldraft.io/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Project API key. Pass as Authorization: Bearer ndsk_live_.... Manage keys via /projects/me/api-keys. Test-mode keys use the ndsk_test_ prefix.

Headers

Idempotency-Key
string

Unique key (any string up to 255 chars; UUID recommended). Retries with the same key within 24 hours return the original response without re-executing side effects.

Maximum string length: 255

Body

application/json
items
object[]
required
Minimum array length: 1
customer
object
required
success_url
string<uri>
required

Stripe redirects here after successful payment. May contain {CHECKOUT_SESSION_ID} placeholder which Stripe replaces.

cancel_url
string<uri>
required
metadata
object

Response

Session created.

order_id
integer
required
Example:

902

stripe_session_id
string
required
Example:

"cs_live_a1b2c3d4"

checkout_url
string<uri>
required
Example:

"https://checkout.stripe.com/c/pay/cs_live_a1b2c3d4"

expires_at
string<date-time>
required