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 theAuthorization header:
Authorization: Bearer YOUR_SECRET_KEY
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | The amount to be paid (in smallest currency unit) |
currency | string | Yes | Currency code (e.g., xaf, xof) |
description | string | No | Description of the payment |
metadata | object | No | Custom 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" }
}'
import Yabetoo from "@yabetoo/sdk-js";
const yabetoo = new Yabetoo("YOUR_SECRET_KEY");
const paymentIntent = await yabetoo.payments.create({
amount: 2000,
currency: "xaf",
description: "Payment for product",
metadata: { orderId: "1234" },
});
from yabetoo import Yabetoo
from yabetoo.models.payment import CreateIntentRequest
yabetoo = Yabetoo("YOUR_SECRET_KEY")
payment_intent = yabetoo.payments.create(CreateIntentRequest(
amount=2000,
currency="xaf",
description="Payment for product",
metadata={"orderId": "1234"}
))
<?php
require 'vendor/autoload.php';
use Yabetoo\Yabetoo;
$yabetoo = new Yabetoo("YOUR_SECRET_KEY");
$paymentIntent = $yabetoo->payments->create([
"amount" => 2000,
"currency" => "xaf",
"description" => "Payment for product",
"metadata" => ["orderId" => "1234"],
]);
import com.yabetoo.Yabetoo;
import com.yabetoo.YabetooConfig;
import com.yabetoo.model.PaymentIntent;
import com.yabetoo.request.PaymentIntentRequest;
YabetooConfig config = new YabetooConfig()
.setApiKey("YOUR_SECRET_KEY");
Yabetoo yabetoo = new Yabetoo(config);
PaymentIntentRequest request = PaymentIntentRequest.builder()
.amount(2000)
.currency("xaf")
.description("Payment for product")
.putMetadata("orderId", "1234")
.build();
PaymentIntent paymentIntent = yabetoo.paymentIntents().create(request);
Response
200 OK
{
"amount": 10000,
"currency": "xaf",
"description": "Payment for product",
"metadata": {
"orderId": "orderId-22"
},
"accountId": "acct_xsd",
"liveMode": false,
"label": "payment_intent",
"id": "pi_OYgGCdY1VaWvszwZcAY7VXvuXI70Ao9rsuMl",
"createdAt": "2026-02-16T15:33:55.048+00:00",
"updatedAt": "2026-02-16T15:33:55.062+00:00",
"clientSecret": "pi_OYgGCdY1VaWvszwZcAY7VXvuXI70Ao9rsuMl_secret_JYtxzKNhuwDCilaH72rEtMGuAlJl29qYAnOe"
}
422 Bad Request
{
"errors": [
{
"rule": "required",
"field": "currency",
"message": "required validation failed"
}
]
}
401 Unauthorized
{
"error": "Unauthorized"
}