Skip to main content
This guide explains the complete payment flow in Yabetoo, from creating a payment intent to receiving confirmation via webhooks.

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.
At this stage:
  • No money has been moved
  • The intent is in pending status
  • You have a client_secret for 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).
After confirmation:
  • 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 an intent.completed event when the payment succeeds:

Payment Statuses

Common Error Codes

When a payment fails, you may receive one of these error codes:
Always handle the LOW_BALANCE_OR_PAYEE_LIMIT_REACHED_OR_NOT_ALLOWED error gracefully by informing the customer that their payment could not be processed due to insufficient balance or account restrictions.

Best Practices

  1. Always verify webhooks - Don’t rely solely on the synchronous response
  2. Store the payment intent ID - Link it to your order for tracking
  3. Handle failures gracefully - Show clear error messages to users
  4. 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.