Skip to main content
Two doors lead to the hosted payment page. In both cases the subscription is born when the customer confirms the payment, with the Mobile Money number they enter — that number becomes their default payment method for renewals.

Checkout session in subscription mode

Create a session with mode: "subscription" and lines that point at catalogue prices, then redirect the customer to url.
201

Rules specific to subscription mode

The trial comes from the price: if the first recurring price carries trialPeriodDays, the subscription is born trialing and nothing is billed at confirmation. See Trials.
checkout.session.completed is not emitted in subscription mode. That event exists only for one-off payments. Do not wait for it: listen to subscription.created.
To sell the same subscription to many customers without an API call per sale, create a payment link with type: "subscription" and your recurring prices. Every customer who pays through the link gets their own subscription. Promotion codes are honored on this door: the discount applies to the first invoice and, per the coupon’s duration, to the following ones. See Coupons.

Finding the subscription after payment

The session does not return the subscription’s identifier, and the return URL does not carry it either. Three paths:
GET /v1/customers/{cus}/subscriptions or GET /v1/subscriptions?customerId=cus_.... The customer is the one from customer_email.
idempotencyKey equals cs_<session id> and metadata.checkout_session_id carries the session: GET /v1/subscriptions then filter.

What the customer sees

On the hosted page, the customer enters their email and Mobile Money number, then approves the payment request on their phone. The page waits for the operator’s answer; a trial is announced as such (“14-day trial”) and no amount is requested.
The hosted page also serves invoices: the link emailed three days before each due date leads to pay.yabetoo.com/i/..., where the customer can settle early. See Billing cycle.