API Test Keys
Create a Mandate
POST
/v1/upi/tpap/mandates
Click to copy
Payers can use this endpoint to request a mandate to the switch.
Is this page helpful?
Curl
1curl -X POST 'api.rzp.<bank>.com/v1/upi/tpap/mandates' \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": "TXN1234567",9"upi_transaction_id": "RZP1KuSUGrp2l6MmPuT0163789452QPAY02",10"amount": 1722,11"amount_rule": "exact | max",12"currency": "inr",13"device": {14"geocode": "1234.1213",15"ip": "198.1.1.1"16},17"payee": {18"vpa": "swiggy@rzp",19"name": "Swiggy Pvt. Ltd.",20"mcc": "6765"21},22"payer": {23"vpa": "7262093972.stage@rzp",24"fundsource": {25"id": "fs_1234567"26}27},28"name": "Name of the Mandate",29"expire_at": 1722317078,30"block_fund": false,31"revocable_by_payer": true,32"recurrence": {33"period": "onetime|daily|weekly|fortnightly|monthly|bimonthly|quarterly|halfyearly|yearly|aspresented",34"rule": "on | before | after",35"value": 136},37"validity": {38"start_at": 1722317078,39"end_at": 172231707840},41"upi_reference_category": "02",42"upi_reference_url": "https://www.abcxyz.com/",43"description": "Sample Mandate Request",44"upi_credentials": {},45"upi_initiation_mode": "00",46"upi_purpose_code": "00",47"share_to_payee": true48}'
Success
Failure
1{2"entity":"upi.mandate",3"umn":"umn",4"reference_id":"TXN1234567",5"upi_transaction_id":"RZP1KuSUGrp2l6MmPuT0163789452QPAY02",6"amount":1722,7"amount_rule":"exact | max",8"currency":"inr",9"device":{10"geocode":"1234.1213",11"ip":"198.1.1.1"12},13"payee":{14"vpa":"swiggy@rzp",15"name":"Swiggy Pvt. Ltd.",16"mcc":"6765"17},18"payer":{19"vpa":"7262093972.stage@rzp"20},21"name":"Name of the Mandate",22"expire_at":1722317078,23"block_fund":false,24"revocable_by_payer":true,25"recurrence":{26"period":"onetime|daily|weekly|fortnightly|monthly|bimonthly|quarterly|halfyearly|yearly|aspresented",27"rule":"on | before | after",28"value":129},30"validity":{31"start_at":1722317078,32"end_at":172231707833},34"upi_reference_category":"02",35"upi_reference_url":"https://www.abcxyz.com/",36"description":"Sample Mandate Request",37"upi_initiation_mode":"00",38"upi_purpose_code":"00",39"upi_response_code":"00",40"share_to_payee":true,41"status":"initiated",42"created_at":172231707843}
Request Parameters
reference_id
*
string
Indicates the merchant reference identifier. In mandate, this will be a mandate id stored at the merchant side.
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.
amount
*
integer
The amount in paisa for which the mandate is requested.
amount_rule
*
string
If this parameter value is max, the mandated amount can be less than or equal to the specified amount. If it is set to exact, the mandated amount should be the exact amount specified.
currency
string
The currency of the mandate amount.
device
*
object
The device details.
Show child parameters (2)
payee
*
object
The payee details.
Show child parameters (3)
payer
*
object
The payer details.
Show child parameters (1)
name
string
The name of the mandate.
expire_at
*
integer
The UNIX timestamp indicating the time of the mandate expiration.
block_fund
boolean
Indicates whether the customer's funds should be blocked. This is applicable only for one-time mandates. For recurring, it should always be set to false. For one-time mandates, it can be either true or false. Default is false.
true
: The customer should be blocked.false
: The customer should not be blocked.
revocable_by_payer
*
boolean
Indicates whether the payer can revoke the mandate. This is applicable only for one-time mandates. For recurring, it should always be set to true. For one-time mandates, it can be either true or false. Default is true.
true
: The payer can revoke the mandate.false
: The payer cannot revoke the mandate.
recurrence
object
The recurring details of the mandate.
Show child parameters (3)
validity
*
object
The mandate validity details.
Show child parameters (2)
upi_reference_category
string
Indicates the UPI reference URL. Possible values:
00
: Default01
: Advertisement02
: Invoice
upi_reference_url
string
The invoice as sent by the merchant or a reference to the mandate in the form of a URL. If you do not pass this, a default value will be set, and the same will be populated in response.
description
string
The description of the mandate.
upi_credentials
*
string
The encrypted UPI credentials with the user's MPIN.
upi_initiation_mode
*
string
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
string
The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values:
01
– SEBI02
– AMC03
– Travel04
– Hospitality05
– Hospital06
– Telecom07
– Insurance08
– Education09
– Gifting10
– BBPS11
– Global UPI12
– Metro ATM QR13
– Non-metro ATM QR14
– Standing Instruction15
– Corporate disbursement
share_to_payee
boolean
Indicates whether the mandate is shared with the payee. This is required only for onetime mandates initiated by the payer. For recurring mandates, you must set it to true. For onetime mandates, it can be either true or false. Default is true. Possible values:
true
: Mandate is shared.false
: Mandate is not shared.
Response Parameters
entity
string
The entity type.
umn
string
The Unique Mandate Number, assigned to each mandate, used to track, manage, and reference specific mandates. The switch will create a UUID-based UMN of 32 characters. The UMN should be random, non-guessable and active. For example, XYZa977ccabb11e7abc4cec278b6b50a@mypsp
. The total length of the UMN address should be 70digit.
reference_id
string
Indicates the merchant reference ID. In mandates, it is mandate id stored at the merchant side.
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.
amount
integer
The amount of the mandate.
amount_rule
*
string
If this parameter value is max, the mandated amount can be less than or equal to the specified amount. If it is set to exact, the mandated amount should be the exact amount specified.
currency
string
The currency of the mandate. Here, it is INR
.
device
object
The device details.
Show child parameters (2)
payee
object
The payee details.
Show child parameters (3)
payer
object
The payer details.
Show child parameters (1)
name
string
The name of the mandate.
expire_at
integer
The UNIX timestamp indicating the expiry date of the mandate.
block_fund
boolean
Indicates whether the customer's funds should be blocked. This is applicable only for one-time mandates. For recurring, it should always be set to false. For one-time mandates, it can be either true or false. Default is false.
true
: The customer should be blocked.false
: The customer should not be blocked.
revocable_by_payer
boolean
Indicates whether the payer can revoke the mandate. This is applicable only for one-time mandates. For recurring, it should always be set to true. For one-time mandates, it can be either true or false. Default is true.
true
: The payer can revoke the mandate.false
: The payer cannot revoke the mandate.
recurrence
object
The recurring details of the mandate.
Show child parameters (3)
validity
object
The mandate validity details.
Show child parameters (2)
upi_reference_category
string
The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values:
00
- NULL01
- Advertisement02
- Invoice
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.
description
string
The description of the mandate.
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
– SEBI02
– AMC03
– Travel04
– Hospitality05
– Hospital06
– Telecom07
– Insurance08
– Education09
– Gifting10
– BBPS11
– Global UPI12
– Metro ATM QR13
– Non-metro ATM QR14
– Standing Instruction15
– Corporate disbursement
upi_response_code
string
The response code issued by NPCI to the payer.
share_to_payee
boolean
Indicates whether the mandate is shared with the payee. This is required only for onetime mandates initiated by the payer. For recurring mandates, you must set it to true. For onetime mandates, it can be either true or false. Default is true. Possible values:
true
: Mandate is shared.false
: Mandate is not shared.
status
string
Indicates the mandate status. Possible values:
initiated
: The mandate has been created and is awaiting a status update from NPCI.active
: The mandate creation is successful. The mandate becomes active when NPCI sends a successful response in RespMandate.completed
: This is a terminal state. The mandate can be completed in two cases.- If the mandate reaches its validity end date.
- If the mandate has been revoked by a payer or a payee.
paused
: The customer has paused the mandate.failed
: The mandate creation was unsuccessful. This is a terminal state, the client has to create a new mandate if failed.
created_at
string
The UNIX timestamp at which the mandate request was created.
Create a Mandate
POST
/v1/upi/tpap/mandates
Click to copy
Payers can use this endpoint to request a mandate to the switch.
Is this page helpful?
Request Parameters
reference_id
*
string
Indicates the merchant reference identifier. In mandate, this will be a mandate id stored at the merchant side.
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.
amount
*
integer
The amount in paisa for which the mandate is requested.
amount_rule
*
string
If this parameter value is max, the mandated amount can be less than or equal to the specified amount. If it is set to exact, the mandated amount should be the exact amount specified.
currency
string
The currency of the mandate amount.
device
*
object
The device details.
Show child parameters (2)
payee
*
object
The payee details.
Show child parameters (3)
payer
*
object
The payer details.
Show child parameters (1)
name
string
The name of the mandate.
expire_at
*
integer
The UNIX timestamp indicating the time of the mandate expiration.
block_fund
boolean
Indicates whether the customer's funds should be blocked. This is applicable only for one-time mandates. For recurring, it should always be set to false. For one-time mandates, it can be either true or false. Default is false.
true
: The customer should be blocked.false
: The customer should not be blocked.
revocable_by_payer
*
boolean
Indicates whether the payer can revoke the mandate. This is applicable only for one-time mandates. For recurring, it should always be set to true. For one-time mandates, it can be either true or false. Default is true.
true
: The payer can revoke the mandate.false
: The payer cannot revoke the mandate.
recurrence
object
The recurring details of the mandate.
Show child parameters (3)
validity
*
object
The mandate validity details.
Show child parameters (2)
upi_reference_category
string
Indicates the UPI reference URL. Possible values:
00
: Default01
: Advertisement02
: Invoice
upi_reference_url
string
The invoice as sent by the merchant or a reference to the mandate in the form of a URL. If you do not pass this, a default value will be set, and the same will be populated in response.
description
string
The description of the mandate.
upi_credentials
*
string
The encrypted UPI credentials with the user's MPIN.
upi_initiation_mode
*
string
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
string
The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values:
01
– SEBI02
– AMC03
– Travel04
– Hospitality05
– Hospital06
– Telecom07
– Insurance08
– Education09
– Gifting10
– BBPS11
– Global UPI12
– Metro ATM QR13
– Non-metro ATM QR14
– Standing Instruction15
– Corporate disbursement
share_to_payee
boolean
Indicates whether the mandate is shared with the payee. This is required only for onetime mandates initiated by the payer. For recurring mandates, you must set it to true. For onetime mandates, it can be either true or false. Default is true. Possible values:
true
: Mandate is shared.false
: Mandate is not shared.
Response Parameters
entity
string
The entity type.
umn
string
The Unique Mandate Number, assigned to each mandate, used to track, manage, and reference specific mandates. The switch will create a UUID-based UMN of 32 characters. The UMN should be random, non-guessable and active. For example, XYZa977ccabb11e7abc4cec278b6b50a@mypsp
. The total length of the UMN address should be 70digit.
reference_id
string
Indicates the merchant reference ID. In mandates, it is mandate id stored at the merchant side.
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.
amount
integer
The amount of the mandate.
amount_rule
*
string
If this parameter value is max, the mandated amount can be less than or equal to the specified amount. If it is set to exact, the mandated amount should be the exact amount specified.
currency
string
The currency of the mandate. Here, it is INR
.
device
object
The device details.
Show child parameters (2)
payee
object
The payee details.
Show child parameters (3)
payer
object
The payer details.
Show child parameters (1)
name
string
The name of the mandate.
expire_at
integer
The UNIX timestamp indicating the expiry date of the mandate.
block_fund
boolean
Indicates whether the customer's funds should be blocked. This is applicable only for one-time mandates. For recurring, it should always be set to false. For one-time mandates, it can be either true or false. Default is false.
true
: The customer should be blocked.false
: The customer should not be blocked.
revocable_by_payer
boolean
Indicates whether the payer can revoke the mandate. This is applicable only for one-time mandates. For recurring, it should always be set to true. For one-time mandates, it can be either true or false. Default is true.
true
: The payer can revoke the mandate.false
: The payer cannot revoke the mandate.
recurrence
object
The recurring details of the mandate.
Show child parameters (3)
validity
object
The mandate validity details.
Show child parameters (2)
upi_reference_category
string
The 2-digit code defined by NPCI present in the intent URL or QR codes. Possible values:
00
- NULL01
- Advertisement02
- Invoice
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.
description
string
The description of the mandate.
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
– SEBI02
– AMC03
– Travel04
– Hospitality05
– Hospital06
– Telecom07
– Insurance08
– Education09
– Gifting10
– BBPS11
– Global UPI12
– Metro ATM QR13
– Non-metro ATM QR14
– Standing Instruction15
– Corporate disbursement
upi_response_code
string
The response code issued by NPCI to the payer.
share_to_payee
boolean
Indicates whether the mandate is shared with the payee. This is required only for onetime mandates initiated by the payer. For recurring mandates, you must set it to true. For onetime mandates, it can be either true or false. Default is true. Possible values:
true
: Mandate is shared.false
: Mandate is not shared.
status
string
Indicates the mandate status. Possible values:
initiated
: The mandate has been created and is awaiting a status update from NPCI.active
: The mandate creation is successful. The mandate becomes active when NPCI sends a successful response in RespMandate.completed
: This is a terminal state. The mandate can be completed in two cases.- If the mandate reaches its validity end date.
- If the mandate has been revoked by a payer or a payee.
paused
: The customer has paused the mandate.failed
: The mandate creation was unsuccessful. This is a terminal state, the client has to create a new mandate if failed.
created_at
string
The UNIX timestamp at which the mandate request was created.
Curl
1curl -X POST 'api.rzp.<bank>.com/v1/upi/tpap/mandates' \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": "TXN1234567",9"upi_transaction_id": "RZP1KuSUGrp2l6MmPuT0163789452QPAY02",10"amount": 1722,11"amount_rule": "exact | max",12"currency": "inr",13"device": {14"geocode": "1234.1213",15"ip": "198.1.1.1"16},17"payee": {18"vpa": "swiggy@rzp",19"name": "Swiggy Pvt. Ltd.",20"mcc": "6765"21},22"payer": {23"vpa": "7262093972.stage@rzp",24"fundsource": {25"id": "fs_1234567"26}27},28"name": "Name of the Mandate",29"expire_at": 1722317078,30"block_fund": false,31"revocable_by_payer": true,32"recurrence": {33"period": "onetime|daily|weekly|fortnightly|monthly|bimonthly|quarterly|halfyearly|yearly|aspresented",34"rule": "on | before | after",35"value": 136},37"validity": {38"start_at": 1722317078,39"end_at": 172231707840},41"upi_reference_category": "02",42"upi_reference_url": "https://www.abcxyz.com/",43"description": "Sample Mandate Request",44"upi_credentials": {},45"upi_initiation_mode": "00",46"upi_purpose_code": "00",47"share_to_payee": true48}'
Success
Failure
1{2"entity":"upi.mandate",3"umn":"umn",4"reference_id":"TXN1234567",5"upi_transaction_id":"RZP1KuSUGrp2l6MmPuT0163789452QPAY02",6"amount":1722,7"amount_rule":"exact | max",8"currency":"inr",9"device":{10"geocode":"1234.1213",11"ip":"198.1.1.1"12},13"payee":{14"vpa":"swiggy@rzp",15"name":"Swiggy Pvt. Ltd.",16"mcc":"6765"17},18"payer":{19"vpa":"7262093972.stage@rzp"20},21"name":"Name of the Mandate",22"expire_at":1722317078,23"block_fund":false,24"revocable_by_payer":true,25"recurrence":{26"period":"onetime|daily|weekly|fortnightly|monthly|bimonthly|quarterly|halfyearly|yearly|aspresented",27"rule":"on | before | after",28"value":129},30"validity":{31"start_at":1722317078,32"end_at":172231707833},34"upi_reference_category":"02",35"upi_reference_url":"https://www.abcxyz.com/",36"description":"Sample Mandate Request",37"upi_initiation_mode":"00",38"upi_purpose_code":"00",39"upi_response_code":"00",40"share_to_payee":true,41"status":"initiated",42"created_at":172231707843}