Authorization Flow
Understand how customers authorize direct payments on their device and how your server receives the outcome.
Authorization Flow
After you call Initiate Direct Payment, ePay pushes an authorization prompt to the customer's phone. No additional API call is required from your server — authorization is handled entirely by the customer on their device.
- Your server calls
POST /v1/transactions/directand receives areference. - ePay pushes an authorization prompt to the customer's phone via USSD, SMS OTP, or in-app notification.
- The customer enters their PIN or approves in the provider app.
- ePay delivers the outcome (
payment.successorpayment.failed) to your webhook.
Authorization Channels
The channel used depends on your configured flowCode or the provider's default:
Prop
Type
Receiving the Outcome
ePay delivers the payment result to your webhook URL once the customer authorizes (or declines). See Webhooks for the full event schema.
Successful payment webhook:
{
"event": "payment.success",
"reference": "A3BX72KP",
"merchantReference": "order_456",
"amount": "250.00",
"currency": "ETB",
"customerPhone": "+251911234567",
"pspCode": "TELEBIRR",
"occurredAt": "2026-10-12T09:15:00.000Z"
}Failed payment webhook:
{
"event": "payment.failed",
"reference": "A3BX72KP",
"merchantReference": "order_456",
"reason": "Customer cancelled",
"occurredAt": "2026-10-12T09:16:30.000Z"
}Polling (Alternative to Webhooks)
If you cannot receive webhooks, poll the verify endpoint until the status changes from pending:
curl https://api.epayet.dev/v1/transactions/A3BX72KP/verify \
-H "Authorization: Bearer sk_live_your_key_here"Webhooks are strongly preferred over polling. Poll no more than once every 5
seconds and stop after the transaction leaves pending status.
Transaction Lifecycle
| Status | Meaning |
|---|---|
pending | Prompt sent, awaiting customer action |
completed | Customer authorized, funds settled |
failed | Customer declined, timed out, or insufficient funds |
cancelled | Cancelled by your server before authorization |
Next: Payment SMS Link — send a payment link to a customer via SMS.