API Test Keys

Fetch Payments

GET
/v1/upi/tpap/paymentsrefresh=true&upi_transaction_id=RZPkbnkb98scbkhbnj89b&reference_id=RSKwpINfSkdEvtdxf&type=collect&status=deemed

Click to copy

Use this endpoint to list all customer payments. You can use various query parameters to filter the list of payments.

Is this page helpful?

Curl

1
curl -X GET 'api.rzp.<bank>.com/v1/upi/tpap/paymentsrefresh=true&upi_transaction_id=RZPkbnkb98scbkhbnj89b&reference_id=RSKwpINfSkdEvtdxf&type=collect&status=deemed' \
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" \

Response

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

If the refresh parameter is true, fetch payment status from NPCI. Else, return payment from the local database default is false.

upi_transaction_id
string

The unique identifier of the transaction across all entities in UPI is created by the originator. In payments, the lifecycle starts from CL, so it is mandatory for the originator to create it. All further actions regarding this payment will be done using this ID.

Watch Out!

This value should be alphanumeric and a maximum of 35 characters are allowed. The value should start with a prefix given by NPCI to Switch.

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.

type
string

The type of the payment. Possible values:

  • pay
  • collect

status
string

The status of the payment. Possible values:

  • created
  • initiated
  • pending
  • success
  • failed

Response Parameters
entity
string

The entity type. Here, it is collection.

count
integer

Indicates the number of item in the entity type.

items
object

The payment details.

Show child parameters (15)

Fetch Payments

GET
/v1/upi/tpap/paymentsrefresh=true&upi_transaction_id=RZPkbnkb98scbkhbnj89b&reference_id=RSKwpINfSkdEvtdxf&type=collect&status=deemed

Click to copy

Use this endpoint to list all customer payments. You can use various query parameters to filter the list of payments.

Is this page helpful?

Query Parameters
refresh
string

If the refresh parameter is true, fetch payment status from NPCI. Else, return payment from the local database default is false.

upi_transaction_id
string

The unique identifier of the transaction across all entities in UPI is created by the originator. In payments, the lifecycle starts from CL, so it is mandatory for the originator to create it. All further actions regarding this payment will be done using this ID.

Watch Out!

This value should be alphanumeric and a maximum of 35 characters are allowed. The value should start with a prefix given by NPCI to Switch.

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.

type
string

The type of the payment. Possible values:

  • pay
  • collect

status
string

The status of the payment. Possible values:

  • created
  • initiated
  • pending
  • success
  • failed

Response Parameters
entity
string

The entity type. Here, it is collection.

count
integer

Indicates the number of item in the entity type.

items
object

The payment details.

Show child parameters (15)

Curl

1
curl -X GET 'api.rzp.<bank>.com/v1/upi/tpap/paymentsrefresh=true&upi_transaction_id=RZPkbnkb98scbkhbnj89b&reference_id=RSKwpINfSkdEvtdxf&type=collect&status=deemed' \
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" \

Response

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