Get transaction rejection reason details
This GET API will provide the “reject reason” for a user submitted transaction.
When the user submits a transaction, it goes through one or many levels of approvals before the transactions is processed and settled.
In this approval process, the transaction may get rejected. If a transaction is rejected you will get a webhook response that “<transaction-id>” has been rejected.
If you would like to get the rejection reason, you may use this GET call to provide the transactionId and receive the reject reason description.
/GetTransactionRejectReason
import requests
url = “https://stageapi.cfsemoney.com/v1/GetTransactionRejectReason?transactionId=xxxxxxxxxxxxxxxxxxxx”
payload={}
headers = {
‘x-api-key’: ‘YOUR-API-KEY‘,
‘Authorization’: ‘Bearer <<bearer-token>>‘,
}
response = requests.request(“GET”, url, headers=headers, data=payload)
print(response.text)
curl –location –request GET ‘https://stageapi.cfsemoney.com/v1/GetTransactionDetails?userTransactionId=XXXXXXXXXXXXXX’ \
–header ‘x-api-key: ‘YOUR-API-KEY‘
–header ‘Authorization: Bearer <<bearer-token>>‘
{
”statusCode”: 200,
”body”: ”{\”data\”: [{\”rejectReason\”: \”sample reject reason\”}], \”status\”: true}”
}
{
“statusCode”: 400,
“body”: “{\”message\”: \”xxx”}”
}