Endpoint
POST https://pay.sandbox.yabetoopay.com/v1/payment-intents/:id/confirm # Sandbox
POST https://pay.api.yabetoopay.com/v1/payment-intents/:id/confirm # Production
:id is the payment intent ID.
Authentication
Use your secret key in theAuthorization header:
Authorization: Bearer YOUR_SECRET_KEY
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
client_secret | string | Yes | The client secret of the payment intent |
first_name | string | No | Customer’s first name |
last_name | string | No | Customer’s last name |
receipt_email | string | No | Customer’s email address |
payment_method_data | object | Yes | Payment method details |
payment_method_data structure
{
"type": "momo",
"momo": {
"country": "cg",
"msisdn": "+242123456789",
"operator_name": "mtn"
}
}
| Field | Description |
|---|---|
type | Payment method type (momo for Mobile Money) |
momo.country | Country code (e.g., cg, cm) |
momo.msisdn | Phone number in international format |
momo.operator_name | Operator name (mtn, airtel) |
Example Request
curl -X POST https://pay.sandbox.yabetoopay.com/v1/payment-intents/PAYMENT_INTENT_ID/confirm \
-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": "john.doe@example.com",
"payment_method_data": {
"type": "momo",
"momo": {
"country": "cg",
"msisdn": "+242123456789",
"operator_name": "mtn"
}
}
}'
import Yabetoo from "@yabetoo/sdk-js";
const yabetoo = new Yabetoo("YOUR_SECRET_KEY");
const confirmation = await yabetoo.payments.confirm("PAYMENT_INTENT_ID", {
clientSecret: "YOUR_CLIENT_SECRET",
firstName: "John",
lastName: "Doe",
receiptEmail: "john.doe@example.com",
paymentMethodData: {
type: "momo",
momo: {
country: "cg",
msisdn: "+242123456789",
operatorName: "mtn",
},
},
});
from yabetoo import Yabetoo
from yabetoo.models.payment import ConfirmIntentRequest, PaymentMethodData, MomoData
yabetoo = Yabetoo("YOUR_SECRET_KEY")
confirmation = yabetoo.payments.confirm(
payment_id="PAYMENT_INTENT_ID",
data=ConfirmIntentRequest(
client_secret="YOUR_CLIENT_SECRET",
first_name="John",
last_name="Doe",
receipt_email="john.doe@example.com",
payment_method_data=PaymentMethodData(
type="momo",
momo=MomoData(
country="cg",
msisdn="+242123456789",
operator_name="mtn"
)
)
)
)
<?php
require 'vendor/autoload.php';
use Yabetoo\Yabetoo;
$yabetoo = new Yabetoo("YOUR_SECRET_KEY");
$confirmation = $yabetoo->payments->confirm("PAYMENT_INTENT_ID", [
"client_secret" => "YOUR_CLIENT_SECRET",
"first_name" => "John",
"last_name" => "Doe",
"receipt_email" => "john.doe@example.com",
"payment_method_data" => [
"type" => "momo",
"momo" => [
"country" => "cg",
"msisdn" => "+242123456789",
"operator_name" => "mtn",
],
],
]);
import com.yabetoo.Yabetoo;
import com.yabetoo.YabetooConfig;
import com.yabetoo.model.PaymentIntent;
import com.yabetoo.model.PaymentMethod;
import com.yabetoo.request.PaymentIntentConfirmRequest;
YabetooConfig config = new YabetooConfig()
.setApiKey("YOUR_SECRET_KEY");
Yabetoo yabetoo = new Yabetoo(config);
PaymentMethod.MomoDetails momoDetails = PaymentMethod.MomoDetails.builder()
.msisdn("+242123456789")
.country("cg")
.operatorName("mtn")
.build();
PaymentMethod paymentMethod = PaymentMethod.builder()
.type("momo")
.momoDetails(momoDetails)
.build();
PaymentIntent confirmation = yabetoo.paymentIntents().confirm(
"PAYMENT_INTENT_ID",
PaymentIntentConfirmRequest.builder()
.clientSecret("YOUR_CLIENT_SECRET")
.firstName("John")
.lastName("Doe")
.email("john.doe@example.com")
.paymentMethod(paymentMethod)
.build()
);
Response
200 OK - Payment Succeeded
{
"intentId": "pi_3r8utQTUlCY5hjV2pMtjtaNYsZ30FylO3PZk",
"financialTransactionId": "7331529368",
"transactionId": "pi_3r8utQTUlCY5hjV2pMtjtaNYsZ30FylO3PZk",
"amount": 2228,
"currency": "xaf",
"status": "succeeded",
"captured": true,
"externalId": "ext_7hp8lsjCFwTemoeL",
"id": "ch_ADdQhObdEDlz4L0kl7qNRniFjruNcrcY85xq",
"createdAt": "2026-02-16T06:51:43.103+00:00",
"updatedAt": "2026-02-16T06:51:43.177+00:00",
"paymentMethodId": "pm_evILNJIgAyJs7S4KYmy5n5Ect8itay2GeycL"
}
200 OK - Payment Failed
When the payment fails (e.g., timeout, insufficient balance), the response will still return a 200 status code but with a failed status:{
"intentId": "pi_HUHh0kAg9H8QZvHtFf0taIspdWlUVftSOLhB",
"transactionId": "pi_HUHh0kAg9H8QZvHtFf0taIspdWlUVftSOLhB",
"amount": 10363,
"currency": "xaf",
"status": "expired",
"captured": false,
"externalId": "ext_mQliBh5ZbdQ9w15S",
"failureMessage": "Transaction timed out",
"failureCode": "Transaction timed out",
"id": "ch_nZBtA8euTJFnpFMTSO402WJOP1g2WwWSGiC7",
"createdAt": "2026-02-16T14:07:02.061+00:00",
"updatedAt": "2026-02-16T14:07:02.190+00:00",
"paymentMethodId": "pm_tU0HivHLBjozujmhwbVk3LO0B2ttcd0Rk1j3"
}
422 Bad Request
{
"status": 422,
"path": "/v1/payment-intents/pi_2GlfKbBC6IMYBPDhOaFIRdn0nrXDDEAjBxyW/confirm",
"timestamp": "2026-02-16T15:54:49.730+00:00",
"code": "E_OPERATION_NOT_PERMITTED",
"message": "Operation not permitted",
"detail": "You are not permitted to perform this operation."
}
404 Not Found
{
"message": "Row not found"
}
401 Unauthorized
{
"error": {
"message": "Unauthorized",
"code": "Unauthorized"
}
}
Error handling is important, as confirmation can fail for various reasons
(insufficient funds, incorrect payment information, etc.).