Skip to Content
Integration GuideDirect Payment

Direct Payment

This documentation explains how to integrate AdmasPay’s payment gateway into your application to securely accept payments from customers using direct link.

AdmasPay offers flexible payment integration options to suit different business needs. For merchants seeking a quick and simple solution, AdmasPay provides Inline, Standard, and HTML checkout options that come pre-built with AdmasPay's UI, branding, and seamless payment experience.

For businesses requiring full control over the payment experience, AdmasPay supports Direct Link, a customizable API-based solution that lets merchants build their own payment UI and flow.

Supported Payment Methods

TeleBirr

TELEBIRR

M-PESA

MPESA

CBE-Birr

CBEBIRR

Integration Steps

1
Obtain API key - Get your API key from the Configurations page.
2Send transaction details to the AdmasPay direct link endpoint.
3Customer authorizes the payment with their payment provider (e.g., TeleBirr).
4
Verify payment using the verification endpoint.

Endpoint

POSThttps://api.admaspay.com/api/v1/initiate/transactions?command=direct

Headers

Pass your API key as a bearer token in the request header to authorize this API.

AuthorizationBearer YOUR_API_KEY
Content-Typeapplication/json

Request Parameters

ParameterTypeRequiredDescription
phone_numberStringYesCustomer's phone number (e.g., 0912345678)
amountNumberYesThe payment amount
txn_refStringYesYour unique transaction reference
payment_method_codeStringYesPayment method: TELEBIRR, MPESA, or CBEBIRR
first_nameStringNoCustomer's first name
last_nameStringNoCustomer's last name
emailStringNoCustomer's email address
currency_codeStringNoETB for Birr, USD for Dollar (defaults to ETB)
callback_urlStringNoURL to receive payment notification
return_urlStringNoURL to redirect customer after payment

Example Integration

Success Response

200 OK
{
    "status": "successful",
    "message": "Direct link payment."
}

Error Response

Error
{
    "type": "about:blank",
    "title": "not authenticated",
    "status": 401,
    "instance": "/api/v1/initiate/transactions",
    "message": "error.http.401"
}

For detailed error responses, see Error Codes.

Last updated on