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 the Authorization header:
Authorization: Bearer YOUR_SECRET_KEY
Request Body
Parameter Type Required Description client_secretstringYes The client secret of the payment intent first_namestringNo Customer’s first name last_namestringNo Customer’s last name receipt_emailstringNo Customer’s email address payment_method_dataobjectYes Payment method details
payment_method_data structure
{
"type" : "momo" ,
"momo" : {
"country" : "cg" ,
"msisdn" : "+242123456789" ,
"operator_name" : "mtn"
}
}
Field Description 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
JavaScript
Python
PHP
Java
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"
}
}
}'
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.).