Skip to content
Coursey CreativeSign in

GET /checkout/verify

/api/store/[slug]/checkout/verify

Called from the checkout success page to verify a Stripe checkout session and create the order if the webhook was missed (common for $0 checkouts), including order items and inventory decrements.

Public - no auth neededRate limit 30/min per client IP + slugHow authentication works

Path parameters

slugstringrequired

Business (store) slug; the Stripe session's metadata.business_id must match this business (403 otherwise)

Query parameters

session_idstringrequired

Stripe checkout session ID to verify (non-empty string).

Responses

200

The request succeeded.

400

A field failed validation. The response names the fields that failed, not just the first.

403

The credential is valid but is not allowed to do this.

404

No such store, or no such record inside it.

429

Too many requests. Back off and retry after the window in the response.

500

Something failed on our side. The response carries no detail; retry is safe on a GET.

What comes back

200 with { success: true, order_exists: true, order_id, status, total_amount } when the order already exists (message added if created by webhook race); { success: true, order_created: true, order_id, total_amount, message } when created here; 400 with { success: false, session_status, message } when the session is not complete. Errors: 400 { error } when the completed session has no customer email, 403/404 as { error }, 500 as { error, details } when order creation fails. CORS-enabled; OPTIONS preflight supported.