API ReferenceIntegrationsKnowledge Base

Payouts to Cards

With RazorpayX, you can make payouts directly to a credit card, debit card, or a prepaid card. The process of making a payout to a card is the same as normal payouts.

Step 1: Create a contact.

Step 2: Create a fund account with the contact's credit card details. Watch Out!
The API endpoint to create a fund account with the contact's credit card details is different for PCI DSS Compliant and PCI DSS non-compliant merchants. Ensure you use the correct endpoint.

Step 3: Create a payout to the fund account linked to the contact's credit card.

Step 4 Create a Payout to the fund account linked to the contact's debit or prepaid card.

Handy Tips
This feature is not available by default. To enable this feature, raise a request using the support form on the RazorpayX Dashboard.

Create a Contact🔗

Use the below endpoint to create a contact:

/contacts

Handy Tips

  • A new contact is created if any combination of the following details is unique: name, email, contact, type and reference_id.
  • If all the above details match the details of an existing contact, the API returns details of the existing contact.
  • Use the Update Contact API if you want to make changes to an existing contact.

Request Parameters🔗

namemandatory
string The contact's name. This field is case-sensitive. A minimum of 3 characters and a maximum of 50 characters are allowed. Name cannot end with a special character, except .. Supported characters: a-z, A-Z, 0-9, space, , - , _ , / , ( , ) and , .. For example, Gaurav Kumar.
emailoptional
string The contact's email address. For example, gaurav.kumar@example.com.
contactoptional
string The contact's phone number. For example, 9123456789.
typeoptional
string Maximum 40 characters. Classification for the contact being created. For example, employee. The following classifications are available by default:
  • vendor
  • customer
  • employee
  • self

    Handy Tips
    Additional Classifications can be created via the Dashboard and then used in APIs. It is not possible to create new Classifications via API.
reference_idoptional
string Maximum 40 characters. A user-entered reference for the contact. For example, Acme Contact ID 12345.
notesoptional
object Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.

Response Parameters🔗

id
string The unique identifier linked to the contact. For example, cont_00000000000001.
entity
string The entity being created. Here, it will be contact.
name
string The contact's name. For example, Gaurav Kumar.
contact
string The contact's phone number. For example, 9123456789.
email
string The contact's email address. For example, gaurav.kumar@example.com.
type
string A classification for the contact being created. For example, employee.
reference_id
string A user-entered reference for the contact. For example, Acme Contact ID 12345.
batch_id
string This parameter is populated if the contact was created as part of a bulk upload. For example, batch_00000000000001.
active
boolean Possible values:
  • true (default) = active
  • false = inactive
notes
object Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.
created_at
integer Timestamp, in Unix, when the contact was created. For example, 1545320320.

Create a Payout🔗

Use the below endpoint to create a payout.

/payouts

Request Parameters🔗

account_numbermandatory
string The account from which you want to make the payout.
Account details can be found on the RazorpayX Dashboard. For example, 7878780080316316.
  • Pass your virtual account number if you want money to be deducted from your virtual account.
  • Pass your current account number if you want money to be deducted from your current account.
    Watch Out!
    This is not your contact's bank account number.
fund_account_idmandatory
string The unique identifier linked to a fund account. For example, fa_00000000000001.
amountmandatory
integer The payout amount, in paise. For example, if you want to transfer ₹10000, pass 1000000. Minimum value 100. Handy Tips
The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance.
currencymandatory
string The payout currency. Here, it is INR.
modemandatory
string The mode to be used to create the payout. Available modes:
  • NEFT
  • RTGS
  • IMPS
  • UPI
  • card

    Watch Out!
    The payout modes are case sensitive. When creating payouts using APIs, ensure payout modes are entered in upper case.
purposemandatory
string The purpose of the payout that is being created. The following classifications are available in the system by default:
  • refund
  • cashback
  • payout
  • salary
  • utility bill
  • vendor bill

    Handy Tips
    Additional purposes for payouts can be created via the Dashboard and then used in the API. However, it is not possible to create a new purpose for the payout via the API.
queue_if_low_balanceoptional
boolean Possible values:
  • true - The payout is queued when your business account does not have sufficient balance to process the payout.
  • false (default) - The payout is never queued. The payout fails if your business account does not have sufficient balance to process the payout.
reference_idoptional
string Maximum length 40 characters. A user-generated reference given to the payout. For example, Acme Transaction ID 12345. You can use this field to store your own transaction ID, if any.
narrationoptional
string Maximum length 30 characters. Allowed characters: a-z, A-Z, 0-9 and space. This is a custom note that also appears on the bank statement.

Handy Tips
  • If no value is passed for this parameter, it defaults to the Merchant Billing Label.
  • Ensure that the most important text forms the first 9 characters as banks may truncate the rest as per their standards.
notesoptional
object Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.

Response Parameters🔗

id

string The unique identifier linked to the payout. For example, pout_00000000000001.

entity

string The entity being created. Here, it will be payout.

fund_account_id

string The unique identifier linked to the fund account. For example, fa_00000000000001.

amount

integer The payout amount, in paise. For example, if you want to transfer ₹10000, pass 1000000. Minimum value 100. Handy Tips
The value passed here does not include fees and tax. Fees and tax, if any, are deducted from your account balance.

currency

string The payout currency. Here, it is INR.

notes

object Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, "note_key": "Beam me up Scotty”.

fees

integer The fees for the payout. This field is populated only when the payout moves to the processing state. For example, 5.

tax

integer The tax that is applicable for the fee being charged. This field is populated only when the payout moves to the processing state. For example, 1.

status

string The status of the payout. Possible payout states:

utr

string The unique transaction number linked to a payout. For example, HDFCN00000000001.

mode

string The mode used to make the payout. Available modes:

  • NEFT
  • RTGS
  • IMPS
  • UPI

    Watch Out!
    The payout modes are case sensitive.
purpose

string The purpose of the payout that is being created. The following classifications are available in the system by default:

  • refund
  • cashback
  • payout
  • salary
  • utility bill
  • vendor bill

    Handy Tips
    Additional purposes for payouts can be created via the Dashboard and then used in the API. However, it is not possible to create a new purpose for the payout via the API.
reference_id

string Maximum length 40 characters. A user-generated reference given to the payout. For example, Acme Transaction ID 12345. You can use this field to store your own transaction ID, if any.

narration

string Maximum length 30 characters. Allowed characters: a-z, A-Z, 0-9 and space. This is a custom note that also appears on the bank statement.
Handy Tips
• If no value is passed for this parameter, it defaults to the Merchant Billing Label.
• Ensure that the most important text forms the first 9 characters as banks may truncate the rest as per their standards.

batch_id

string This parameter is populated if the contact was created as part of a bulk upload. For example, batch_00000000000001.

failure_reason

string The reason for the payout failing.

created_at

integer Timestamp, in Unix, when the contact was created. For example, 1545320320.

fee_type

string Indicates the fee type charged for the payout. Possible values:

  • free_payout
error

object The error object.

description
string A description for the error. For example, IMPS is not enabled on beneficiary account, please retry with different mode.
source
string Possible values:
  • gateway: Technical error at Razorpay Partner bank.
  • beneficiary_bank: Technical error at beneficiary bank.
  • business: Merchant action required.
  • internal: Technical error at Razorpay's server.
reason
string The error reason. For example, imps_not_allowed. Failure reasons and next steps.

Security Risks - PCI DSS Non-Compliance🔗

Watch Out!

  • You must ensure that no two fund accounts have the same fund_account_id. The below mentioned security risks can be avoided if this is ensured.
  • If you are not PCI DSS compliant, ensure card details do not pass through or are saved on your server.

There are security risks involved when using public APIs. When using a public API in the front end to create a fund account using a customer's card, there is a possibility that a malicious user can tamper with the response data before it reaches you.

The malicious user could have full control over the request and/or response and make changes to the data. They could change the contact's card number sent by you in the request to another card number.

They could also create a fund account with their details on your website or app. When you try to create a fund account for your contact, they could replace the fund_account_id returned by Razorpay with the fund_account_id linked to their account. This means you could end up making payouts to the malicious user instead of the intended contact.

It is advised you take all required precautions when making public API calls. Ensure you store the fund_account_id returned by Razorpay in your database and make payouts only to fund account ids and card numbers you recognize.

If the data is tampered in anyway, the liability lies on malicious user as it is considered a malicious attempt by the user.

Handy Tips
We highly recommend you get PCI DSS compliance and make private API calls that are authenticated using your API Key. This helps reduce risks related to security.

×