Skip to content

Create Razorpay order for weekly coverage

POST
/api/payments/create-checkout

Creates a Razorpay order and a pending weekly_policies row, then returns fields for Razorpay Standard Checkout (client opens the modal with keyId, orderId, amount in paise). Requires an authenticated Supabase session. planId is optional; when omitted a default premium may apply.

object
planId
string format: uuid
Example
basic-plan-uuid
weekStart
required
string format: date
Example
2026-03-09
weekEnd
required
string format: date
Example
2026-03-15

Options for Razorpay Standard Checkout.

object
keyId
string
Example
rzp_test_...
orderId
string
Example
order_...
amount

Amount in paise

integer
Example
9900
currency
string
Example
INR
policyId
string format: uuid
name
string
Example
Oasis Weekly Coverage
description
string
prefill
object
email
string
name
string

Razorpay not configured