Dynamic QR
Create a dynamic QR
The merchant will have to call the create dqr API with the correct set of parameters.
| Host | https://umap.setu.co/api |
|---|---|
| Method | POST |
| Path | /v1/merchants/dqr |
| Header |
|
| API reference | Create a dynamic QR ↗ |
Request payload
{
"amount": 10000,
"merchantVpa": "fastestupi@pineaxis",
"expiryDate": "2023-09-04T12:08:20+0530",
"referenceId": "1240689979139556557",
"metadata": {
"InvoiceNumber": "INV-21-12-009"
},
"transactionNote": "testpay"
}Both amount and minAmount fields are optional, these fields when passed in the request change the behavior of how they are rendered on a Payer PSP
When only
amountis passed— the amount passed in the request will be displayed on the payment page of the Payer PSP, but customer will not be allowed to choose any amount- When only
minAmountis passed- the customer will be allowed to choose the amount to pay, it should be more than the minimum amount
- When both
amountandminAmountare passed- the amount passed in the request payload is displayed in the payment page of the Payer PSP, and the customer will be allowed to choose the payment amount
Response payload
{
"id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
"amount": 10000,
"createdAt": "2023-09-04T12:08:20+0530",
"expiryDate": "2023-09-04T12:08:20+0530",
"intentLink": "upi://pay?pa=test-auto-pgruosncak@okokax...",
"merchantId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
"referenceId": "1240689979139556557",
"merchantVpa": "fastestupi@pineaxis",
"metadata": {
"InvoiceNumber": "INV-21-12-009",
}
"refId": "1240689979139556558",
"shortLink": "upipay.setu.co/Np3KnBCM8Om0",
"status": "active",
"transactionNote": "testpay"
}Fetch dqr by id (check status)
This API fetches status of the payment-link itself, not the payment done using it
The merchant can also get the payment link status by payment link id by calling fetch dqr by id API which can be used for debugging or knowing if payment link is active, inactive or expired.
| Host | https://umap.setu.co/api |
|---|---|
| Method | GET |
| Path | /v1/merchants/dqr/{id} |
| Header |
|
| API reference | Fetch dqr by id ↗ |
Response body
{
"amount": 10000,
"expiryDate": "2023-09-04T12:08:20+0530",
"id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
"intentLink": "upi://pay?pa=test-auto-pgruosncak@pineaxis&pn=merchant-4&am=100.00&tr=SU1240659756905923780&tn=sample%20single%20use%20qr&cu=INR&mc=1234",
"merchantId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
"merchantReferenceId": "1240689979139556557",
"merchantVpa": "fastestupi@pineaxis",
"metadata": {
"InvoiceNumber": "INV-21-12-009"
},
"minAmount": 100,
"reason": {
"code": "success",
"desc": "payment succesful",
"npciRespCode": "00"
},
"refId": "1240689979139556558",
"shortLink": "upipay.setu.co/Np3KnBCM8Om0",
"status": "active",
"transactionNote": "testpay",
"closedAt": "2023-09-04T12:08:20+0530",
"createdAt": "2023-09-04T12:08:20+0530"
}cURL request
curl --request GET \
--url https://umap-uat-core.setu.co/api/v1/merchants/dqr/01ARZ3NDEKTSV4RRFFQ69G5FAV \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'merchantId: 01ARZ3NDEKTSV4RRFFQ69G5FAV'