---
title: "Create Razorpay Subscription"
method: POST
path: "/payments/razorpay/create-subscription"
tags: ["payments"]
---

# Create Razorpay Subscription

`POST /payments/razorpay/create-subscription`

## Request

- Base URL: `https://api.oxlo.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.oxlo.ai/payments/razorpay/create-subscription`
- Auth: HTTP bearer

Create a Razorpay subscription for the user and return the IDs the
frontend needs to open Razorpay Checkout JS.

Access is NOT granted here. The plan activates in /razorpay/verify
(after the user completes checkout) or via the webhook.

## Request body

- RazorpaySubscribeRequest
  - `plan` string, required

## Response `200`

Successful Response

- RazorpaySubscribeResponse
  - `subscription_id` string, required
  - `key_id` string, required
  - `plan` string, required
  - `amount_inr` integer, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/oxlo/apis/oxlo-backend.md) - [All operations](https://skmtc.dev/oxlo/apis/oxlo-backend/llms.txt) - [OpenAPI document](https://skmtc.dev/oxlo/apis/oxlo-backend/revisions/bc2ecdc94f31?raw)
