Skip to main content

Checkout Sessions

A checkout session is a cart of prices that a buyer pays on one MONEI page.

You send price IDs and quantities. MONEI computes every amount with the tax of each product, and returns the session with its url. Send the buyer to the url: the page shows the lines and the totals, asks for email, name, billing address and, when you allow it, company details, and takes the payment.

Payment and subscription​

A cart can mix one-time prices and one RECURRING price. Without a recurring price, paying the session creates a payment (PAYMENT mode). With one, it also creates a subscription that renews at the recurring price (SUBSCRIPTION mode). A recurring price with a trial is charged when the trial ends, not in the first payment.

Lifecycle​

A session is OPEN until the buyer pays it (COMPLETE) or it reaches expiresAt unpaid (EXPIRED). An expired session leaves no payment to capture and no active subscription.

Subscribe a webhook to checkout_session.completed and checkout_session.expired to learn when a session ends.