v1
latestOpenAPI 3.0.32026-07-26172157253.6 KBRazorpay Payments
Create Razorpay Subscription
Create a Razorpay Subscription and mirror it locally, then return Checkout options for authorization. The backend first evaluates the caller's INSERT policy on payments.razorpay_subscriptions so apps can restrict which subjects can start subscriptions.
post/api/payments/razorpay/{environment}/subscriptions
Path parameters
environment'test' | 'live' required
Payment provider environment.
Request body
Example request
{
"planId": "plan_123",
"subject": {
"type": "team",
"id": "team_123"
}
}Response
Razorpay subscription created
Example response
{
"subscription": {
"subscriptionId": "sub_123",
"planId": "plan_123",
"customerId": "cust_123",
"authorizationPaymentId": "pay_123"
},
"checkoutOptions": {
"key": "rzp_test_xxx",
"subscription_id": "sub_123"
}
}