1. Authorization
Almara Pay Documentation
  • Introduction
  • Definitions
    • Data Types
    • Error Codes
    • MCCMNC Codes
  • Authorization
    • Overview
    • Token Request
      POST
    • Find Transaction Routes
      GET
    • Health Check
      GET
  • Payouts
    • Overview
    • Payment Order Request Information
    • Mobile Money Requests
      • Overview
      • Mobile Transfers- Safaricom (M-Pesa)
      • Mobile Transfers - Airtel Money
    • Payment Order Requests - Business Transfers
      POST
    • Payment Order Requests - Bank Transfers
      POST
    • Find Payment Order By OriginatorConversationId
      GET
    • Reject Order By OriginatorConversationId
      POST
  • Pay-Ins
    • Payment Links
      • Overview
      • Create Payment Link
      • Find Payment Links By Id
      • Update Payment Link
    • Express Deposits
      • Overview
      • Express Deposit Request
      • Find Express Deposit By OriginatorConversationId
    • C2B IPN (Callback)
      • C2B IPN Overview
  • Card Payments
    • Overview
    • Checkout Order Request
      POST
    • Query Checkout Request
      GET
    • Checkout Callback Request
      POST
  • Account Validation
    • Overview
    • Account Number Validation Request
      POST
    • Find KYC Status by SystemTraceAuditNumber
      GET
    • Account Validation
      POST
    • Find Account Validation Status by SystemTraceAuditNumber
      GET
  • Platform Services
    • Airtime Purchase
      • Overview
      • Airtime Purchase
      • Find Airtime Purchases By OriginatorConversationId
    • Customer Accounts
      • Balance Check
      • Find Charges By TransactionTypeId
    • Bill Payments
      • Overview
      • Bill Request Validation
      • Bill Request Payment
      • Find Bill Services
      • Find Bill Number By Service Id and Account Number
      • Find Bill Request By Originator Converstion Id
      • Bill Number
  1. Authorization

Token Request

POST
/connect/token
The Almara Pay API uses OAuth2.0 authentication and this requires client_id, client_secret, grant_type, scope.

These parameters are provided once one is setup in the ZamuPay System.

Token Request is a POST request responsible for returning the bearer token that is required for all the requests that are to be made.

For this the required details are: client_id, client_secret, grant_type, scope

Sample success response:#

{
    "access_token":"eyJhdddsGciOiJSUzI1NiIsImtpZCI6IkJEQTFFRURDNjNDQkVDNDY4N0Q5MzdDNThCM0ZBQjYxIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2MjQ1NDIzMTgsImV4cCI6MTYyNDU0NTkxOCwiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NDQzMTAiLCJhdWQiOiJQeVBheV9hcGkiLCJjbGllbnRfaWQiOiJQeVBheV9hcGkiLCJjbGllbnRfY3VzdeqvG9tZXJfaWQiOiJmYmViMzc4NS03MmEyLWViMTEtYTgxMy1kYzQxYTlmODczOWMiLCJjbGllbwwwfnRfY3VzdG9tZXJfdHlwZSI6IkNvcnBvcmF0ZSIsImNsaWVudF93ZWJzaXRlIjoiaHR0cDovL3d3dygw2445weWNzLmNvLmtlIiwianRpIjoiODcxMzlGOTZEMzJCNTRGNTA4OERCRTI4OTBCMkEyM0UiLCJpYXQiOjE2MjQ1NDIzMTgsInNjb3BlIjpbIlB5UGF5X2FwaSJdfQ.BifQbO6n9P_928WRN40qDJgvvdujFygWpbTmPIiOwPgG2uGlZzDeeVRguU6KseS4HuTZrZg2oWEnyTFG5gcH06m8Yd0sPdN5m441425IscbvcXE3sAn7Nbvs VHSMITl1rZdS1KNzbTWKzGV4l8AFTNLa4j63Z7aG73E6e1BrIHsP6dV0JUKTjXzBOyX6dmV0E4MuSHv9qyFk0YdlQkPw1NHtDYwOh___r88mNavaeKlsX1JMevq17MLXz3pfx2upH89KdoATdALBMjY7r8MSLslZCr1d-VmVeQaLq7heHvgtLIHsZlyqeeqeqkznKE6piL9wHScVtIgVmdNSVJVJAOIQgjHxn0oVnOOw",
    "expires_in": 3600,
    "token_type": "Bearer",
    "scope": "PyPay_api"
}

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Body Params application/x-www-form-urlencodedRequired

Responses

🟢200Success
application/json
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/connect/token' \
--header 'Authorization: Bearer <token>' \
--data-urlencode 'client_id=GENERATED_CLIENT_ID' \
--data-urlencode 'client_secret=GENERATED_CLIENT_ID' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'scope=PyPay_api'
Response Response Example
{
    "access_token":"eyJhdddsGciOiJSUzI1NiIsImtpZCI6IkJEQTFFRURDNjNDQkVDNDY4N0Q5MzdDNThCM0ZBQjYxIiwidHlwIjoiYXQrand0In0.eyJuYmYiOjE2MjQ1NDIzMTgsImV4cCI6MTYyNDU0NTkxOCwiaXNzIjoiaHR0cHM6Ly9sb2NhbGhvc3Q6NDQzMTAiLCJhdWQiOiJQeVBheV9hcGkiLCJjbGllbnRfaWQiOiJQeVBheV9hcGkiLCJjbGllbnRfY3VzdeqvG9tZXJfaWQiOiJmYmViMzc4NS03MmEyLWViMTEtYTgxMy1kYzQxYTlmODczOWMiLCJjbGllbwwwfnRfY3VzdG9tZXJfdHlwZSI6IkNvcnBvcmF0ZSIsImNsaWVudF93ZWJzaXRlIjoiaHR0cDovL3d3dygw2445weWNzLmNvLmtlIiwianRpIjoiODcxMzlGOTZEMzJCNTRGNTA4OERCRTI4OTBCMkEyM0UiLCJpYXQiOjE2MjQ1NDIzMTgsInNjb3BlIjpbIlB5UGF5X2FwaSJdfQ.BifQbO6n9P_928WRN40qDJgvvdujFygWpbTmPIiOwPgG2uGlZzDeeVRguU6KseS4HuTZrZg2oWEnyTFG5gcH06m8Yd0sPdN5m441425IscbvcXE3sAn7Nbvs VHSMITl1rZdS1KNzbTWKzGV4l8AFTNLa4j63Z7aG73E6e1BrIHsP6dV0JUKTjXzBOyX6dmV0E4MuSHv9qyFk0YdlQkPw1NHtDYwOh___r88mNavaeKlsX1JMevq17MLXz3pfx2upH89KdoATdALBMjY7r8MSLslZCr1d-VmVeQaLq7heHvgtLIHsZlyqeeqeqkznKE6piL9wHScVtIgVmdNSVJVJAOIQgjHxn0oVnOOw",
    "expires_in": 3600,
    "token_type": "Bearer",
    "scope": "PyPay_api"
}
Modified at 2026-04-30 06:08:54
Previous
Overview
Next
Find Transaction Routes
Built with