Skip to main content

Endpoint

POST https://pay.sandbox.yabetoopay.com/v1/payment-intents   # Sandbox
POST https://pay.api.yabetoopay.com/v1/payment-intents       # Production

Authentication

Use your secret key in the Authorization header:
Authorization: Bearer YOUR_SECRET_KEY

Request Body

ParameterTypeRequiredDescription
client_secretstringYesThe client secret of the payment intent
first_namestringNoCustomer’s first name
last_namestringNoCustomer’s last name
receipt_emailstringNoCustomer’s email address
payment_method_dataobjectYesPayment method details

payment_method_data structure

{
  "type": "momo",
  "momo": {
    "country": "cg",
    "msisdn": "+242123456789",
    "operator_name": "mtn"
  }
}
FieldDescription
typePayment method type (momo for Mobile Money)
momo.countryCountry code (e.g., cg, cm)
momo.msisdnPhone number in international format
momo.operator_nameOperator name (mtn, airtel)

Example Request

curl -X POST https://pay.sandbox.yabetoopay.com/v1/payment-intents \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -d '{
    "client_secret": "YOUR_CLIENT_SECRET",
    "first_name": "John",
    "last_name": "Doe",
    "receipt_email": "[email protected]",
    "payment_method_data": {
      "type": "momo",
      "momo": {
        "country": "cg",
        "msisdn": "+242123456789",
        "operator_name": "mtn"
      }
    }
  }'

Response

200 OK

{
  "intent_id": "pi_9aATHBv8UXuD6H5qrSav",
  "financial_transaction_id": "832546449",
  "transaction_id": "3c043d55-e659-4a86-9fab-b377fea9ee6b",
  "amount": 500,
  "currency": "xaf",
  "status": "succeeded",
  "captured": true,
  "external_id": "ext_3rxAagDtTSlN9XO96R1slJk14WENvxOlJbCu",
  "id": "ch_1jro7CEishIEWadybzlm"
}

422 Bad Request

{
  "error": {
    "message": "E_CONFIRMED_INTENT_EXCEPTION: Intent already confirmed",
    "code": "E_CONFIRMED_INTENT_EXCEPTION"
  }
}

Payment Failed - Insufficient Balance

{
  "error": {
    "message": "LOW_BALANCE_OR_PAYEE_LIMIT_REACHED_OR_NOT_ALLOWED",
    "code": "LOW_BALANCE_OR_PAYEE_LIMIT_REACHED_OR_NOT_ALLOWED"
  }
}
This error occurs when:
  • The customer has insufficient funds in their Mobile Money account
  • The customer has reached their transaction limit
  • The transaction is not allowed by the operator

Payment Failed - Timeout

{
  "error": {
    "message": "TIMEOUT",
    "code": "TIMEOUT"
  }
}
This error occurs when the customer did not confirm the payment in time (did not enter their PIN on the Mobile Money prompt).

401 Unauthorized

{
  "error": {
    "message": "Unauthorized",
    "code": "Unauthorized"
  }
}
Error handling is important, as confirmation can fail for various reasons (insufficient funds, incorrect payment information, etc.).