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
TELEBIRRM-PESA
MPESACBE-Birr
CBEBIRRIntegration Steps
Endpoint
https://api.admaspay.com/api/v1/initiate/transactions?command=directHeaders
Pass your API key as a bearer token in the request header to authorize this API.
| Authorization | Bearer YOUR_API_KEY |
| Content-Type | application/json |
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| phone_number | String | Yes | Customer's phone number (e.g., 0912345678) |
| amount | Number | Yes | The payment amount |
| txn_ref | String | Yes | Your unique transaction reference |
| payment_method_code | String | Yes | Payment method: TELEBIRR, MPESA, or CBEBIRR |
| first_name | String | No | Customer's first name |
| last_name | String | No | Customer's last name |
| String | No | Customer's email address | |
| currency_code | String | No | ETB for Birr, USD for Dollar (defaults to ETB) |
| callback_url | String | No | URL to receive payment notification |
| return_url | String | No | URL to redirect customer after payment |
Example Integration
Success Response
{
"status": "successful",
"message": "Direct link payment."
}
Error Response
{
"type": "about:blank",
"title": "not authenticated",
"status": 401,
"instance": "/api/v1/initiate/transactions",
"message": "error.http.401"
}
For detailed error responses, see Error Codes.