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
amountnumberYesThe amount to be paid (in smallest currency unit)
currencystringYesCurrency code (e.g., xaf, xof)
descriptionstringNoDescription of the payment
metadataobjectNoCustom key-value data for your reference

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 '{
    "amount": 2000,
    "currency": "xaf",
    "description": "Payment for product",
    "metadata": { "orderId": "1234" }
  }'

Response

200 OK

{
  "amount": 2000,
  "currency": "xaf",
  "label": "payment_intent",
  "id": "pi_XdLeavDjiiaEx2y5nRz0",
  "client_secret": ""
}

422 Bad Request

{
  "errors": [
    {
      "rule": "required",
      "field": "currency",
      "message": "required validation failed"
    }
  ]
}

401 Unauthorized

{
  "error": "Unauthorized"
}