Razorpay
App · 26 actions
Take payments with your own Razorpay account: create orders and payment links, invoice customers, capture and refund payments, keep customers in step, and see settlements. Start workflows when a payment is captured, an order or payment link is paid, or a refund is made.
Actions
| Action | What it does |
|---|---|
| Cancel invoice | Cancel an issued invoice so it can no longer be paid. |
| Cancel payment link | Cancel a payment link so it can no longer be paid. |
| Capture payment | Capture an authorized payment so the money is settled to you. |
| Create customer | Add a customer with their name, email or phone. |
| Create invoice | Create an invoice for a customer with one or more items, issued at once with a link to pay it, or saved as a draft. |
| Create order | Create an order for an amount a customer is about to pay, to hand to Razorpay Checkout on your site or app. |
| Create payment link | Create a link anyone can open to pay an amount, by UPI, card, netbanking or wallet. |
| Get customer | Get one customer with their name, email, phone, GSTIN and notes. |
| Get invoice | Get one invoice with its customer, items, status, amount due and link to pay it. |
| Get order | Get one order with its amount paid and due, status and attempts. |
| Get payment | Get one payment with its status, method, customer email and phone, fees and any error. |
| Get payment link | Get one payment link with its address, status and how much has been paid. |
| Get refund | Get one refund with its amount, status and how fast it was sent. |
| Issue invoice | Issue a draft invoice so the customer can pay it. |
| List customers | List customers, newest first. |
| List invoices | List invoices, newest first, optionally only one customer's, the one a payment paid, or one receipt number's. |
| List orders | List orders, newest first, optionally only those made in a time range, those with or without a successful payment, or one receipt number's. |
| List payment links | List payment links, or find the one a payment paid or the one with your reference. |
| List payments | List payments, newest first, optionally only those made in a time range. |
| List payments for order | List every payment tried on an order, successful or not. |
| List refunds | List refunds, newest first: all of them, or one payment's, optionally only those made in a time range. |
| List settlements | List settlements, the money Razorpay has paid into your bank account, newest first, with their bank reference (UTR). |
| Refund payment | Refund a captured payment in full, or part of it. |
| Send payment link | Have Razorpay send a payment link to its customer by email or SMS, again if it was sent before. |
| Update customer | Change a customer's name, email or phone. |
| Update payment notes | Replace the notes kept with a payment, such as your own order number. |
Cancel invoice
Cancel an issued invoice so it can no longer be paid.
Inputs
- Invoice ID
invoice_idtextRequired - The invoice's id, starting inv_, from 'List invoices' or an earlier step.
Outputs
amountnumber- The amount in the main unit of the currency, such as 499.5
currencytext- The currency, such as INR
invoiceobject- The invoice
Example output
{
"amount": 499.0,
"currency": "INR",
"invoice": {
"amount": 49900,
"amount_due": 49900,
"amount_paid": 0,
"cancelled_at": 1660734500,
"created_at": 1660734398,
"currency": "INR",
"customer_details": {
"contact": "+919876543210",
"email": "gaurav.kumar@example.com",
"id": "cust_1Aa00000000004",
"name": "Gaurav Kumar"
},
"customer_id": "cust_1Aa00000000004",
"description": "Invoice for October",
"email_status": null,
"entity": "invoice",
"expire_by": null,
"id": "inv_K6g5bviu09mXo1",
"invoice_number": null,
"issued_at": 1660734398,
"line_items": [
{
"amount": 49900,
"currency": "INR",
"description": "Cotton Cloth",
"id": "li_K6g5bwLZuBmb1Q",
"name": "Cloth",
"net_amount": 49900,
"quantity": 1
}
],
"notes": {},
"order_id": "order_K6g5bxSIwYIXJS",
"paid_at": null,
"partial_payment": false,
"payment_id": null,
"receipt": "INV-1042",
"short_url": "https://rzp.io/i/ksYThDL",
"sms_status": null,
"status": "cancelled"
}
}Cancel payment link
Cancel a payment link so it can no longer be paid.
Inputs
- Payment link ID
payment_link_idtextRequired - The payment link's id, starting plink_, from 'List payment links' or an earlier step.
Outputs
amountnumber- The amount in the main unit of the currency, such as 499.5
currencytext- The currency, such as INR
payment_linkobject- The payment link
Example output
{
"amount": 499.0,
"currency": "INR",
"payment_link": {
"accept_partial": false,
"amount": 49900,
"amount_paid": 0,
"cancelled_at": 1591097270,
"created_at": 1591097057,
"currency": "INR",
"customer": {
"contact": "+919876543210",
"email": "gaurav.kumar@example.com",
"name": "Gaurav Kumar"
},
"description": "Payment for policy no #23456",
"expire_by": 1691097057,
"expired_at": 0,
"first_min_partial_amount": 0,
"id": "plink_ExjpAUN3gVHrPJ",
"notes": {},
"notify": {
"email": false,
"sms": false
},
"order_id": "order_KBneAVhT2zbzsU",
"reference_id": "TS1989",
"reminder_enable": false,
"short_url": "https://rzp.io/i/nxrHnLJ",
"status": "cancelled",
"updated_at": 1591097057
}
}Capture payment
Capture an authorized payment so the money is settled to you. Only needed when your account doesn't capture payments automatically. Uses the payment's own currency.
Inputs
- Payment ID
payment_idtextRequired - The payment's id, starting pay_, from 'List payments', a trigger or an earlier step.
- Amount
amountnumber - How much to capture, in the main unit, such as 499.00. Leave empty to capture the whole payment.At least 0.
Outputs
amountnumber- The amount in the main unit of the currency, such as 499.5
currencytext- The currency, such as INR
paymentobject- The payment
Example output
{
"amount": 499.0,
"currency": "INR",
"payment": {
"amount": 49900,
"amount_refunded": 0,
"bank": null,
"captured": true,
"card_id": null,
"contact": "+919876543210",
"created_at": 1678452635,
"currency": "INR",
"customer_id": null,
"description": "Test Transaction",
"email": "gaurav.kumar@example.com",
"entity": "payment",
"error_code": null,
"error_description": null,
"error_reason": null,
"fee": 1180,
"id": "pay_DG4ZdRK8ZnXC3k",
"international": false,
"invoice_id": null,
"method": "upi",
"notes": {
"address": "Corporate Office"
},
"order_id": "order_RB58MiP5SPFYyM",
"refund_status": null,
"status": "captured",
"tax": 180,
"vpa": "gaurav.kumar@exampleupi",
"wallet": null
}
}Create customer
Add a customer with their name, email or phone. If one with the same details exists, it is returned instead, unless you choose to fail.
Inputs
- Name
nametext - The customer's name, 3 to 50 characters.
- Email
emailtext - The customer's email address.
- Phone
contacttext - Their phone number with the country code, like +919876543210.
- GSTIN
gstintext - The customer's GST number, if they have one.
- Notes
notesobject - Your own keys and values to keep with it, such as an order number from your shop. Up to 15, each up to 256 characters.
- If they already exist
if_existstext - What to do when a customer with the same details is already in Razorpay.One of:
return(Return the existing customer (default)),fail(Fail the step). Default:return.
Outputs
customerobject- The customer
Example output
{
"customer": {
"contact": "+919876543210",
"created_at": 1678580352,
"email": "gaurav.kumar@example.com",
"entity": "customer",
"gstin": null,
"id": "cust_1Aa00000000004",
"name": "Gaurav Kumar",
"notes": {}
}
}Create invoice
Create an invoice for a customer with one or more items, issued at once with a link to pay it, or saved as a draft. Razorpay sends it only if you switch on Email it or Text it.
Inputs
- Items
line_itemslistRequired - What the invoice charges for: each item's name, the price of one in the main unit, and how many.
- Customer
customer_idtext - Who the invoice is for. Pick a customer, or leave empty and give their name with an email or phone.
- Customer name
customer_nametext - The name of the person billed.
- Customer email
customer_emailtext - The email address of the person billed.
- Customer phone
customer_contacttext - The phone number of the person billed, with the country code, like +919876543210.
- Currency
currencytext - The currency to charge in. Defaults to INR; others need international payments switched on in Razorpay.One of:
INR(INR (Indian rupee)),AED(AED (United Arab Emirates Dirham)),ALL(ALL (Albanian lek)),AMD(AMD (Armenian dram)),AUD(AUD (Australian dollar)),AWG(AWG (Aruban florin)),AZN(AZN (Azerbaijan Manat)),BAM(BAM (Convertible Mark)),BBD(BBD (Barbadian dollar)),BDT(BDT (Bangladeshi taka)), and 118 more. Default:INR. - Description
descriptiontext - A short description shown on the invoice.
- Receipt number
receipttext - Your own reference for it, up to 40 characters, such as INV-1042.
- Expires
expire_bydate and time - When the invoice can no longer be paid.
- Save as draft
drafttrue/false - Keep it as a draft to issue later with 'Issue invoice', instead of issuing it now.
- Allow part payments
partial_paymenttrue/false - Let the customer pay in more than one part.
- Email it
send_emailtrue/false - Have Razorpay email the invoice to the customer. Off by default.
- Text it
send_smstrue/false - Have Razorpay text the invoice to the customer. Off by default.
- Notes
notesobject - Your own keys and values to keep with it, such as an order number from your shop. Up to 15, each up to 256 characters.
Outputs
amountnumber- The amount in the main unit of the currency, such as 499.5
currencytext- The currency, such as INR
invoiceobject- The invoice
Example output
{
"amount": 499.0,
"currency": "INR",
"invoice": {
"amount": 49900,
"amount_due": 49900,
"amount_paid": 0,
"cancelled_at": null,
"created_at": 1660734398,
"currency": "INR",
"customer_details": {
"contact": "+919876543210",
"email": "gaurav.kumar@example.com",
"id": "cust_1Aa00000000004",
"name": "Gaurav Kumar"
},
"customer_id": "cust_1Aa00000000004",
"description": "Invoice for October",
"email_status": null,
"entity": "invoice",
"expire_by": null,
"id": "inv_K6g5bviu09mXo1",
"invoice_number": null,
"issued_at": 1660734398,
"line_items": [
{
"amount": 49900,
"currency": "INR",
"description": "Cotton Cloth",
"id": "li_K6g5bwLZuBmb1Q",
"name": "Cloth",
"net_amount": 49900,
"quantity": 1
}
],
"notes": {},
"order_id": "order_K6g5bxSIwYIXJS",
"paid_at": null,
"partial_payment": false,
"payment_id": null,
"receipt": "INV-1042",
"short_url": "https://rzp.io/i/ksYThDL",
"sms_status": null,
"status": "issued"
}
}Create order
Create an order for an amount a customer is about to pay, to hand to Razorpay Checkout on your site or app. Create a new one for every payment attempt.
Inputs
- Amount
amountnumberRequired - How much to charge, in the main unit, such as 499.00.At least 0.
- Currency
currencytext - The currency to charge in. Defaults to INR; others need international payments switched on in Razorpay.One of:
INR(INR (Indian rupee)),AED(AED (United Arab Emirates Dirham)),ALL(ALL (Albanian lek)),AMD(AMD (Armenian dram)),AUD(AUD (Australian dollar)),AWG(AWG (Aruban florin)),AZN(AZN (Azerbaijan Manat)),BAM(BAM (Convertible Mark)),BBD(BBD (Barbadian dollar)),BDT(BDT (Bangladeshi taka)), and 118 more. Default:INR. - Receipt number
receipttext - Your own reference for it, up to 40 characters, such as INV-1042.
- Notes
notesobject - Your own keys and values to keep with it, such as an order number from your shop. Up to 15, each up to 256 characters.
Outputs
amountnumber- The amount in the main unit of the currency, such as 499.5
currencytext- The currency, such as INR
orderobject- The order
Example output
{
"amount": 499.0,
"currency": "INR",
"order": {
"amount": 49900,
"amount_due": 49900,
"amount_paid": 0,
"attempts": 0,
"created_at": 1756455561,
"currency": "INR",
"entity": "order",
"id": "order_RB58MiP5SPFYyM",
"notes": {
"shop_order": "1042"
},
"receipt": "receipt#1",
"status": "created"
}
}Create payment link
Create a link anyone can open to pay an amount, by UPI, card, netbanking or wallet. Razorpay sends it to the customer only if you switch on Email it or Text it.
Inputs
- Amount
amountnumberRequired - How much to collect, in the main unit, such as 499.00.At least 0.
- Currency
currencytext - The currency to charge in. Defaults to INR; others need international payments switched on in Razorpay.One of:
INR(INR (Indian rupee)),AED(AED (United Arab Emirates Dirham)),ALL(ALL (Albanian lek)),AMD(AMD (Armenian dram)),AUD(AUD (Australian dollar)),AWG(AWG (Aruban florin)),AZN(AZN (Azerbaijan Manat)),BAM(BAM (Convertible Mark)),BBD(BBD (Barbadian dollar)),BDT(BDT (Bangladeshi taka)), and 118 more. Default:INR. - Description
descriptiontext - What the payment is for, shown to the customer.
- Customer name
customer_nametext - The name of the person paying.
- Customer email
customer_emailtext - The email address of the person paying.
- Customer phone
customer_contacttext - The phone number of the person paying, with the country code, like +919876543210.
- Email it
send_emailtrue/false - Have Razorpay email the link to the customer. Off by default.
- Text it
send_smstrue/false - Have Razorpay text the link to the customer. Off by default.
- Expires
expire_bydate and time - When the link stops working, at most six months away. Leave empty for six months.
- Reference
reference_idtext - Your own reference for the link, up to 40 characters, different for every link.
- Allow part payments
accept_partialtrue/false - Let the customer pay in more than one part.
- Smallest first part
first_min_partial_amountnumber - With part payments, the least the first part can be, such as 100.00.At least 0.
- Send reminders
reminder_enabletrue/false - Have Razorpay remind the customer until they pay.
- Return address
callback_urltext - A web address to send the customer to once they have paid, starting https://.
- Notes
notesobject - Your own keys and values to keep with it, such as an order number from your shop. Up to 15, each up to 256 characters.
Outputs
amountnumber- The amount in the main unit of the currency, such as 499.5
currencytext- The currency, such as INR
payment_linkobject- The payment link
Example output
{
"amount": 499.0,
"currency": "INR",
"payment_link": {
"accept_partial": false,
"amount": 49900,
"amount_paid": 0,
"cancelled_at": 0,
"created_at": 1591097057,
"currency": "INR",
"customer": {
"contact": "+919876543210",
"email": "gaurav.kumar@example.com",
"name": "Gaurav Kumar"
},
"description": "Payment for policy no #23456",
"expire_by": 1691097057,
"expired_at": 0,
"first_min_partial_amount": 0,
"id": "plink_ExjpAUN3gVHrPJ",
"notes": {},
"notify": {
"email": false,
"sms": false
},
"order_id": "order_KBneAVhT2zbzsU",
"reference_id": "TS1989",
"reminder_enable": false,
"short_url": "https://rzp.io/i/nxrHnLJ",
"status": "created",
"updated_at": 1591097057
}
}Get customer
Get one customer with their name, email, phone, GSTIN and notes.
Inputs
- Customer
customer_idtextRequired - The customer. Pick one, or give their id (cust_...) from an earlier step.
Outputs
customerobject- The customer
Example output
{
"customer": {
"contact": "+919876543210",
"created_at": 1678580352,
"email": "gaurav.kumar@example.com",
"entity": "customer",
"gstin": null,
"id": "cust_1Aa00000000004",
"name": "Gaurav Kumar",
"notes": {}
}
}Get invoice
Get one invoice with its customer, items, status, amount due and link to pay it.
Inputs
- Invoice ID
invoice_idtextRequired - The invoice's id, starting inv_, from 'List invoices' or an earlier step.
Outputs
amountnumber- The amount in the main unit of the currency, such as 499.5
currencytext- The currency, such as INR
invoiceobject- The invoice
Example output
{
"amount": 499.0,
"currency": "INR",
"invoice": {
"amount": 49900,
"amount_due": 49900,
"amount_paid": 0,
"cancelled_at": null,
"created_at": 1660734398,
"currency": "INR",
"customer_details": {
"contact": "+919876543210",
"email": "gaurav.kumar@example.com",
"id": "cust_1Aa00000000004",
"name": "Gaurav Kumar"
},
"customer_id": "cust_1Aa00000000004",
"description": "Invoice for October",
"email_status": null,
"entity": "invoice",
"expire_by": null,
"id": "inv_K6g5bviu09mXo1",
"invoice_number": null,
"issued_at": 1660734398,
"line_items": [
{
"amount": 49900,
"currency": "INR",
"description": "Cotton Cloth",
"id": "li_K6g5bwLZuBmb1Q",
"name": "Cloth",
"net_amount": 49900,
"quantity": 1
}
],
"notes": {},
"order_id": "order_K6g5bxSIwYIXJS",
"paid_at": null,
"partial_payment": false,
"payment_id": null,
"receipt": "INV-1042",
"short_url": "https://rzp.io/i/ksYThDL",
"sms_status": null,
"status": "issued"
}
}Get order
Get one order with its amount paid and due, status and attempts.
Inputs
- Order ID
order_idtextRequired - The order's id, starting order_, from 'List orders' or an earlier step.
Outputs
amountnumber- The amount in the main unit of the currency, such as 499.5
currencytext- The currency, such as INR
orderobject- The order
Example output
{
"amount": 499.0,
"currency": "INR",
"order": {
"amount": 49900,
"amount_due": 49900,
"amount_paid": 0,
"attempts": 0,
"created_at": 1756455561,
"currency": "INR",
"entity": "order",
"id": "order_RB58MiP5SPFYyM",
"notes": {
"shop_order": "1042"
},
"receipt": "receipt#1",
"status": "created"
}
}Get payment
Get one payment with its status, method, customer email and phone, fees and any error.
Inputs
- Payment ID
payment_idtextRequired - The payment's id, starting pay_, from 'List payments', a trigger or an earlier step.
Outputs
amountnumber- The amount in the main unit of the currency, such as 499.5
currencytext- The currency, such as INR
paymentobject- The payment
Example output
{
"amount": 499.0,
"currency": "INR",
"payment": {
"amount": 49900,
"amount_refunded": 0,
"bank": null,
"captured": true,
"card_id": null,
"contact": "+919876543210",
"created_at": 1678452635,
"currency": "INR",
"customer_id": null,
"description": "Test Transaction",
"email": "gaurav.kumar@example.com",
"entity": "payment",
"error_code": null,
"error_description": null,
"error_reason": null,
"fee": 1180,
"id": "pay_DG4ZdRK8ZnXC3k",
"international": false,
"invoice_id": null,
"method": "upi",
"notes": {
"address": "Corporate Office"
},
"order_id": "order_RB58MiP5SPFYyM",
"refund_status": null,
"status": "captured",
"tax": 180,
"vpa": "gaurav.kumar@exampleupi",
"wallet": null
}
}Get payment link
Get one payment link with its address, status and how much has been paid.
Inputs
- Payment link ID
payment_link_idtextRequired - The payment link's id, starting plink_, from 'List payment links' or an earlier step.
Outputs
amountnumber- The amount in the main unit of the currency, such as 499.5
currencytext- The currency, such as INR
payment_linkobject- The payment link
Example output
{
"amount": 499.0,
"currency": "INR",
"payment_link": {
"accept_partial": false,
"amount": 49900,
"amount_paid": 0,
"cancelled_at": 0,
"created_at": 1591097057,
"currency": "INR",
"customer": {
"contact": "+919876543210",
"email": "gaurav.kumar@example.com",
"name": "Gaurav Kumar"
},
"description": "Payment for policy no #23456",
"expire_by": 1691097057,
"expired_at": 0,
"first_min_partial_amount": 0,
"id": "plink_ExjpAUN3gVHrPJ",
"notes": {},
"notify": {
"email": false,
"sms": false
},
"order_id": "order_KBneAVhT2zbzsU",
"reference_id": "TS1989",
"reminder_enable": false,
"short_url": "https://rzp.io/i/nxrHnLJ",
"status": "created",
"updated_at": 1591097057
}
}Get refund
Get one refund with its amount, status and how fast it was sent.
Inputs
- Refund ID
refund_idtextRequired - The refund's id, starting rfnd_, from 'List refunds' or an earlier step.
Outputs
amountnumber- The amount in the main unit of the currency, such as 499.5
currencytext- The currency, such as INR
refundobject- The refund
Example output
{
"amount": 499.0,
"currency": "INR",
"refund": {
"amount": 49900,
"batch_id": null,
"created_at": 1597078866,
"currency": "INR",
"entity": "refund",
"id": "rfnd_FP8QHiV938haTz",
"notes": {},
"payment_id": "pay_DG4ZdRK8ZnXC3k",
"receipt": "Receipt No. 31",
"speed_processed": "normal",
"speed_requested": "normal",
"status": "processed"
}
}Issue invoice
Issue a draft invoice so the customer can pay it.
Inputs
- Invoice ID
invoice_idtextRequired - The invoice's id, starting inv_, from 'List invoices' or an earlier step.
Outputs
amountnumber- The amount in the main unit of the currency, such as 499.5
currencytext- The currency, such as INR
invoiceobject- The invoice
Example output
{
"amount": 499.0,
"currency": "INR",
"invoice": {
"amount": 49900,
"amount_due": 49900,
"amount_paid": 0,
"cancelled_at": null,
"created_at": 1660734398,
"currency": "INR",
"customer_details": {
"contact": "+919876543210",
"email": "gaurav.kumar@example.com",
"id": "cust_1Aa00000000004",
"name": "Gaurav Kumar"
},
"customer_id": "cust_1Aa00000000004",
"description": "Invoice for October",
"email_status": null,
"entity": "invoice",
"expire_by": null,
"id": "inv_K6g5bviu09mXo1",
"invoice_number": null,
"issued_at": 1660734398,
"line_items": [
{
"amount": 49900,
"currency": "INR",
"description": "Cotton Cloth",
"id": "li_K6g5bwLZuBmb1Q",
"name": "Cloth",
"net_amount": 49900,
"quantity": 1
}
],
"notes": {},
"order_id": "order_K6g5bxSIwYIXJS",
"paid_at": null,
"partial_payment": false,
"payment_id": null,
"receipt": "INV-1042",
"short_url": "https://rzp.io/i/ksYThDL",
"sms_status": null,
"status": "issued"
}
}List customers
List customers, newest first.
Inputs
- How many
countnumber - How many to return, newest first, 1 to 100. Razorpay's default is 10.From 1 to 100.
- Skip
skipnumber - How many of the newest to pass over first, to get the next ones.At least 0.
Outputs
countnumber- How many were returned
customerslist- The customers
has_moretrue/false- True when there may be more: raise How many or use Skip
Example output
{
"count": 1,
"customers": [
{
"contact": "+919876543210",
"created_at": 1678580352,
"email": "gaurav.kumar@example.com",
"entity": "customer",
"gstin": null,
"id": "cust_1Aa00000000004",
"name": "Gaurav Kumar",
"notes": {}
}
],
"has_more": false
}List invoices
List invoices, newest first, optionally only one customer's, the one a payment paid, or one receipt number's.
Inputs
- Customer
customer_idtext - Only this customer's invoices.
- Paid by payment
payment_idtext - Only the invoice this payment (pay_...) paid.
- Receipt number
receipttext - Only the invoice with this receipt number.
- How many
countnumber - How many to return, newest first, 1 to 100. Razorpay's default is 10.From 1 to 100.
- Skip
skipnumber - How many of the newest to pass over first, to get the next ones.At least 0.
Outputs
countnumber- How many were returned
has_moretrue/false- True when there may be more: raise How many or use Skip
invoiceslist- The invoices
Example output
{
"count": 1,
"has_more": false,
"invoices": [
{
"amount": 49900,
"amount_due": 49900,
"amount_paid": 0,
"cancelled_at": null,
"created_at": 1660734398,
"currency": "INR",
"customer_details": {
"contact": "+919876543210",
"email": "gaurav.kumar@example.com",
"id": "cust_1Aa00000000004",
"name": "Gaurav Kumar"
},
"customer_id": "cust_1Aa00000000004",
"description": "Invoice for October",
"email_status": null,
"entity": "invoice",
"expire_by": null,
"id": "inv_K6g5bviu09mXo1",
"invoice_number": null,
"issued_at": 1660734398,
"line_items": [
{
"amount": 49900,
"currency": "INR",
"description": "Cotton Cloth",
"id": "li_K6g5bwLZuBmb1Q",
"name": "Cloth",
"net_amount": 49900,
"quantity": 1
}
],
"notes": {},
"order_id": "order_K6g5bxSIwYIXJS",
"paid_at": null,
"partial_payment": false,
"payment_id": null,
"receipt": "INV-1042",
"short_url": "https://rzp.io/i/ksYThDL",
"sms_status": null,
"status": "issued"
}
]
}List orders
List orders, newest first, optionally only those made in a time range, those with or without a successful payment, or one receipt number's.
Inputs
- Made after
from_timedate and time - Only those made at or after this time.
- Made before
to_timedate and time - Only those made at or before this time.
- Payment
paidtext - Only orders with a successful payment, or only those without.One of:
1(With a successful payment),0(Without a successful payment yet). - Receipt number
receipttext - Only the order with this receipt number.
- How many
countnumber - How many to return, newest first, 1 to 100. Razorpay's default is 10.From 1 to 100.
- Skip
skipnumber - How many of the newest to pass over first, to get the next ones.At least 0.
Outputs
countnumber- How many were returned
has_moretrue/false- True when there may be more: raise How many or use Skip
orderslist- The orders
Example output
{
"count": 1,
"has_more": false,
"orders": [
{
"amount": 49900,
"amount_due": 49900,
"amount_paid": 0,
"attempts": 0,
"created_at": 1756455561,
"currency": "INR",
"entity": "order",
"id": "order_RB58MiP5SPFYyM",
"notes": {
"shop_order": "1042"
},
"receipt": "receipt#1",
"status": "created"
}
]
}List payment links
List payment links, or find the one a payment paid or the one with your reference.
Inputs
- Paid by payment
payment_idtext - Only the link this payment (pay_...) was made through.
- Reference
reference_idtext - Only the link with this reference of yours.
Outputs
countnumber- How many were returned
payment_linkslist- The payment links
Example output
{
"count": 1,
"payment_links": [
{
"accept_partial": false,
"amount": 49900,
"amount_paid": 0,
"cancelled_at": 0,
"created_at": 1591097057,
"currency": "INR",
"customer": {
"contact": "+919876543210",
"email": "gaurav.kumar@example.com",
"name": "Gaurav Kumar"
},
"description": "Payment for policy no #23456",
"expire_by": 1691097057,
"expired_at": 0,
"first_min_partial_amount": 0,
"id": "plink_ExjpAUN3gVHrPJ",
"notes": {},
"notify": {
"email": false,
"sms": false
},
"order_id": "order_KBneAVhT2zbzsU",
"reference_id": "TS1989",
"reminder_enable": false,
"short_url": "https://rzp.io/i/nxrHnLJ",
"status": "created",
"updated_at": 1591097057
}
]
}List payments
List payments, newest first, optionally only those made in a time range.
Inputs
- Made after
from_timedate and time - Only those made at or after this time.
- Made before
to_timedate and time - Only those made at or before this time.
- How many
countnumber - How many to return, newest first, 1 to 100. Razorpay's default is 10.From 1 to 100.
- Skip
skipnumber - How many of the newest to pass over first, to get the next ones.At least 0.
Outputs
countnumber- How many were returned
has_moretrue/false- True when there may be more: raise How many or use Skip
paymentslist- The payments
Example output
{
"count": 1,
"has_more": false,
"payments": [
{
"amount": 49900,
"amount_refunded": 0,
"bank": null,
"captured": true,
"card_id": null,
"contact": "+919876543210",
"created_at": 1678452635,
"currency": "INR",
"customer_id": null,
"description": "Test Transaction",
"email": "gaurav.kumar@example.com",
"entity": "payment",
"error_code": null,
"error_description": null,
"error_reason": null,
"fee": 1180,
"id": "pay_DG4ZdRK8ZnXC3k",
"international": false,
"invoice_id": null,
"method": "upi",
"notes": {
"address": "Corporate Office"
},
"order_id": "order_RB58MiP5SPFYyM",
"refund_status": null,
"status": "captured",
"tax": 180,
"vpa": "gaurav.kumar@exampleupi",
"wallet": null
}
]
}List payments for order
List every payment tried on an order, successful or not.
Inputs
- Order ID
order_idtextRequired - The order's id, starting order_, from 'List orders' or an earlier step.
Outputs
countnumber- How many were returned
has_moretrue/false- True when there may be more: raise How many or use Skip
paymentslist- The order's payments
Example output
{
"count": 1,
"has_more": false,
"payments": [
{
"amount": 49900,
"amount_refunded": 0,
"bank": null,
"captured": true,
"card_id": null,
"contact": "+919876543210",
"created_at": 1678452635,
"currency": "INR",
"customer_id": null,
"description": "Test Transaction",
"email": "gaurav.kumar@example.com",
"entity": "payment",
"error_code": null,
"error_description": null,
"error_reason": null,
"fee": 1180,
"id": "pay_DG4ZdRK8ZnXC3k",
"international": false,
"invoice_id": null,
"method": "upi",
"notes": {
"address": "Corporate Office"
},
"order_id": "order_RB58MiP5SPFYyM",
"refund_status": null,
"status": "captured",
"tax": 180,
"vpa": "gaurav.kumar@exampleupi",
"wallet": null
}
]
}List refunds
List refunds, newest first: all of them, or one payment's, optionally only those made in a time range.
Inputs
- Payment ID
payment_idtext - Only this payment's refunds (pay_...). Leave empty for all.
- Made after
from_timedate and time - Only those made at or after this time.
- Made before
to_timedate and time - Only those made at or before this time.
- How many
countnumber - How many to return, newest first, 1 to 100. Razorpay's default is 10.From 1 to 100.
- Skip
skipnumber - How many of the newest to pass over first, to get the next ones.At least 0.
Outputs
countnumber- How many were returned
has_moretrue/false- True when there may be more: raise How many or use Skip
refundslist- The refunds
Example output
{
"count": 1,
"has_more": false,
"refunds": [
{
"amount": 49900,
"batch_id": null,
"created_at": 1597078866,
"currency": "INR",
"entity": "refund",
"id": "rfnd_FP8QHiV938haTz",
"notes": {},
"payment_id": "pay_DG4ZdRK8ZnXC3k",
"receipt": "Receipt No. 31",
"speed_processed": "normal",
"speed_requested": "normal",
"status": "processed"
}
]
}List settlements
List settlements, the money Razorpay has paid into your bank account, newest first, with their bank reference (UTR).
Inputs
- Made after
from_timedate and time - Only those made at or after this time.
- Made before
to_timedate and time - Only those made at or before this time.
- How many
countnumber - How many to return, newest first, 1 to 100. Razorpay's default is 10.From 1 to 100.
- Skip
skipnumber - How many of the newest to pass over first, to get the next ones.At least 0.
Outputs
countnumber- How many were returned
has_moretrue/false- True when there may be more: raise How many or use Skip
settlementslist- The settlements
Example output
{
"count": 1,
"has_more": false,
"settlements": [
{
"amount": 9973635,
"created_at": 1568176960,
"entity": "settlement",
"fees": 0,
"id": "setl_DGlQ1Rj8os78Ec",
"status": "processed",
"tax": 0,
"utr": "1568176960vxp0rj"
}
]
}Refund payment
Refund a captured payment in full, or part of it. The money goes back the way the customer paid, in the payment's currency.
Inputs
- Payment ID
payment_idtextRequired - The payment's id, starting pay_, from 'List payments', a trigger or an earlier step.
- Amount
amountnumber - How much to refund, in the main unit, such as 100.00. Leave empty to refund everything not yet refunded.At least 0.
- Speed
speedtext - Normal takes 5 to 7 working days. Instant, where the customer's bank allows it, may cost a fee.One of:
normal(Normal, 5 to 7 working days (default)),optimum(Instant where possible, normal otherwise). Default:normal. - Receipt number
receipttext - Your own reference for the refund, up to 40 characters. Running the step again with the same one doesn't refund twice.
- Notes
notesobject - Your own keys and values to keep with it, such as an order number from your shop. Up to 15, each up to 256 characters.
Outputs
amountnumber- The amount in the main unit of the currency, such as 499.5
currencytext- The currency, such as INR
refundobject- The refund
Example output
{
"amount": 499.0,
"currency": "INR",
"refund": {
"amount": 49900,
"batch_id": null,
"created_at": 1597078866,
"currency": "INR",
"entity": "refund",
"id": "rfnd_FP8QHiV938haTz",
"notes": {},
"payment_id": "pay_DG4ZdRK8ZnXC3k",
"receipt": "Receipt No. 31",
"speed_processed": "normal",
"speed_requested": "normal",
"status": "processed"
}
}Send payment link
Have Razorpay send a payment link to its customer by email or SMS, again if it was sent before.
Inputs
- Payment link ID
payment_link_idtextRequired - The payment link's id, starting plink_, from 'List payment links' or an earlier step.
- Send by
mediumtextRequired - Email (to the link's customer email) or SMS (to their phone).One of:
email,sms.
Outputs
mediumtext- email or sms
payment_link_idtext- The payment link sent
senttrue/false- True once Razorpay sent it
Example output
{
"medium": "email",
"payment_link_id": "plink_ExjpAUN3gVHrPJ",
"sent": true
}Update customer
Change a customer's name, email or phone. Only the fields given change.
Inputs
- Customer
customer_idtextRequired - The customer. Pick one, or give their id (cust_...) from an earlier step.
- Name
nametext - A new name, 3 to 50 characters. Leave empty to keep it.
- Email
emailtext - A new email address. Leave empty to keep it.
- Phone
contacttext - A new phone number with the country code. Leave empty to keep it.
Outputs
customerobject- The customer
Example output
{
"customer": {
"contact": "+919876543210",
"created_at": 1678580352,
"email": "gaurav.kumar@example.com",
"entity": "customer",
"gstin": null,
"id": "cust_1Aa00000000004",
"name": "Gaurav Kumar",
"notes": {}
}
}Update payment notes
Replace the notes kept with a payment, such as your own order number.
Inputs
- Payment ID
payment_idtextRequired - The payment's id, starting pay_, from 'List payments', a trigger or an earlier step.
- Notes
notesobjectRequired - The keys and values to keep with the payment. They replace its current notes. Up to 15, each up to 256 characters.
Outputs
amountnumber- The amount in the main unit of the currency, such as 499.5
currencytext- The currency, such as INR
paymentobject- The payment
Example output
{
"amount": 499.0,
"currency": "INR",
"payment": {
"amount": 49900,
"amount_refunded": 0,
"bank": null,
"captured": true,
"card_id": null,
"contact": "+919876543210",
"created_at": 1678452635,
"currency": "INR",
"customer_id": null,
"description": "Test Transaction",
"email": "gaurav.kumar@example.com",
"entity": "payment",
"error_code": null,
"error_description": null,
"error_reason": null,
"fee": 1180,
"id": "pay_DG4ZdRK8ZnXC3k",
"international": false,
"invoice_id": null,
"method": "upi",
"notes": {
"address": "Corporate Office"
},
"order_id": "order_RB58MiP5SPFYyM",
"refund_status": null,
"status": "captured",
"tax": 180,
"vpa": "gaurav.kumar@exampleupi",
"wallet": null
}
}