Payments API
The payment-side endpoints that complement the orders flow.
Create a payment intent
POST /api/public/[tenantId]/payment-intent — the orders + payment one-shot endpoint. Atomically:
- Validates + prices the cart
- Resolves any coupon + gift-card code
- Creates the
Orderin DB (statuspending, paymentStatuspending) - Creates a Stripe PaymentIntent
- Returns
{ orderId, orderNumber, clientSecret }
Front-end then mounts Stripe Elements with the clientSecret and confirms the payment.
Available payment methods
Per-tenant configuration at GET /api/public/[tenantId]/payment-methods. Returns booleans for cards, Apple Pay, Google Pay, Klarna, PayPal, Swish, and regional methods. Front-end uses this to decide which buttons to render at checkout.
Refunds
Refunds are usually triggered automatically by the cancellation flow (see Orders API). For partial / manual refunds, super-admins use POST /api/admin/escrow/refunds:
curl -X POST \
-H "Content-Type: application/json" \
-b admin-cookies.txt \
-d '{ "orderId": "ord_abc123", "amount": 5.00, "reason": "missing-side" }' \
https://api.restora360.com/api/admin/escrow/refundsRefunds run through Stripe directly; Restora 360's ledger updates automatically when Stripe confirms.
Escrow status
Every paid order moves through escrow states:
held— funds in Stripe pending fulfillmentreleased— payout scheduled (delivered+ configured delay elapsed)refunded— fully refundedpartial_refund— partially refundedvoid— pre-acceptance cancel
Query via GET /api/tenant/[tenantId]/orders/[orderId]/escrow.