This guide explains the complete payment flow in Yabetoo, from creating a payment intent to receiving confirmation via webhooks.Documentation Index
Fetch the complete documentation index at: https://docs.yabetoopay.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Yabetoo payment flow follows a two-step process that gives you full control over when and how payments are captured.Step 1: Create a Payment Intent
A Payment Intent represents your intention to collect a payment. It tracks the payment lifecycle and stores information about the transaction.- No money has been moved
- The intent is in
pendingstatus - You have a
client_secretfor the next step
Step 2: Confirm the Payment Intent
Confirmation triggers the actual payment. You provide the customer’s payment method details (Mobile Money information).- The customer receives a push notification on their phone
- They enter their PIN to authorize the payment
- Yabetoo waits for the Mobile Money provider’s response
Step 3: Handle the Result
Synchronous Response
The confirmation request returns immediately with the payment status:Webhook Notification
For reliability, always listen for webhooks. Yabetoo sends anintent.completed event when the payment succeeds:
Payment Statuses
| Status | Description |
|---|---|
pending | Payment intent created, not yet confirmed |
processing | Payment is being processed by the Mobile Money provider |
succeeded | Payment completed successfully |
failed | Payment failed (insufficient funds, rejected, etc.) |
Common Error Codes
When a payment fails, you may receive one of these error codes:| Code | Description |
|---|---|
LOW_BALANCE_OR_PAYEE_LIMIT_REACHED_OR_NOT_ALLOWED | Insufficient funds, transaction limit reached, or transaction not allowed |
TIMEOUT | Customer did not confirm the payment in time |
Best Practices
- Always verify webhooks - Don’t rely solely on the synchronous response
- Store the payment intent ID - Link it to your order for tracking
- Handle failures gracefully - Show clear error messages to users
- Implement idempotency - Prevent duplicate payments on retries
Alternative: Checkout Sessions
For a simpler integration, use Checkout Sessions. Yabetoo handles the entire payment UI:For more details on each step, see the Payment Intent API documentation.