Skip to main content

Webhook for Payment Processing

POST /payments/webhook/{paymentmethod}

Description

Receive webhook notifications for payment processing events based on the specified payment method.

Path Parameters

NameTypeDescription
paymentmethod*string(Required). Identifier for the payment method. Include in the request path.

Request Body

  • Media Type: application/json
NameTypeDescription
merchantRef*string(Required). Merchant reference identifier.
token*string(Required). Token associated with the transaction.
transactionRef*string(Required). Reference for the transaction.
retrievalReferencestring(Optional). Retrieval reference for the transaction.
responseMsgstring(Optional). Response message for the transaction.
tnxIdstring(Optional). Transaction ID.
TransactionIdstring(Optional). Alternate Transaction ID.
TraceIdstring(Optional). Trace ID for the transaction.
Amountnumber(Optional). Transaction amount.
ResponseCodestring(Optional). Response code for the transaction.
ResponseMessagestring(Optional). Response message for the transaction.

Example

Request Body

{
"merchantRef": "ABC123",
"token": "token_123",
"transactionRef": "trans_ref_456",
"retrievalReference": "retrieval_ref_789",
"responseMsg": "Success",
"tnxId": "tnx_789",
"TransactionId": "trans_id_123",
"TraceId": "trace_id_456",
"Amount": 100.50,
"ResponseCode": "200",
"ResponseMessage": "Transaction processed successfully"
}

Try it yourself

cURL

curl --location --globoff 'http://20.87.230.105/platform/wallets/payments/webhook/{paymentmethod}' \
--header "apiKey: yourApiKey" \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer yourAccessToken" \
--data '{
"merchantRef": "ABC123",
"token": "token_123",
"transactionRef": "trans_ref_456",
"retrievalReference": "retrieval_ref_789",
"responseMsg": "Success",
"tnxId": "tnx_789",
"TransactionId": "trans_id_123",
"TraceId": "trace_id_456",
"Amount": 100.50,
"ResponseCode": "200",
"ResponseMessage": "Transaction processed successfully"
}'

Successful Response Properties

{
"status": true,
"statusCode": 0,
"message": "Resource retrieved successfully.",
"data": {
"resourceId": 123,
"name": "Example Resource"
},
"errors": []
}

Error Response

{
"status": false,
"statusCode": 404,
"message": "Resource not found.",
"data": {},
"errors": [
{
"message": "Resource with ID 123 not found.",
"descriptiveMessage": "The requested resource does not exist."
}
]
}

Method: POST

>http://20.87.230.105/platform/wallets//payments/webhook/{paymentmethod}

Headers

Content-TypeValue
apiKey{{apiKey}}

Body (raw)

{}

🔑 Authentication bearer

ParamvalueType
token{{accessCode}}string

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request POST \ 
--url /payments/webhook/{paymentmethod} \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!