Skip to main content
A subscription bills a customer at a regular interval — weekly, monthly, yearly — for one or more products. Yabetoo generates the invoice for each cycle, asks the customer for payment on their Mobile Money number, retries on failure, and notifies you by webhook at every step.

The model

What happens every cycle

1

Three days before the due date

Yabetoo issues the invoice for the upcoming cycle and emails it to the customer with a payment link. The customer can settle it early.
2

On the due date, at 11:00 (Brazzaville)

If the invoice is still unpaid, a payment request is pushed to the customer’s default Mobile Money number. They approve it on their phone.
3

Success

The invoice becomes paid, you receive invoice.paid, the period advances.
4

Failure

The subscription becomes past_due, and three automatic retries go out at D+1, D+3 and D+7. See Failed payments.
Mobile Money has no automatic debit. A renewal is not charged: it is requested, and the customer has to approve it on their phone. That is why the request goes out at 11:00 local time, never at night, and why a failed renewal is a nominal case to handle — not an exception.

Two ways to create a subscription

Through the API

You know the customer and their Mobile Money number: one call to POST /v1/subscriptions creates the subscription and requests the first payment.

Through the hosted payment page

The customer picks and pays on pay.yabetoo.com, through a checkout session in subscription mode or a payment link.

Environments

There is a single host. The mode is carried by the key: an sk_test_ key works in test mode (isLive: false, payments go to Yabetoo Pay’s test environment), an sk_live_ key in live mode. Data from the two modes is kept apart, but served by the same API and visible in the same dashboard (test/live toggle). A subscription’s mode (test or live) is that of the key that created it, and it is frozen: all of its billing follows that mode. To simulate the passage of time in test mode, use test clocks.

What the system does not do

So you do not find out in production:
  • No price change on an existing subscription. Only the quantity of a line can change (PUT /v1/subscriptions/{id}/quantity). To change plan: cancel and recreate.
  • No automatic cancellation after the retries: an unpaid subscription stays past_due until you settle it or cancel it.
  • No automatic credit on a mid-period quantity decrease.
  • No automatic email to the customer on a failed payment, a cancellation or a trial ending: only invoices are emailed.