Razorpay Sandbox Virtual Sandbox
Razorpay test mode without KYC, or setup. Hit these API and expect a near real response
Razorpay offers a suite of payment solutions that let businesses in India accept, process, and disburse payments online. Its APIs support a variety of operations, including creating and managing customers, processing payments, handling refunds, generating invoices, and managing subscriptions. The APIs are RESTful and use JSON for responses, making integration straightforward for developers.
Use cases:
Accept online payments from customers through multiple methods, including UPI, cards, net banking, and wallets. Create and manage customer profiles, store their payment details, and handle recurring billing with subscriptions. Generate, send, and track invoices with payment links for easy settlements. Handle refunds and partial refunds programmatically for seamless customer experiences. Monitor payment downtimes, check settlement details, and reconcile transactions with detailed API responses.
Customers APIs(4 operations)
{
"name": "Gaurav Kumar",
"email": "gaurav.kumar@example.com",
"contact": "9123456780",
"fail_existing": "1",
"gstin": "12ABCDE2356F7GH",
"notes": {
"notes_key_1": "Tea, Earl Grey, Hot",
"notes_key_2": "Tea, Earl Grey… decaf."
}
}{
"name": "Saurav Kumar",
"email": "saurav.kumar@example.com",
"contact": "9876543210"
}Orders APIs(5 operations)
{
"amount": 1000000,
"currency": "INR",
"receipt": "Receipt no. 1",
"notes": {
"notes_key_1": "Tea, Earl Grey, Hot",
"notes_key_2": "Tea, Earl Grey… decaf."
}
}| Header Name | Example |
|---|---|
Content-Type* | "application/json" |
{
"notes": {
"notes_key_1": "Beam me up Scotty",
"notes_key_2": "Engage"
}
}Payment Downtime API(2 operations)
Payments APIs(5 operations)
{
"note": {
"notes_key_1": "Beam me up Scotty",
"notes_key_2": "Engage"
}
}{
"amount": 1000,
"currency": "INR"
}Refunds APIs(6 operations)
{
"amount": 10000
}{
"notes": {
"notes_key_1": "Beam me up Scotty.",
"notes_key_2": "Engage"
}
}Instant Settlements(3 operations)
{
"amount": 50000,
"max_balance": 0,
"description": "Need this to make vendor payouts",
"notes": {
"notes_key_1": "Tea, Earl Grey, Hot",
"notes_key_2": "Tea, Earl Grey… decaf."
}
}Settlements APIs(3 operations)
| Query Parameter Name | Example |
|---|---|
year* | 2019 |
month* | 09 |
Disputes APIs
Invoices APIs(8 operations)
{
"type": "invoice",
"description": "Domestic invoice for Gaurav Kumar.",
"partial_payment": true,
"customer": {
"name": "Gaurav Kumar",
"contact": "9876543210",
"email": "gaurav.kumar@example.com",
"billing_address": {
"line1": "Ground FLoor, Millennium Tower, 1st Avenue",
"line2": "1st Avenue",
"zipcode": "560001",
"city": "Bangalore",
"state": "Karnataka",
"country": "India"
},
"shipping_address": {
"line1": "3rd FLoor, Nakamura Tower, Bomaye Boulevard",
"line2": "Baker Street",
"zipcode": "560001",
"city": "Bangalore",
"state": "Karnataka",
"country": "in"
}
},
"line_items": [
{
"name": "Crate of sea weed",
"description": "Crate of sea weed.",
"amount": 20000,
"currency": "INR",
"quantity": 1
},
{
"item_id": "{item_id}"
}
],
"sms_notify": 1,
"email_notify": 1,
"draft": "1",
"date": 1588076279,
"expire_by": 1924991999,
"receipt": "Receipt No. 1",
"comment": "Fresh sea weed mowed this morning",
"terms": "No Returns; No Refunds",
"notes": {
"notes_key_1": "Tea, Earl Grey, Hot",
"notes_key_2": "Tea, Earl Grey… decaf."
}
}| Query Parameter Name | Example |
|---|---|
type* | invoice |
{
"partial_payment": true,
"customer": {
"name": "Saurav Kumar",
"contact": "9123456789",
"email": "saurav.kumar@example.com"
},
"line_items": [
{
"name": "Crate of Red Herbs",
"description": "Red Herbs from Resident Evil",
"amount": 50000,
"currency": "INR",
"quantity": 5
},
{
"item_id": "{item_id}"
}
],
"sms_notify": 1,
"email_notify": 1,
"draft": "1",
"date": 1588076279,
"expire_by": 1924991999,
"receipt": "Receipt No. 1",
"comment": "Fresh herbs mowed this morning",
"terms": "No Returns; No Refunds",
"notes": {
"notes_key_1": "Beam me up Scotty.",
"notes_key_2": "Engage"
}
}Step 1 - Plans(3 operations)
{
"period": "weekly",
"interval": 1,
"item": {
"name": "Test plan - Weekly",
"amount": 69900,
"currency": "INR",
"description": "Description for the test plan - Weekly"
},
"notes": {
"notes_key_1": "Tea, Earl Grey, Hot",
"notes_key_2": "Tea, Earl Grey… decaf."
}
}Step 2 - Subscriptions(10 operations)
{
"plan_id": "{plan_id}",
"total_count": 6,
"quantity": 1,
"start_at": 1735689600,
"expire_by": 1893456000,
"customer_notify": 1,
"addons": [
{
"item": {
"name": "Delivery charges",
"amount": 30000,
"currency": "INR"
}
}
],
"offer_id": "{offer_id}",
"notes": {
"notes_key_1": "Tea, Earl Grey, Hot",
"notes_key_2": "Tea, Earl Grey… decaf."
}
}{
"plan_id": "{plan_id}",
"quantity": 3,
"remaining_count": 6,
"schedule_change_at": "now",
"customer_notify": 1,
"offer_id": "{offer_id}"
}{
"cancel_at_cycle_end": 0
}| Header Name | Example |
|---|---|
Content-Type* | "application/json" |
{
"pause_at": "now"
}{
"resume_at": "now"
}Add-ons(4 operations)
{
"item": {
"name": "Extra appala (papadum)",
"amount": 30000,
"currency": "INR",
"description": "1 extra oil fried appala with meals"
},
"quantity": 2
}Standard Payment Links(6 operations)
{
"amount": 1000,
"currency": "INR",
"accept_partial": true,
"first_min_partial_amount": 100,
"expire_by": 1691097057,
"reference_id": "TSsd1989",
"description": "Payment for policy no #23456",
"customer": {
"name": "Gaurav Kumar",
"contact": "+919999999999",
"email": "gaurav.kumar@example.com"
},
"notify": {
"sms": true,
"email": true
},
"reminder_enable": true,
"notes": {
"policy_name": "Jeevan Bima"
},
"callback_url": "https://example-callback-url.com/",
"callback_method": "get"
}| Header Name | Example |
|---|---|
Content-Type* | "application/json" |
{
"notes": {
"policy_name": "Jivan Asha"
}
}| Header Name | Example |
|---|---|
Content-Type* | "application/json" |
| Header Name | Example |
|---|---|
Content-Type* | "application/json" |
| Header Name | Example |
|---|---|
Content-Type* | "application/json" |
Fetch Operations(4 operations)
Smart Collect -TPV(5 operations)
{
"receivers": {
"types": [
"bank_account"
]
},
"allowed_payers": [
{
"type": "bank_account",
"bank_account": {
"ifsc": "UTIB0000013",
"account_number": "914010012345679"
}
},
{
"type": "bank_account",
"bank_account": {
"ifsc": "UTIB0000014",
"account_number": "914010012345680"
}
}
],
"description": "Virtual Account created for Raftar Soft",
"customer_id": "cust_CaVDm8eDRSXYME",
"close_by": 1981615838,
"notes": {
"project_name": "Banking Software"
}
}{
"receivers": {
"types": [
"vpa"
]
}
}{
"type": "bank_account",
"bank_account": {
"ifsc": "UTIB0000013",
"account_number": "914010012345679"
}
}Fetch Payment Details using ID and Transfer Method
Smart Collect
{
"types": [
"vpa"
],
"vpa": {
"descriptor": "gaurikumar"
}
}Transfers API(2 operations)
{
"transfers": [
{
"account": "acc_id",
"amount": 100,
"currency": "INR",
"notes": {
"name": "Gaurav Kumar",
"roll_no": "IEC2011025"
},
"linked_account_notes": [
"roll_no"
],
"on_hold": true,
"on_hold_until": 1671222870
},
{
"account": "acc_id",
"amount": 100,
"currency": "INR",
"notes": {
"name": "Saurav Kumar",
"roll_no": "IEC2011026"
},
"linked_account_notes": [
"roll_no"
],
"on_hold": false
}
]
}{
"account": "acc_id",
"amount": 100,
"currency": "INR"
}Fetch Details(3 operations)
| Query Parameter Name | Example |
|---|---|
recipient_settlement_id* | {setl_id} |
Linked Account Settlements
{
"on_hold": 1,
"on_hold_until": 1979691505
}Refunds and Reversals
{
"amount": 100
}Items APIs(5 operations)
{
"name": "Yellow Herb",
"description": "Yellow herb from Resident Evil",
"amount": 50000,
"currency": "INR"
}| Header Name | Example |
|---|---|
Content-Type* | "application/json" |
| Header Name | Example |
|---|---|
Content-Type* | "application/json" |
{
"name": "Green Herb",
"description": "Green herb from Resident Evil",
"amount": 70000,
"currency": "INR"
}| Header Name | Example |
|---|---|
Content-Type* | "application/json" |
Step 1 - Contacts(4 operations)
{
"name": "Gaurav Kumar",
"email": "gauravkumar@example.com",
"contact": 9123456789,
"type": "employee",
"reference_id": "Acme Contact ID 12345",
"notes": {
"random_key_1": "Make it so.",
"random_key_2": "Tea. Earl Grey. Hot."
}
}| Header Name | Example |
|---|---|
Content-Type* | "application/json" |
{
"name": "Gaurav Kumar Updated",
"email": "gaurav.kumar@example.com",
"contact": 9876543210,
"type": "self",
"reference_id": "Acme Contact ID 12345 Updated",
"notes": {
"random_key_1": "Tea. Earl Grey. Hot.",
"random_key_2": "Tea. Earl Grey. Decaf..."
}
}Step 2 - Fund Accounts(3 operations)
{
"contact_id": "{cont_id}",
"account_type": "bank_account",
"bank_account": {
"name": "Gaurav Kumar",
"ifsc": "HDFC0009107",
"account_number": "50100102283912"
}
}Step 3 - Payouts(4 operations)
| Header Name | Example |
|---|---|
Authorization* | "{{apiPrivateAuth}}" |
{
"account_number": "7878780080316316",
"fund_account_id": "fa_00000000000001",
"amount": 1000000,
"currency": "INR",
"mode": "IMPS",
"purpose": "refund",
"queue_if_low_balance": true,
"reference_id": "Acme Transaction ID 12345",
"narration": "Acme Corp Fund Transfer",
"notes": {
"notes_key_1": "Tea, Earl Grey, Hot",
"notes_key_2": "Tea, Earl Grey… decaf."
}
}| Query Parameter Name | Example |
|---|---|
account_number* | {account_number} |
| Header Name | Example |
|---|---|
Content-Type* | "application/json" |
Payout Links(4 operations)
{
"account_number": "account_number",
"contact": {
"name": "Gaurav Kumar",
"type": "customer",
"contact": "912345678",
"email": "gaurav.kumar@example.com"
},
"amount": 1000,
"currency": "INR",
"purpose": "refund",
"description": "Payout link for Gaurav Kumar",
"receipt": "Receipt No. 1",
"notes": {
"random_key_1": "Make it so.",
"random_key_2": "Tea. Earl Grey. Hot."
}
}Transaction Statements(2 operations)
| Query Parameter Name | Example |
|---|---|
account_number* | {account_number} |
Account Validation(3 operations)
{
"account_number": "{account_number}",
"fund_account": {
"id": "{fund_account_id}"
},
"amount": 100,
"currency": "INR",
"notes": {
"random_key_1": "Make it so.",
"random_key_2": "Tea. Earl Grey. Hot."
}
}Account APIs(4 operations)
{
"email": "gauriagain.kumar@example.org",
"phone": "9999999999",
"legal_business_name": "Acme Corp",
"business_type": "partnership",
"customer_facing_business_name": "Example",
"profile": {
"category": "healthcare",
"subcategory": "clinic",
"addresses": {
"operation": {
"street1": "507, Koramangala 6th block",
"street2": "Kormanagala",
"city": "Bengaluru",
"state": "Karnataka",
"postal_code": 560047,
"country": "IN"
},
"registered": {
"street1": "507, Koramangala 1st block",
"street2": "MG Road",
"city": "Bengaluru",
"state": "Karnataka",
"postal_code": 560034,
"country": "IN"
}
},
"business_model": "Healthcare E-commerce platform"
},
"legal_info": {
"pan": "AAACL1234C",
"gst": "18AABCU9603R1ZM"
},
"brand": {
"color": "FFFFFF"
},
"notes": {
"internal_ref_id": "123123"
},
"tos_acceptance": {
"date": null,
"ip": null,
"user_agent": null
},
"contact_info": {
"chargeback": {
"email": "cb@example.org"
},
"refund": {
"email": "cb@example.org"
},
"support": {
"email": "support@example.org",
"phone": "9999999998",
"policy_url": "https://www.google.com"
}
},
"apps": {
"websites": [
"https://www.example.org"
],
"android": [
{
"url": "playstore.example.org",
"name": "Example"
}
],
"ios": [
{
"url": "appstore.example.org",
"name": "Example"
}
]
}
}{
"customer_facing_business_name": "ABCD Ltd"
}Stakeholder APIs(4 operations)
{
"percentage_ownership": 10,
"name": "Gaurav Kumar",
"email": "gaurav.kumar@example.com",
"relationship": {
"director": true,
"executive": false
},
"phone": {
"primary": "7474747474",
"secondary": "7474747474"
},
"addresses": {
"residential": {
"street": "506, Koramangala 1st block",
"city": "Bengaluru",
"state": "Karnataka",
"postal_code": "560034",
"country": "IN"
}
},
"kyc": {
"pan": "AVOPB1111K"
},
"notes": {
"random_key_by_partner": "random_value"
}
}{
"percentage_ownership": 20,
"name": "Gauri Kumar",
"email": "gauri.kumar@example.com",
"relationship": {
"director": false,
"executive": true
},
"phone": {
"primary": "9898989898",
"secondary": "9898989898"
},
"addresses": {
"residential": {
"street": "507, Koramangala 1st block",
"city": "Bangalore",
"state": "Karnataka",
"postal_code": "560035",
"country": "IN"
}
},
"kyc": {
"pan": "AVOPB1111J"
},
"notes": {
"random_key_by_partner": "random_value2"
}
}Documents API(4 operations)
{
"document_type": "aadhar_front",
"file": "@/Users/your_name/Downloads/sample_uploaded.jpeg"
}{
"document_type": "business_proof_url",
"file": "@/Users/your_name/Downloads/sample_uploaded.jpeg"
}Product Configuration Request APIs(3 operations)
{
"product_name": "payment_gateway",
"tnc_accepted": true
}{
"notifications": {
"email": [
"gaurav.kumar@example.com",
"acd@gmail.com"
]
},
"checkout": {
"theme_color": "#528FFF"
},
"refund": {
"default_refund_speed": "optimum"
},
"settlements": {
"account_number": "1234567890",
"ifsc_code": "HDFC0000317",
"beneficiary_name": "Gaurav Kumar"
},
"tnc_accepted": true
}Webhooks API(5 operations)
{
"url": "https://en1mwkqoqioct.x.pipedream.net",
"alert_email": "gaurav.kumar@example.com",
"secret": "12345",
"events": [
"payment.authorized",
"payment.failed",
"payment.captured",
"payment.dispute.created",
"refund.failed",
"refund.created"
]
}{
"url": "https://www.linkedin.com",
"events": [
"refund.created"
]
}Terms and Conditions API(2 operations)
{
"accepted": true
}