Webhook for Payment Processing
POST /payments/webhook/{paymentmethod}
Description
Receive webhook notifications for payment processing events based on the specified payment method.
Path Parameters
| Name | Type | Description |
|---|---|---|
| paymentmethod* | string | (Required). Identifier for the payment method. Include in the request path. |
Request Body
- Media Type:
application/json
| Name | Type | Description |
|---|---|---|
| merchantRef* | string | (Required). Merchant reference identifier. |
| token* | string | (Required). Token associated with the transaction. |
| transactionRef* | string | (Required). Reference for the transaction. |
| retrievalReference | string | (Optional). Retrieval reference for the transaction. |
| responseMsg | string | (Optional). Response message for the transaction. |
| tnxId | string | (Optional). Transaction ID. |
| TransactionId | string | (Optional). Alternate Transaction ID. |
| TraceId | string | (Optional). Trace ID for the transaction. |
| Amount | number | (Optional). Transaction amount. |
| ResponseCode | string | (Optional). Response code for the transaction. |
| ResponseMessage | string | (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-Type | Value |
|---|---|
| apiKey | {{apiKey}} |
Body (raw)
{}
🔑 Authentication bearer
| Param | value | Type |
|---|---|---|
| token | {{accessCode}} | string |
LANGUAGE
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!