Skip to main content
Use this path when you already know the customer and their Mobile Money number — a form in your own application, a migration from another system, an assisted sale. To let the customer pay on their own, see the hosted page.

The call

idempotencyKey is required and lives in the body — unlike Yabetoo’s other write routes, which take an Idempotency-Key header. A replay with the same key returns 201 with the existing subscription, creating and billing nothing: it is the only protection against a duplicate subscription on a network retry.
paymentMethodData.momo is technically optional for the validator, but a paymentMethodData without momo makes the payment request fail: the subscription is born unpaid. Always provide the number.

What happens

1

The customer is found or created

By customerEmail, on your account. The provided payment method is added and becomes their default — even if they already had one.
2

The subscription is created

unpaid without a trial, trialing with one. The current period starts now; without a trial, it ends at now + the first price's interval.
3

Without a trial: invoice and payment request

A subscription_create invoice is issued for the first period, and a payment request is pushed to the customer’s number. The call waits for the answer — the customer has about 100 seconds to approve on their phone.
4

Outcome

Approved → the subscription becomes active, the invoice paid, nextBillingDate is set. Declined or unanswered → the subscription stays unpaid, the invoice open.
With a trial, nothing is billed at creation: the call returns immediately, and the first payment request goes out at the end of the trial.

The response

Always 201, whether the payment went through or not. Read paymentStatus.
201
When success is false, canRetry is true: settle it with retry-payment. If the customer approved after the window, the retry recognizes the payment already made without requesting a second one.

Replay

Same idempotencyKey on the same account → 201, the existing subscription, paymentStatus derived from its current status (paid if active, trial if trialing, its status otherwise). No invoice, no payment request.

Errors

Events

subscription.created goes out after the payment attempt: data.status is therefore active, unpaid or trialing — never an “in progress” status. If the payment went through you also receive invoice.paid and payment.completed. See Webhooks.