Mandate Execution API

Purpose : This Mandate Execution API is used to manually trigger the execution of a mandate.

  • If autoExecute = false in the Notify API, the mandate is not executed automatically.
  • The merchant can use this API to manually trigger the mandate execution.

Request Type : POST

Endpoint : /api/payments/v1/modify

Request Attributes

These are the Request Attributes of the Execute Mandate API.

FieldTypeMandatoryDescription
txnIdStringYesUnique transaction identifier
operationTypeStringYesValue would be "EXECUTE_MANDATE"
dataObjectYesAdditional information
data.mandateParentOrderIdStringYesParent OrderId for the Mandate

Response Attributes

These are the Response Attributes of the Execute Mandate API

FieldData TypeDescription
successBooleanIndicates whether the API request was processed successfully.
messageObjectContains the response message details.
message.codeStringResponse code indicating the result of the transaction/request.
message.textStringDescriptive message explaining the response status.
dataObjectContains the transaction-related information.
data.txnIdStringUnique transaction ID assigned to the transaction.
data.statusStringCurrent transaction status. Possible values: PENDING, SUCCESS, FAILED.

Sample Request & Response

For reference, below are the sample CURL request and Response of API . It takes all required attributes to hit the Execute Mandate API.

Sample Curl Request

curl --location 'https://api.zaakpay.com/api/payments/v1/modify' \
--header 'Content-Type: application/json' \
--header 'checksum: <HMAC_OF_REQUEST_BODY_WITH_MERCHANT_SECRET>' \
--data '{
 "txnId": "TXN_123456789",
 "operationType": "EXECUTE_MANDATE",
 "data": {
   "mandateParentOrderId": "orderid3110",
  }
}'

Sample Request

{
    "txnId": "TXN_123456789",
    "operationType" : "EXECUTE_MANDATE"
    "data": {
          "mandateParentOrderId": "orderid3110"
    }
}

Sample Response

The Response will be in JSON Format

{
    "success": true,
    "message": {
        "code": "100",
        "text": "The transaction was completed successfully."
    },
    "data": {
        "txnId": "TXN_123456789",
        "status": "PENDING|SUCCESS|FAILED"
    }
}

Response Codes

HTTPsuccessmessage.codemessage.textWhen
200true100The transaction was completed successfully.Capture submitted
200false180Checksum received with request is not equal to what we calculated.Invalid checksum
200false183Unfortunately, the transaction has failed.Please try again.Something went wrong
200false216Order Id not found.No orderId found to be captured
200false423Invalid operation type sent with the requestInvalid operation type sent with the request

NOTE

  • All responses return HTTP 200 OK. Clients should use the success flag and message.code to determine the operation outcome.
  • The checksum request header is mandatory.
  • OrderId / TxnId uniquely identifies the transaction to be modified.
  • Checksum will be calculated on request-body using merchant secret-key

Did this page help you?