Why Use Checkout API?
- • Quick integration with one API call
- • Security and compliance handled by Afropay
- • Mobile-optimized customer experience
- • Multi-provider coverage in one flow
Supported Payment Methods
| Provider | Country | Currency |
|---|---|---|
| Telebirr | Ethiopia | ETB |
| CBE Birr | Ethiopia | ETB |
| M-Pesa | Ethiopia | ETB |
| Yaya Wallet | Ethiopia | ETB |
| Awash Birr | Ethiopia | ETB |
Create Transaction
POST/api/v1/Transaction/CreateTransaction
| Field | Type | Required | Description |
|---|---|---|---|
| description | string | Yes | Payment description |
| amount | number | Yes | Payment amount |
| currency | string | Yes | Currency code |
| phone | string | Yes | Customer phone with country code |
| MerchantOrderId | string | Yes | Unique order id |
| callbackUrl | string | Yes | Webhook callback URL |
| cancelRedirectUrl | string | No | Redirect on cancel |
| failedRedirectUrl | string | No | Redirect on fail |
| complitedUrl | string | No | Redirect on completion |
| order.items | array | Yes | Order line items collection |
| order.items[].itemName | string | Yes | Item name |
| order.items[].price | number | Yes | Item price |
| order.items[].quantity | number | Yes | Item quantity |
curl --location '{{baseUrl}}api/v1/Transaction/CreateTransaction' \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: YOUR_API_KEY' \
--data '{
"description": "Payment for ticket",
"amount": 1,
"currency": "ETB",
"phone": "251...",
"MerchantOrderId": "TXN29224...",
"callbackUrl": "https://yourapp.com/payment/callback",
"order": {
"items": [
{
"itemName": "Conference Ticket",
"price": 1,
"quantity": 1
}
]
}
}'Integration Flow
- 1
Create Checkout Session
Make a POST request to /Transaction/CreateTransaction with payment details.
- 2
Redirect Customer
Send customer to the paymentUrl returned in API response.
- 3
Customer Completes Payment
Customer chooses preferred method and authorizes payment.
- 4
Receive Callback and Redirect
Afropay sends webhook status and redirects customer to your configured URLs.