/

to search

Introducing Setu Changelog Check it out ↗

#Create collect request

This API can be used to create a collect request that initiates a UPI transaction on the user's UPI app by taking vpa as an input.

Staging hosthttps://umap.setu.co/api
MethodPOST
Path/v1/merchants/collect
HeadermerchantId
Authorization: Bearer <insert_token_here>. Generate this token using OAuth or JWT.

Content-Type—will be application/json
API referenceCreate collect request ↗
Sample request
{
"amount": 10000,
"currency": "INR",
"customerVpa": "ram@okhdfc",
"expireAfter": 2,
"merchantReferenceId": "1240689979139556557",
"merchantVpa": "fastestupi@pineaxis",
"metadata": {
"InvoiceNumber": "INV-21-12-009"
},
"productConfigId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
"transactionNote": "testcollect"
}
  • productConfigId is an optional field.
Sample response
{
"amount": 10000,
"createdAt": "2023-09-04T12:08:20+0530",
"currency": "INR",
"customerVpa": "ram@okhdfc",
"expireAfter": 2,
"id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
"merchantId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
"merchantReferenceId": "1240689979139556557",
"merchantVpa": "fastestupi@pineaxis",
"metadata": {
"InvoiceNumber": "INV-21-12-009"
},
"productConfigId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
"refId": "1240689979139556558",
"status": "active",
"transactionNote": "testcollect"
}

#Check collect request status

Since collect request directly initiates a transaction on customer's UPI app. The collect request status can also be used to check status of both the transaction and the collect request itself.

Staging hosthttps://umap.setu.co/api
MethodGET
Path/v1/merchants/collect/{id}
HeadermerchantId
Authorization: Bearer <insert_token_here>. Generate this token using OAuth or JWT.

Content-Type—will be application/json
API referenceCheck collect request status ↗
Sample response
{
"amount": 10000,
"closedAt": "2023-09-04T12:08:20+0530",
"createdAt": "2023-09-04T12:08:20+0530",
"currency": "INR",
"customerVpa": "ram@okhdfc",
"expireAfter": 2,
"id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
"merchantId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
"merchantReferenceId": "1240689979139556557",
"merchantVpa": "fastestupi@pineaxis",
"metadata": {
"InvoiceNumber": "INV-21-12-009"
},
"productConfigId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
"reason": {
"code": "unable-to-fulfill-request",
"desc": "unable-to-fulfill-request",
"npciErrCode": "YG",
"npciErrDesc": "MERCHANT ERROR (PAYEE PSP)",
"npciRespCode": "YG",
"npciRespDesc": "MERCHANT ERROR (PAYEE PSP)"
},
"refId": "1240689979139556558",
"status": "active",
"transactionNote": "testcollect"
}


Was this page helpful?