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

ActionWhat it does
Cancel invoiceCancel an issued invoice so it can no longer be paid.
Cancel payment linkCancel a payment link so it can no longer be paid.
Capture paymentCapture an authorized payment so the money is settled to you.
Create customerAdd a customer with their name, email or phone.
Create invoiceCreate 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 orderCreate an order for an amount a customer is about to pay, to hand to Razorpay Checkout on your site or app.
Create payment linkCreate a link anyone can open to pay an amount, by UPI, card, netbanking or wallet.
Get customerGet one customer with their name, email, phone, GSTIN and notes.
Get invoiceGet one invoice with its customer, items, status, amount due and link to pay it.
Get orderGet one order with its amount paid and due, status and attempts.
Get paymentGet one payment with its status, method, customer email and phone, fees and any error.
Get payment linkGet one payment link with its address, status and how much has been paid.
Get refundGet one refund with its amount, status and how fast it was sent.
Issue invoiceIssue a draft invoice so the customer can pay it.
List customersList customers, newest first.
List invoicesList invoices, newest first, optionally only one customer's, the one a payment paid, or one receipt number's.
List ordersList 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 linksList payment links, or find the one a payment paid or the one with your reference.
List paymentsList payments, newest first, optionally only those made in a time range.
List payments for orderList every payment tried on an order, successful or not.
List refundsList refunds, newest first: all of them, or one payment's, optionally only those made in a time range.
List settlementsList settlements, the money Razorpay has paid into your bank account, newest first, with their bank reference (UTR).
Refund paymentRefund a captured payment in full, or part of it.
Send payment linkHave Razorpay send a payment link to its customer by email or SMS, again if it was sent before.
Update customerChange a customer's name, email or phone.
Update payment notesReplace 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 IDinvoice_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 a payment link so it can no longer be paid.

Inputs

Payment link IDpayment_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 IDpayment_idtextRequired
The payment's id, starting pay_, from 'List payments', a trigger or an earlier step.
Amountamountnumber
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

Namenametext
The customer's name, 3 to 50 characters.
Emailemailtext
The customer's email address.
Phonecontacttext
Their phone number with the country code, like +919876543210.
GSTINgstintext
The customer's GST number, if they have one.
Notesnotesobject
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 existif_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

Itemsline_itemslistRequired
What the invoice charges for: each item's name, the price of one in the main unit, and how many.
Customercustomer_idtext
Who the invoice is for. Pick a customer, or leave empty and give their name with an email or phone.
Customer namecustomer_nametext
The name of the person billed.
Customer emailcustomer_emailtext
The email address of the person billed.
Customer phonecustomer_contacttext
The phone number of the person billed, with the country code, like +919876543210.
Currencycurrencytext
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.
Descriptiondescriptiontext
A short description shown on the invoice.
Receipt numberreceipttext
Your own reference for it, up to 40 characters, such as INV-1042.
Expiresexpire_bydate and time
When the invoice can no longer be paid.
Save as draftdrafttrue/false
Keep it as a draft to issue later with 'Issue invoice', instead of issuing it now.
Allow part paymentspartial_paymenttrue/false
Let the customer pay in more than one part.
Email itsend_emailtrue/false
Have Razorpay email the invoice to the customer. Off by default.
Text itsend_smstrue/false
Have Razorpay text the invoice to the customer. Off by default.
Notesnotesobject
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

AmountamountnumberRequired
How much to charge, in the main unit, such as 499.00.At least 0.
Currencycurrencytext
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 numberreceipttext
Your own reference for it, up to 40 characters, such as INV-1042.
Notesnotesobject
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 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

AmountamountnumberRequired
How much to collect, in the main unit, such as 499.00.At least 0.
Currencycurrencytext
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.
Descriptiondescriptiontext
What the payment is for, shown to the customer.
Customer namecustomer_nametext
The name of the person paying.
Customer emailcustomer_emailtext
The email address of the person paying.
Customer phonecustomer_contacttext
The phone number of the person paying, with the country code, like +919876543210.
Email itsend_emailtrue/false
Have Razorpay email the link to the customer. Off by default.
Text itsend_smstrue/false
Have Razorpay text the link to the customer. Off by default.
Expiresexpire_bydate and time
When the link stops working, at most six months away. Leave empty for six months.
Referencereference_idtext
Your own reference for the link, up to 40 characters, different for every link.
Allow part paymentsaccept_partialtrue/false
Let the customer pay in more than one part.
Smallest first partfirst_min_partial_amountnumber
With part payments, the least the first part can be, such as 100.00.At least 0.
Send remindersreminder_enabletrue/false
Have Razorpay remind the customer until they pay.
Return addresscallback_urltext
A web address to send the customer to once they have paid, starting https://.
Notesnotesobject
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

Customercustomer_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 IDinvoice_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 IDorder_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 IDpayment_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 one payment link with its address, status and how much has been paid.

Inputs

Payment link IDpayment_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 IDrefund_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 IDinvoice_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 manycountnumber
How many to return, newest first, 1 to 100. Razorpay's default is 10.From 1 to 100.
Skipskipnumber
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

Customercustomer_idtext
Only this customer's invoices.
Paid by paymentpayment_idtext
Only the invoice this payment (pay_...) paid.
Receipt numberreceipttext
Only the invoice with this receipt number.
How manycountnumber
How many to return, newest first, 1 to 100. Razorpay's default is 10.From 1 to 100.
Skipskipnumber
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 afterfrom_timedate and time
Only those made at or after this time.
Made beforeto_timedate and time
Only those made at or before this time.
Paymentpaidtext
Only orders with a successful payment, or only those without.One of: 1 (With a successful payment), 0 (Without a successful payment yet).
Receipt numberreceipttext
Only the order with this receipt number.
How manycountnumber
How many to return, newest first, 1 to 100. Razorpay's default is 10.From 1 to 100.
Skipskipnumber
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, or find the one a payment paid or the one with your reference.

Inputs

Paid by paymentpayment_idtext
Only the link this payment (pay_...) was made through.
Referencereference_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 afterfrom_timedate and time
Only those made at or after this time.
Made beforeto_timedate and time
Only those made at or before this time.
How manycountnumber
How many to return, newest first, 1 to 100. Razorpay's default is 10.From 1 to 100.
Skipskipnumber
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 IDorder_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 IDpayment_idtext
Only this payment's refunds (pay_...). Leave empty for all.
Made afterfrom_timedate and time
Only those made at or after this time.
Made beforeto_timedate and time
Only those made at or before this time.
How manycountnumber
How many to return, newest first, 1 to 100. Razorpay's default is 10.From 1 to 100.
Skipskipnumber
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 afterfrom_timedate and time
Only those made at or after this time.
Made beforeto_timedate and time
Only those made at or before this time.
How manycountnumber
How many to return, newest first, 1 to 100. Razorpay's default is 10.From 1 to 100.
Skipskipnumber
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 IDpayment_idtextRequired
The payment's id, starting pay_, from 'List payments', a trigger or an earlier step.
Amountamountnumber
How much to refund, in the main unit, such as 100.00. Leave empty to refund everything not yet refunded.At least 0.
Speedspeedtext
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 numberreceipttext
Your own reference for the refund, up to 40 characters. Running the step again with the same one doesn't refund twice.
Notesnotesobject
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"
  }
}

Have Razorpay send a payment link to its customer by email or SMS, again if it was sent before.

Inputs

Payment link IDpayment_link_idtextRequired
The payment link's id, starting plink_, from 'List payment links' or an earlier step.
Send bymediumtextRequired
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

Customercustomer_idtextRequired
The customer. Pick one, or give their id (cust_...) from an earlier step.
Namenametext
A new name, 3 to 50 characters. Leave empty to keep it.
Emailemailtext
A new email address. Leave empty to keep it.
Phonecontacttext
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 IDpayment_idtextRequired
The payment's id, starting pay_, from 'List payments', a trigger or an earlier step.
NotesnotesobjectRequired
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
  }
}

On this page