Create Webhook
POST /webhooks
Description
Create a new webhook.
Path Parameters
| Name | Type | Description |
|---|---|---|
| None | No parameters |
Request Headers
| Name | Type | Description |
|---|---|---|
authorization | string | Authorization token (header) |
Request Body
- Content Type:
application/json
{
"reference": "string",
"currency": "string",
"amount": 0,
"fee": 0,
"status": "string",
"transactionType": "string",
"narration": "string",
"destination": "string",
"trnxId": "string",
"transaction_date": "string"
}
Example
POST /webhooks
Content-Type: application/json
authorization: string
{
"reference": "ref123",
"currency": "USD",
"amount": 100,
"fee": 2,
"status": "completed",
"transactionType": "payment",
"narration": "Payment for services",
"destination": "dest456",
"trnxId": "txn789",
"transaction_date": "2024-07-09T12:34:56Z"
}
Response Code: 200 - OK
Description
Request received successfully.
Response Fields
| Field | Type | Description |
|---|---|---|
| transactionreference | string | Transaction reference |
| status | string | Status of the request |
| status_desc | string | Description of the status |
Example
{
"transactionreference": "ref123",
"status": "completed",
"status_desc": "Transaction completed successfully"
}
Headers
| Content-Type | Value |
|---|---|
| apiKey | {{apiKey}} |
| authorization | string |
Body
{
"reference": "ref123",
"currency": "USD",
"amount": 100,
"fee": 2,
"status": "completed",
"transactionType": "payment",
"narration": "Payment for services",
"destination": "dest456",
"trnxId": "txn789",
"transaction_date": "2024-07-09T12:34:56Z"
}
🔑 Authentication bearer
| Param | Value | Type |
|---|---|---|
| token | {{accessCode}} | string |
LANGUAGE
CURL REQUEST
curl --request POST \
--url /webhooks \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!