Public
Documentation Settings

BarkaPay API

Powerful, easy-to-integrate APIs to accept mobile money and bank payments on your website or mobile app.

Before you can use this API

You must complete the following steps :

  • Sign up at barkapay.com/register.
  • Pass your KYC
  • Create an API or SCI app
  • Keep your key pair safe

Authentication

BarkaPay Uses a pair of keys to handle authentication. Both must be set in the headers :

  • X-Api-Key : api_key
  • X-Api-Secret : api_secret

You can generate a key pair by creating and API or SCI app in the API integration section from your BarkaPay Merchant Area.

Auth, API Status, User infos

This set of methods allow you to test authentication, check available services, and retrieve information of the current merchant.

GETPING (TEST YOUR AUTH)

https://api.barkapay.com/api/client/ping

This endpoint sends an HTTP GET request to retrieve a ping response from the client API.

The response will have a status code of 200 and a content type of application/json. The response body will contain a message indicating the status of the ping request.

SUCCESS AUTH

  • message: A string indicating the status of the ping request. Example: "Success"
json
{
    "message": "Success"
}

FAILED AUTH

  • Status: 401
  • Content-Type: application/json

Example response body:

json
{
    "status": "401",
    "error": "Invalid or disabled API credentials"
}
HEADERS
X-Api-Key

{{your_api_key}}

(Required) Your API Key

X-Api-Secret

{{your_api_secret}}

(Required) Your API Secret

Accept

application/json

GETOPERATORS AVAILABILITY

https://api.barkapay.com/api/client/operators-availability

This endpoint retrieves the status of available services for the client.

HTTP Request

http
GET https://api.barkapay.com/api/client/status

Response

  • status (integer): The HTTP status code of the response.
  • message (string): A message regarding the status of the API.
  • available_services (object): An object containing the availability of different services.
    • transfers (object): An object containing the availability of transfer services.
      • mobile (boolean): Indicates whether mobile transfers are available.
      • crypto (boolean): Indicates whether crypto transfers are available.
      • electro (boolean): Indicates whether electro transfers are available.
    • payments (object): An object containing the availability of payment services.
      • mobile (boolean): Indicates whether mobile payments are available.
      • crypto (boolean): Indicates whether crypto payments are available.
      • electro (boolean): Indicates whether electro payments are available.
  • coder_note (string): Additional note from the coder.

Example Response

json
{
    "status": 200,
    "message": "The API is up and running.",
    "available_services": {
        "transfers": {
            "mobile": true,
            "crypto": false,
            "electro": false
        },
        "payments": {
            "mobile": true,
            "crypto": false,
            "electro": false
        }
    },
    "coder_note": "Ambition is priceless."
}
HEADERS
X-Api-Key

{{your_api_key}}

(Required) Your API Key

X-Api-Secret

{{your_api_secret}}

(Required) Your API Secret

Accept

application/json

Loading