curl --request POST \
--url https://api.example.com/api/v1/payments/webhook \
--header 'Content-Type: application/json' \
--data '
{
"transactionId": "<string>",
"status": "<string>",
"phoneNumber": "<string>",
"amount": "<string>",
"description": "<string>"
}
'{
"status": "<string>",
"transaction_id": "<string>",
"error": "<string>"
}Webhook endpoint for Africa’s Talking payment notifications
curl --request POST \
--url https://api.example.com/api/v1/payments/webhook \
--header 'Content-Type: application/json' \
--data '
{
"transactionId": "<string>",
"status": "<string>",
"phoneNumber": "<string>",
"amount": "<string>",
"description": "<string>"
}
'{
"status": "<string>",
"transaction_id": "<string>",
"error": "<string>"
}application/x-www-form-urlencoded form data with the following fields:
Success - Payment completed successfullyFailed - Payment failedwebhook_processed - Successfully processedwebhook_error - Error occurred during processingwebhook_error)curl -X POST https://api.voicepact.com/api/v1/payments/webhook \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "transactionId=ATXid_sample123456789" \
-d "status=Success" \
-d "phoneNumber=+254712345678" \
-d "amount=5000.0"
curl -X POST https://api.voicepact.com/api/v1/payments/webhook \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "transactionId=ATXid_sample123456789" \
-d "status=Failed" \
-d "phoneNumber=+254712345678" \
-d "amount=5000.0" \
-d "description=Insufficient funds"
{
"status": "webhook_processed",
"transaction_id": "ATXid_sample123456789"
}
LOCKED in databaseconfirmed_at timestamp set to current UTC timeFAILED in databasedescription fieldhttps://api.voicepact.com/api/v1/payments/webhook