Skip to main content
POST
/
api
/
payments
/
razorpay
/
{environment}
/
orders
Create Razorpay Order
curl --request POST \
  --url https://api.example.com/api/payments/razorpay/{environment}/orders \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "amount": 50000,
  "currency": "INR",
  "receipt": "order-team_123-pro",
  "description": "Pro upgrade",
  "subject": {
    "type": "team",
    "id": "team_123"
  },
  "customerEmail": "buyer@example.com"
}
'
{
  "order": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "subjectType": "<string>",
    "subjectId": "<string>",
    "customerName": "<string>",
    "customerEmail": "jsmith@example.com",
    "customerContact": "<string>",
    "orderId": "order_123",
    "receipt": "<string>",
    "amount": 50000,
    "amountPaid": 123,
    "amountDue": 123,
    "currency": "inr",
    "attempts": 123,
    "verifiedPaymentId": "pay_123",
    "verifiedAt": "2023-11-07T05:31:56Z",
    "notes": {},
    "lastError": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  },
  "checkoutOptions": {
    "key": "rzp_test_xxx",
    "amount": 2,
    "currency": "INR",
    "order_id": "order_123",
    "prefill": {
      "name": "<string>",
      "email": "jsmith@example.com",
      "contact": "<string>"
    },
    "name": "<string>",
    "description": "<string>",
    "callback_url": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

environment
enum<string>
required

Payment provider environment.

Available options:
test,
live

Body

application/json

Notes keys starting with insforge_ are reserved and rejected.

amount
integer
required
Required range: x >= 1
Example:

50000

currency
string
required
Required string length: 3
Example:

"INR"

receipt
string | null
Required string length: 1 - 40
description
string | null
Maximum string length: 2048
subject
object
customerName
string | null
Required string length: 1 - 255
customerEmail
string<email> | null
customerContact
string | null
Required string length: 1 - 32
callbackUrl
string<uri> | null
notes
object

Native Razorpay notes. Use stable app identifiers such as order_id for webhook fulfillment triggers.

Response

Razorpay Order created

order
object
required
checkoutOptions
object
required