/

to search

Introducing Setu Changelog Check it out ↗

#Send a pre debit notification

PREREQUISITES 

🌟 Create one time mandate ↗

Pre debit notification is not needed if blockFunds is set as true while creating the mandate.


Once the mandate is LIVE the merchant needs to send a pre debit notification 48 - 72 Hrs before debit / execution to let the customer be notified of the upcoming debit.

The process for mandate pre debit notification is described in the below diagram:

Bridge

The merchant will have to call the send mandate pre debit notification API with the correct set of parameters.

Staging hosthttps://umap.setu.co/api
MethodPOST
Path/v1/merchants/mandates/{mandateId}/notify
HeadermerchantId
Authorization: Bearer <insert_token_here>. Generate this token using OAuth.

Content-Type—will be application/json
Sample request
{
"amount": 1000,
"executionDate": "04012006",
"merchantReferenceId": "ABC1234789",
"sequenceNumber": 1,
"umn": "setumandate1234789@ybl"
}

Request body parameter values for sending pre debit notification for a one time mandate

parametervalue
amountmust be as per the amountRule and maxAmountLimit configured while creating the mandate
executionDatemust be 48 - 72 Hrs ahead of current time
sequenceNumber1
umncan be derived from the notifications received by the merchant during mandate creation flow or via check mandate status API
Sample response
{
"amount": 1000,
"createdAt": "2023-09-04T12:08:20+0530",
"executionDate": "04012006",
"id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
"mandateId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
"merchantId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
"merchantReferenceId": "ABC1234789",
"sequenceNumber": 1,
"status": "pending",
"txnId": "BTTZrc5gDFkuCr3n3I0ey4aNtzLOLR7K7aR",
"umn": "c27f5fc30d344e9594fce0afa34f8859@mypsp"
}

In the above response:

  • id is a unique ID that is associated with this mandate pre debit notification and can be used to track it later.

To know more about all the API params, please refer to the API documentation here.

UPI Setu will send notifications to the merchant for the following events:

  • mandate_operation.notify.success (if mandate pre debit notification is successful)
  • mandate_operation.notify.failed (if mandate pre debit notification fails)

Read more about mandate pre debit notification operation notifications here

In addition to the notifications, the merchant can also use check mandate pre debit notification status API to check if pre debit notification is successful

Please refer to the Document Reference section for checking the API reference and the notifications.


#Check mandate pre debit notification status

In addition to the notifications sent by UPI Setu, Merchant can use this API to check the status of a mandate pre debit notification.

Staging hosthttps://umap.setu.co/api
MethodGET
Path/v1/merchants/mandate-pre-debit-notifications/{id}
HeadermerchantId
Authorization: Bearer <insert_token_here>. Generate this token using OAuth.

Content-Type—will be application/json
Sample response
{
"amount": 1000,
"createdAt": "2023-09-04T12:08:20+0530",
"executionDate": "04012006",
"id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
"mandateId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
"merchantId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
"merchantReferenceId": "ABC1234789",
"sequenceNumber": 1,
"status": "success",
"txnId": "BTTZrc5gDFkuCr3n3I0ey4aNtzLOLR7K7aR",
"umn": "c27f5fc30d344e9594fce0afa34f8859@mypsp"
}
In the above response:
  • id is a unique ID that is associated with this mandate pre debit notification and can be used to track it later.

To know more about all the API params, please refer to the API documentation here.