Skip to main content
The Payment Sessions API provides a single, uniform interface for merchants to accept payments from their customers, including one-time charges, subscription setup payments, and repeat payments using previously saved details. πŸ‘‰ See Product Guide

Quickstart: One-Time Payments

Create a payment session, launch checkout, and handle the completion webhook.

Quickstart: Recurring Payments

Set up a mandate and collect future payments without customer interaction.

Quickstart: Integrate Specific Payment Methods

Control which payment methods appear on the hosted checkout, or manage selection yourself.

Webhooks

The Payment Sessions API supports webhook events that allow you to track the lifecycle and state changes of a payment session in real time. These webhooks can be used to automate internal processes, trigger notifications, or initiate subsequent payment flows.

Available Events

  • payment_session.created
    Triggered when a new session is created and its workflow is initialised. The session is ready to be used for payment.
    πŸ‘‰ See payment_session.created Event
  • payment_session.updated
    Triggered when a session is updated as its workflow progresses. This is a coarse-grained event emitted for meaningful changes to the session, rather than individual workflow activities.
    πŸ‘‰ See payment_session.updated Event
  • payment_session.completed
    Triggered when a session’s workflow ends on its own, either because it achieved its intended outcome or because all permitted payment attempts were used. This is a fine-grained event for handling sessions that reach the completed status. Always inspect both status and payment_outcome to determine the result.
    πŸ‘‰ See payment_session.completed Event
  • payment_session.expired
    Triggered when an applicable expiry deadline is reached before the session’s workflow ends. This is a fine-grained event for handling sessions that reach the expired status.
    πŸ‘‰ See payment_session.expired Event

Handling fulfilment

Fulfil only when status is completed and payment_outcome is paid. A completed session can also end with reserved, payment_method_verified, or unpaid, and each needs a different action.πŸ‘‰ See Handling fulfilment

The event payload includes a payment_session object, which contains fields like created_at, updated_at, and payment_id.
Where applicable, it also includes a customer_id and payment_method_id, which can be used for subsequent next-in-series payments.

Error Codes

πŸ‘‰ See Common Error Codes