API Test Keys

Collect a Payment

POST
/v1/payments/collect

Click to copy

UPI allows a customer or a payee to request a payment from another person or entity. This API is the same as the make payments API. The type of payment changes to collect and no credentials are required to be captured by the customer requesting the payment. Use this endpoint to collect a payment.

Is this page helpful?

Curl

1
curl -X POST 'api.rzp.<bank>.com/v1/payments/collect' \
2
-u [YOUR_KEY_ID]:[YOUR_SECRET] \
3
-H "Content-type: application/json" \
4
-H "x-device-fingerprint: <device_fingerprint>" \
5
-H "x-device-fingerprint-timestamp: 1496918882000" \
6
-H "x-customer-reference: customer-id-from-customer" \
7
-d '{
8
"reference_id": "RSKwpINfSkdEvtdxf",
9
"upi_initiation_mode": "00",
10
"upi_purpose_code": "00",
11
"upi_reference_url": "https://www.test.com",
12
"upi_reference_category": "00",
13
"device": {
14
"geocode": "1234.1213",
15
"ip": "198.1.1.1"
16
},
17
"currency": "INR",
18
"amount": 100,
19
"description": "UPI transaction",
20
"payer": {
21
"vpa": "7262093972.stage@rzp"
22
},
23
"payees": [
24
{
25
"vpa": "9560137963.stage@rzp"
26
}
27
],
28
"expire_at": 150603365
29
}'

Response

1
{
2
"entity":"upi.payment",
3
"upi_transaction_id":"RZPc2ed455b797e4add8392110cfc528acc",
4
"reference_id":"ord_somfv432nsa",
5
"upi_customer_reference_number":"804813039157",
6
"upi_reference_url":"https://www.test.com",
7
"upi_reference_category":"00",
8
"upi_initiation_mode":"00",
9
"upi_purpose_code":"00",
10
"currency":"INR",
11
"amount":10024,
12
"type":"pay | collect",
13
"description":"flight tickets",
14
"payer":{
15
"vpa":"rohit@rzp",
16
"fundsource":{
17
"ifsc":"AXIS0000058",
18
"masked_account_number":"XXXXXXXXXXX3000"
19
},
20
"name":"Rohit Sharma",
21
"mcc":"0000",
22
"upi_response_code":"00",
23
"upi_reversal_response_code":"string"
24
},
25
"payees":[
26
{
27
"vpa":"swiggy@rzp",
28
"fundsource":{
29
"ifsc":"HDFC0000058",
30
"masked_account_number":"XXXXXXXXXXX6000"
31
},
32
"name":"Swiggy Pvt. Ltd.",
33
"mcc":"6765",
34
"upi_response_code":"00",
35
"upi_reversal_response_code":"string"
36
}
37
],
38
"status":"initiated| success | failed",
39
"created_at":"1722317078",
40
"expire_at":"1722317078"
41
}
Request Parameters
reference_id
string

Indicates the transaction ID used by merchants for their reference. It is used at the business level and not in the UPI ecosystem. This value should be alphanumeric and between 1 and 35 characters.

upi_initiation_mode
enum

Indicates the 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values:

  • 00 = Default: When no specific code is assigned or for general default scenarios.
  • 01 = QR Code: For making payments by scanning a standard QR code.
  • 02 = Secure QR Code: For payments that require additional security with QR codes.
  • 03 = Bharat QR Code: For interoperable payments across various payment networks using Bharat QR.
  • 04 = Intent: For payments initiated by an intent from an application or browser.
  • 05 = Secure Intent: For payments initiated by a secure intent from an app or browser.
  • 06 = NFC (Near Field Communication): For contactless payments using NFC technology.
  • 07 = BLE (Bluetooth): For payments made through Bluetooth Low Energy technology.
  • 08 = UHF (Ultra High Frequency): For payments made using UHF technology, typically for toll payments.
  • 09 = Aadhaar: For payments authenticated using an Aadhaar number and biometric verification.
  • 10 = SDK (Software Development Kit): For payments initiated through an SDK embedded in an app.
  • 11 = UPI-Mandate: For setting up recurring payments or mandates using UPI.
  • 12 = FIR (Foreign Inward Remittance): For receiving remittances from foreign countries.
  • 13 = QR Mandate: For setting up recurring payments using a QR code.
  • 14 = BBPS: For making bill payments through the Bharat Bill Payment System.

upi_purpose_code
enum

The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values:

  • 01 – SEBI
  • 02 – AMC
  • 03 – Travel
  • 04 – Hospitality
  • 05 – Hospital
  • 06 – Telecom
  • 07 – Insurance
  • 08 – Education
  • 09 – Gifting
  • 10 – BBPS
  • 11 – Global UPI
  • 12 – Metro ATM QR
  • 13 – Non-metro ATM QR
  • 14 – Standing Instruction
  • 15 – Corporate disbursement

upi_reference_url
string

Indicates a URL that, upon clicking, provides the customer with further transaction details such as bill details, bill copy, order copy, ticket details, and so on. When used, this URL should be related to the particular transaction and not be used to send unsolicited information irrelevant to the transaction.

upi_reference_category

*

string

The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values:

  • 00 - NULL
  • 01 - Advertisement
  • 02 - Invoice

device

*

object

The device details.

Show child parameters (2)

currency

*

string

The currency of the amount. Here, it is INR.

amount

*

integer

The amount in paise.

description
string

The description of the payment.

payer

*

object

The payer details.

Show child parameters (1)

payees

*

array

The payee details.

Show child parameters (1)

Response Parameters
entity
string

The entity type. Here, it is upi.payment.

reference_id
string

Indicates the transaction ID used by merchants for their reference. It is used at the business level and not in the UPI ecosystem. This value should be alphanumeric and between 1 and 35 characters.

upi_reference_url
string

Indicates a URL that, upon clicking, provides the customer with further transaction details such as bill details, bill copy, order copy, ticket details, and so on. When used, this URL should be related to the particular transaction and not be used to send unsolicited information irrelevant to the transaction.

upi_reference_category
string

The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values:

  • 00 - NULL
  • 01 - Advertisement
  • 02 - Invoice

upi_initiation_mode
enum

Indicates the 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values:

  • 00 = Default: When no specific code is assigned or for general default scenarios.
  • 01 = QR Code: For making payments by scanning a standard QR code.
  • 02 = Secure QR Code: For payments that require additional security with QR codes.
  • 03 = Bharat QR Code: For interoperable payments across various payment networks using Bharat QR.
  • 04 = Intent: For payments initiated by an intent from an application or browser.
  • 05 = Secure Intent: For payments initiated by a secure intent from an app or browser.
  • 06 = NFC (Near Field Communication): For contactless payments using NFC technology.
  • 07 = BLE (Bluetooth): For payments made through Bluetooth Low Energy technology.
  • 08 = UHF (Ultra High Frequency): For payments made using UHF technology, typically for toll payments.
  • 09 = Aadhaar: For payments authenticated using an Aadhaar number and biometric verification.
  • 10 = SDK (Software Development Kit): For payments initiated through an SDK embedded in an app.
  • 11 = UPI-Mandate: For setting up recurring payments or mandates using UPI.
  • 12 = FIR (Foreign Inward Remittance): For receiving remittances from foreign countries.
  • 13 = QR Mandate: For setting up recurring payments using a QR code.
  • 14 = BBPS: For making bill payments through the Bharat Bill Payment System.

upi_purpose_code
enum

The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values:

  • 01 – SEBI
  • 02 – AMC
  • 03 – Travel
  • 04 – Hospitality
  • 05 – Hospital
  • 06 – Telecom
  • 07 – Insurance
  • 08 – Education
  • 09 – Gifting
  • 10 – BBPS
  • 11 – Global UPI
  • 12 – Metro ATM QR
  • 13 – Non-metro ATM QR
  • 14 – Standing Instruction
  • 15 – Corporate disbursement

device
object

The device details.

Show child parameters (2)

currency
string

The currency of the amount. Here, it is INR.

amount
integer

The amount in paise.

type
string

The type of the payment. Possible values:

  • pay
  • collect

description
string

The description of the payment.

payer
object

The payer details.

Show child parameters (1)

payees
object

The payee details.

Show child parameters (1)

expire_at
integer

The UNIX timestamp of the collect request.

Collect a Payment

POST
/v1/payments/collect

Click to copy

UPI allows a customer or a payee to request a payment from another person or entity. This API is the same as the make payments API. The type of payment changes to collect and no credentials are required to be captured by the customer requesting the payment. Use this endpoint to collect a payment.

Is this page helpful?

Request Parameters
reference_id
string

Indicates the transaction ID used by merchants for their reference. It is used at the business level and not in the UPI ecosystem. This value should be alphanumeric and between 1 and 35 characters.

upi_initiation_mode
enum

Indicates the 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values:

  • 00 = Default: When no specific code is assigned or for general default scenarios.
  • 01 = QR Code: For making payments by scanning a standard QR code.
  • 02 = Secure QR Code: For payments that require additional security with QR codes.
  • 03 = Bharat QR Code: For interoperable payments across various payment networks using Bharat QR.
  • 04 = Intent: For payments initiated by an intent from an application or browser.
  • 05 = Secure Intent: For payments initiated by a secure intent from an app or browser.
  • 06 = NFC (Near Field Communication): For contactless payments using NFC technology.
  • 07 = BLE (Bluetooth): For payments made through Bluetooth Low Energy technology.
  • 08 = UHF (Ultra High Frequency): For payments made using UHF technology, typically for toll payments.
  • 09 = Aadhaar: For payments authenticated using an Aadhaar number and biometric verification.
  • 10 = SDK (Software Development Kit): For payments initiated through an SDK embedded in an app.
  • 11 = UPI-Mandate: For setting up recurring payments or mandates using UPI.
  • 12 = FIR (Foreign Inward Remittance): For receiving remittances from foreign countries.
  • 13 = QR Mandate: For setting up recurring payments using a QR code.
  • 14 = BBPS: For making bill payments through the Bharat Bill Payment System.

upi_purpose_code
enum

The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values:

  • 01 – SEBI
  • 02 – AMC
  • 03 – Travel
  • 04 – Hospitality
  • 05 – Hospital
  • 06 – Telecom
  • 07 – Insurance
  • 08 – Education
  • 09 – Gifting
  • 10 – BBPS
  • 11 – Global UPI
  • 12 – Metro ATM QR
  • 13 – Non-metro ATM QR
  • 14 – Standing Instruction
  • 15 – Corporate disbursement

upi_reference_url
string

Indicates a URL that, upon clicking, provides the customer with further transaction details such as bill details, bill copy, order copy, ticket details, and so on. When used, this URL should be related to the particular transaction and not be used to send unsolicited information irrelevant to the transaction.

upi_reference_category

*

string

The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values:

  • 00 - NULL
  • 01 - Advertisement
  • 02 - Invoice

device

*

object

The device details.

Show child parameters (2)

currency

*

string

The currency of the amount. Here, it is INR.

amount

*

integer

The amount in paise.

description
string

The description of the payment.

payer

*

object

The payer details.

Show child parameters (1)

payees

*

array

The payee details.

Show child parameters (1)

Response Parameters
entity
string

The entity type. Here, it is upi.payment.

reference_id
string

Indicates the transaction ID used by merchants for their reference. It is used at the business level and not in the UPI ecosystem. This value should be alphanumeric and between 1 and 35 characters.

upi_reference_url
string

Indicates a URL that, upon clicking, provides the customer with further transaction details such as bill details, bill copy, order copy, ticket details, and so on. When used, this URL should be related to the particular transaction and not be used to send unsolicited information irrelevant to the transaction.

upi_reference_category
string

The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values:

  • 00 - NULL
  • 01 - Advertisement
  • 02 - Invoice

upi_initiation_mode
enum

Indicates the 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values:

  • 00 = Default: When no specific code is assigned or for general default scenarios.
  • 01 = QR Code: For making payments by scanning a standard QR code.
  • 02 = Secure QR Code: For payments that require additional security with QR codes.
  • 03 = Bharat QR Code: For interoperable payments across various payment networks using Bharat QR.
  • 04 = Intent: For payments initiated by an intent from an application or browser.
  • 05 = Secure Intent: For payments initiated by a secure intent from an app or browser.
  • 06 = NFC (Near Field Communication): For contactless payments using NFC technology.
  • 07 = BLE (Bluetooth): For payments made through Bluetooth Low Energy technology.
  • 08 = UHF (Ultra High Frequency): For payments made using UHF technology, typically for toll payments.
  • 09 = Aadhaar: For payments authenticated using an Aadhaar number and biometric verification.
  • 10 = SDK (Software Development Kit): For payments initiated through an SDK embedded in an app.
  • 11 = UPI-Mandate: For setting up recurring payments or mandates using UPI.
  • 12 = FIR (Foreign Inward Remittance): For receiving remittances from foreign countries.
  • 13 = QR Mandate: For setting up recurring payments using a QR code.
  • 14 = BBPS: For making bill payments through the Bharat Bill Payment System.

upi_purpose_code
enum

The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values:

  • 01 – SEBI
  • 02 – AMC
  • 03 – Travel
  • 04 – Hospitality
  • 05 – Hospital
  • 06 – Telecom
  • 07 – Insurance
  • 08 – Education
  • 09 – Gifting
  • 10 – BBPS
  • 11 – Global UPI
  • 12 – Metro ATM QR
  • 13 – Non-metro ATM QR
  • 14 – Standing Instruction
  • 15 – Corporate disbursement

device
object

The device details.

Show child parameters (2)

currency
string

The currency of the amount. Here, it is INR.

amount
integer

The amount in paise.

type
string

The type of the payment. Possible values:

  • pay
  • collect

description
string

The description of the payment.

payer
object

The payer details.

Show child parameters (1)

payees
object

The payee details.

Show child parameters (1)

expire_at
integer

The UNIX timestamp of the collect request.

Curl

1
curl -X POST 'api.rzp.<bank>.com/v1/payments/collect' \
2
-u [YOUR_KEY_ID]:[YOUR_SECRET] \
3
-H "Content-type: application/json" \
4
-H "x-device-fingerprint: <device_fingerprint>" \
5
-H "x-device-fingerprint-timestamp: 1496918882000" \
6
-H "x-customer-reference: customer-id-from-customer" \
7
-d '{
8
"reference_id": "RSKwpINfSkdEvtdxf",
9
"upi_initiation_mode": "00",
10
"upi_purpose_code": "00",
11
"upi_reference_url": "https://www.test.com",
12
"upi_reference_category": "00",
13
"device": {
14
"geocode": "1234.1213",
15
"ip": "198.1.1.1"
16
},
17
"currency": "INR",
18
"amount": 100,
19
"description": "UPI transaction",
20
"payer": {
21
"vpa": "7262093972.stage@rzp"
22
},
23
"payees": [
24
{
25
"vpa": "9560137963.stage@rzp"
26
}
27
],
28
"expire_at": 150603365
29
}'

Response

1
{
2
"entity":"upi.payment",
3
"upi_transaction_id":"RZPc2ed455b797e4add8392110cfc528acc",
4
"reference_id":"ord_somfv432nsa",
5
"upi_customer_reference_number":"804813039157",
6
"upi_reference_url":"https://www.test.com",
7
"upi_reference_category":"00",
8
"upi_initiation_mode":"00",
9
"upi_purpose_code":"00",
10
"currency":"INR",
11
"amount":10024,
12
"type":"pay | collect",
13
"description":"flight tickets",
14
"payer":{
15
"vpa":"rohit@rzp",
16
"fundsource":{
17
"ifsc":"AXIS0000058",
18
"masked_account_number":"XXXXXXXXXXX3000"
19
},
20
"name":"Rohit Sharma",
21
"mcc":"0000",
22
"upi_response_code":"00",
23
"upi_reversal_response_code":"string"
24
},
25
"payees":[
26
{
27
"vpa":"swiggy@rzp",
28
"fundsource":{
29
"ifsc":"HDFC0000058",
30
"masked_account_number":"XXXXXXXXXXX6000"
31
},
32
"name":"Swiggy Pvt. Ltd.",
33
"mcc":"6765",
34
"upi_response_code":"00",
35
"upi_reversal_response_code":"string"
36
}
37
],
38
"status":"initiated| success | failed",
39
"created_at":"1722317078",
40
"expire_at":"1722317078"
41
}