UPI Setu

Update

API Playground

Updating a mandate

PREREQUISITES 

🌟 UPI mandates generic operations ↗

There are only two updates possible on a UPI mandate

  • Changing the mandate end date
  • Changing the mandate amount

An intent based mandate can only be updated via an intent link / qr and a collect based mandate can only be updated via collect flow

The process for updating an intent based mandate is described in the below diagram The merchant will have to call the modify mandate API with the correct set of parameters.

Staging hosthttps://umap.setu.co/api
MethodPUT
Path/v1/merchants/mandates/{mandateId}/modify
Header

merchantId
Authorization: Bearer < insert_token_here>. Generate this token using OAuth.

Content-Type—will be application/json

Sample request
{
        "amountLimit": 1000,
        "endDate": "02012006",
        "expireAfter": 120,
        "merchantReferenceId": "ABC1234789"
}

endDate cannot be updated for a single block multi debit mandate

Sample response
{
        "amountLimit": 1000,
        "endDate": "02012006",
        "expireAfter": 120,
        "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
        "intentLink": "upi://mandate?pa=deku040920232@pineaxis&validitystart=31121995&validityend=02012006&am=10.00&amrule=max&recur=one%20time&cu=INR&mc=1234&mode=01&purpose=14&rev=Y&block=N&txnType=UPDATE&umn=SETUS7mxYHK1A6yXhxJsoKM7yxKqC2r0&tid=SETM3Iij4WQrtEUbOUFkTpQp2EpR5wqy5Ou",
        "mandateId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
        "merchantId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
        "merchantReferenceId": "ABC1234789",
        "mode": "qr",
        "status": "pending",
        "txnId": "BTTZrc5gDFkuCr3n3I0ey4aNtzLOLR7K7aR",
        "umn": "c27f5fc30d344e9594fce0afa34f8859@mypsp"
}

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

Post this, once the customer clicks on the intent link / scans the qr code and enters the mPIN, the merchant will receive webhooks for following events:

  • mandate_operation.update.initiated
  • mandate.updated (if mandate update is successful)

  • mandate_operation.update.success (if mandate update is successful)

  • A mandate status notification to indicate current mandate status (if mandate update fails) (Example: mandate.live if mandate is in live state)

  • mandate_operation.update.failed (if mandate update fails)

Read more about mandate status notifications here and mandate update operation notifications here In addition to the notifications, the merchant can also use check mandate operation status API to check if mandate update is successful
Please refer to the Document Reference section for checking the API reference and the notifications.

The process for updating a collect based mandate is described in the below diagram The merchant will have to call the modify mandate API with the correct set of parameters.

Staging hosthttps://umap.setu.co/api
MethodPUT
Path/v1/merchants/mandates/{mandateId}/modify
Header

merchantId
Authorization: Bearer < insert_token_here>. Generate this token using OAuth.

Content-Type—will be application/json

Sample request
{
        "amountLimit": 1000,
        "endDate": "02012006",
        "expireAfter": 120,
        "merchantReferenceId": "ABC1234789"
}
Sample response
{
        "amountLimit": 1000,
        "endDate": "02012006",
        "expireAfter": 120,
        "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
        "mandateId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
        "merchantId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
        "merchantReferenceId": "ABC1234789",
        "mode": "collect",
        "status": "initiated",
        "txnId": "BTTZrc5gDFkuCr3n3I0ey4aNtzLOLR7K7aR",
        "umn": "c27f5fc30d344e9594fce0afa34f8859@mypsp"
}

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

Post this, once the customer clicks on the update mandate notification and enters the mPIN on their UPI app, the merchant will receive webhooks for the following events:

  • mandate.updated (if mandate update is successful)

  • mandate_operation.update.success (if mandate update is successful)

  • A mandate status notification to indicate current mandate status (if mandate update fails) (Example: mandate.live if mandate is in live state)

  • mandate_operation.update.failed (if mandate update fails)

Read more about mandate status notifications here and mandate update operation notifications here In addition to the notifications, the merchant can also use check mandate operation status API to check if mandate update is successful
Please refer to the Document Reference section for checking the API reference and the notifications.


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

Staging hosthttps://umap.setu.co/api
MethodGET
Path/v1/merchants/mandate-operations/{id}
Header

merchantId
Authorization: Bearer <insert_token_here >. Generate this token using OAuth.

Content-Type—will be application/json

Sample response
{
  "amountLimit": 1000,
  "createdAt": "2023-09-04T12:08:20+0530",
  "endDate": "02012006",
  "expireAfter": 120,
  "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
  "mandateId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
  "merchantId": "01ARZ3NDEKTSV4RRFFQ69G5FAV",
  "merchantReferenceId": "ABC1234789",
  "mode": "collect",
  "status": "success",
  "txnId": "BTTZrc5gDFkuCr3n3I0ey4aNtzLOLR7K7aR",
  "type": "update",
  "umn": "c27f5fc30d344e9594fce0afa34f8859@mypsp"
}
In the above response:
  • id is a unique ID that is associated with this mandate update operation and can be used to track it later.

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

On this page