Search routes

Search major documentation and API reference routes.

Getting Started

Checkout API

Hosted checkout that supports multiple payment providers through one transaction API.

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

ProviderCountryCurrency
TelebirrEthiopiaETB
CBE BirrEthiopiaETB
M-PesaEthiopiaETB
Yaya WalletEthiopiaETB
Awash BirrEthiopiaETB

Create Transaction

POST/api/v1/Transaction/CreateTransaction
FieldTypeRequiredDescription
descriptionstringYesPayment description
amountnumberYesPayment amount
currencystringYesCurrency code
phonestringYesCustomer phone with country code
MerchantOrderIdstringYesUnique order id
callbackUrlstringYesWebhook callback URL
cancelRedirectUrlstringNoRedirect on cancel
failedRedirectUrlstringNoRedirect on fail
complitedUrlstringNoRedirect on completion
order.itemsarrayYesOrder line items collection
order.items[].itemNamestringYesItem name
order.items[].pricenumberYesItem price
order.items[].quantitynumberYesItem 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. 1

    Create Checkout Session

    Make a POST request to /Transaction/CreateTransaction with payment details.

  2. 2

    Redirect Customer

    Send customer to the paymentUrl returned in API response.

  3. 3

    Customer Completes Payment

    Customer chooses preferred method and authorizes payment.

  4. 4

    Receive Callback and Redirect

    Afropay sends webhook status and redirects customer to your configured URLs.