Search routes

Search major documentation and API reference routes.

Direct Integrations

Yaya Wallet Direct Integration

Direct payment initiation flow for Yaya Wallet customers.

Initiate Payment

POST/api/v1/YaYa/direct/transaction-initiate

Send a direct payment request to a customer Yaya Wallet account.

Request Parameters

FieldTypeRequiredDescription
descriptionstringYesPayment description
imageUrlstringNoPublic image URL for checkout
amountnumberYesPayment amount
currencystringYesCurrency code (ETB, USD, etc.)
phonestringYesCustomer phone in country-code format without plus sign
MerchantOrderIdstringYesUnique merchant order ID
callbackUrlstringYesWebhook URL for status updates
cancelRedirectUrlstringNoRedirect URL on cancel
failedRedirectUrlstringNoRedirect URL on failure
complitedUrlstringNoRedirect URL on success
order.itemsarrayYesOrder line items collection
order.items[].itemNamestringYesItem name
order.items[].pricenumberYesItem price
order.items[].quantitynumberYesItem quantity

Example Request

curl --location '/api/v1/YaYa/direct/transaction-initiate' \
--data '{
  "description": "Afropay Order Checkout",
  "imageUrl": "https://yourapp.com/images/logo.png",
  "amount": 1.18,
  "currency": "ETB",
  "phone": "251900000000",
  "MerchantOrderId": "TXN_123456789",
  "cancelRedirectUrl": "https://yourapp.com/payment/cancel",
  "callbackUrl": "https://yourapp.com/payment/callback",
  "failedRedirectUrl": "https://yourapp.com/payment/failed",
  "complitedUrl": "https://yourapp.com/payment/success",
  "order": {
    "items": [
      {
        "itemName": "Premium Package",
        "price": 1.18,
        "quantity": 1
      }
    ]
  }
}'

Example Response

{
  "isSuccess": true,
  "statusCode": 0,
  "message": "Transaction successfully registered",
  "data": {
    "paymentUrl": "https://client-checkout.afropays.co/checkout/TXN2026012808112471",
    "refrence": "TXN2026012808112471"
  }
}

Customer is redirected to the returned paymentUrl and completes payment with Yaya Wallet.