Use the CancelRequest endpoint to send request to cancel pending transaction.
You can only request cancellation for a pending transaction that has the following in the description:
- Wrong bank account/wallet.
- Restricted/Dormant account: Account cannot receive payment.
Syntax
POST https://nairagrambasket.com/api/cancelRequest
Response Codes
The following table lists the status codes that are returned in response to the CancelRequest.
Code | Status |
---|---|
200 | Completed |
201 | Your cancellation request has been Submitted. We will update you status shortly. |
202 | The transaction is already canceled |
203 | Cancel request is less than the time specified |
Input Parameters
The following table lists the parameters that you need to provide in the CancelTransaction request.
Field | Value Format | Required/Optional | Description |
---|---|---|---|
username | yourmail@mail.com | Required | Input the valid email address that you submitted to your Partner Company. |
password | yourPassword | Required | Input your secure password. |
secretKey | yourSecretKey | Required | Input the API key provided to you by your Partner Company. |
transaction_pin | NGN########### | Optional | Input the transaction PIN returned from the SubmitTransaction or Submit WalletTransaction request. |
Sample Request
curl --location --request POST 'https://nairagrambasket.com/api/cancelRequest' \
--form 'username="yourmail@mail.com"' \
--form 'password="yourPassword"' \
--form 'secretKey="yourSecretKey"' \
--form 'transaction_pin="NGN###########"'
Sample Response
Code: 200
Message: Canceled
Content:{
transaction_pin: NGN##########,
transaction_status: “Transaction is canceled”
}
Code: 201,
"Message": "Your cancelation request has been Submitted. We will update you status shortly.",
"Content": {
"transaction_pin": "XOF##########",
"transaction_ref": "pt1##########",
"cancelation_request_code": "cancel########",
"transaction_status": "pending",
"description": "your cancellation request has been sent successfully"
}
Code: 202
Message: Transaction is already canceled
Content:{
transaction_pin: NGN##########,
transaction_status: “Transaction is already canceled”
}
Code: 203
Message: Cancel request is less than the time specified
Content:{
transaction_pin: NGN##########,
transaction_status: “Cancel request is less than the time specified”
}