Stripe Payment Link
POST /orders/:publicId/payment
Session: the guest session that placed the order, or the login session of the order’s customer (any mode). Rate limit: order.read.
Response 200
- The amount always comes from the order: what is due right now.
- Strapi keeps one live link per order. Asking again returns the same link (
reused: true) while it has more than an hour left. - A link lives just under 24 hours.
- Stripe Checkout shows the payment methods enabled in the store’s Stripe account (cards, Multibanco and others).
Return URLs
After the payment, Stripe sends the browser to{storefrontUrl}{successPath}?order={publicId}. When the customer gives up, it sends them to {storefrontUrl}{cancelPath}?order={publicId}. The store owner sets both paths in the Stripe settings of the module. The defaults are /checkout/success and /checkout/cancel, which match the structure above.
The Webhook
Strapi handles the Stripe webhook by itself atPOST /api/littlebox-strapi-suite/ecommerce/stripe/webhook. Stripe signs each call with the Stripe-Signature header. Your frontend has nothing to do for it, except that Strapi must be reachable from Stripe at that URL. The store owner subscribes these events in the Stripe dashboard: checkout.session.completed, checkout.session.async_payment_succeeded, checkout.session.async_payment_failed, checkout.session.expired, charge.refunded, refund.updated and refund.failed.
Order Status
GET /orders/:publicId/status
Session: same as the payment link. Rate limit: order.read.
Response 200
paymentResult is the field to show on the confirmation page:
orderStatus is OPEN, ARCHIVED or CANCELLED. paymentStatus is PENDING, PARTIALLY_PAID, PAID, PARTIALLY_REFUNDED, REFUNDED or REFUND_DUE. The answer never carries addresses, emails or internal ids.
src/app/(store)/checkout/success/page.tsx
src/app/(store)/checkout/success/auto-refresh.tsx
payOrder action, which returns the live link again.
Manual Payments
The storefront API only creates Stripe links. There is no manual payment method to choose at checkout. The store owner records other payments (bank transfer, MB WAY, cash) in the admin, or sends the customer payment instructions by email from the order. Your pages only need to readpaymentResult, totals.paid and totals.due from the order status.
Order Access
- A guest reads only the orders placed with its own checkout session. Keep the guest cookie until the customer reaches the confirmation page.
- A logged in customer reads all their orders, including guest orders placed with the same email before they registered.
- Order emails contain no “view your order” link to the storefront. Guests follow their order by email.