Skip to main content

Prepare your request

The endpoint to use is GET https://pay.sandbox.yabetoopay.com/v1/disbursement/{id} for sandbox environment and GET https://pay.api.yabetoopay.com/v1/disbursement/{id} for production environment.
Secret key security: The secret key (secret_key) must be kept confidential and must never be exposed in the frontend or client code. It must only be used on the server side.
  1. Use the secret key provided secret_key to authenticate yourself to the API. For security reasons, this key must only be used on the server side.
  2. The request body should contain the following parameters:
{
    "id": "1234567890"
}

Parameters

  • id: The ID of the disbursement

Make the request

const response = await fetch(
  "https://pay.sandbox.yabetoopay.com/v1/disbursement/1234567890",
  {
    method: "GET",
    headers: {
      "Content-Type": "application/json",
      Authorization: `Bearer ${secret_key}`,
    },
  }
);

const data = await response.json();
console.log(data);

Response

200 OK

When the disbursement was successfully retrieved, the API will return a 200 OK response with the following body:
{
  "amount": 10000,
  "currency": "XAF",
  "status": "processing",
  "firstName": "Jean",
  "lastName": "Dupont",
  "operatorName": "mtn",
  "country": "cg",
  "phone": "242066594471",
  "object": "disbursement",
  "type": 1,
  "shouldExecutedAt": "2025-03-18T09:24:57.555Z",
  "id": "wt_RMqehxy8NNi1ocJFG2SSAZMj81m6spo72vnZ",
  "createdAt": "2025-03-17T10:24:57.559+01:00",
  "updatedAt": "2025-03-17T10:24:57.559+01:00"
}

401 Unauthorized

When the secret key is invalid, the API will return a 401 Unauthorized response with the following body:
{
  "message": "Unauthorized"
}
I