Create checkout session

Required capability: payments

Path Params
string
required
Body Params
string
enum

What the session collects from the customer.

  • PAYMENT: Collect a one-time payment. The session manages a payment_intent.
  • SETUP: Collect and save a payment method for future use without charging. The session
    manages a setup_intent; no amount is charged.
Allowed:
string

Client supplied identifier to cross-reference the checkout to internal systems (like an order id for
example).

string

Amount to be captured in minor unit of the currency (ex: euro-cents for euros). Required in PAYMENT mode;
must be omitted in SETUP mode.

Example: 300 (as in 300 pence for £3.00)

string

ISO 4217 three letter currency code. Must be supported by at least one payment rail associated with
the account. Required in PAYMENT mode. Optional in SETUP mode: when set, restricts the offered
rails to those supporting it; when omitted, no currency filter is applied (setup collects a
payment method, not a charge).

Example: "GBP"

string

The URL to return to when the customer successfully completed the checkout. If empty, a Synapto hosted
success page is displayed.

string

When set, a "Back" link becomes visible on the checkout page and the user is redirected to this link. It is recommended to set this field.

string

Name of a customer to attach to the intent. Required in SETUP mode (the saved payment method is attached
to this customer and can't be used later with any other customer).

Example: "accounts/acct_RwDJsJd8z0exhtfX2570Q/customers/cus_qwjkdnqkwjdnq".

payment_method_types
array of objects

Optional. Restrict which payment rails the customer may pick on the hosted checkout
page. Empty list means no restriction (every ACTIVE rail matching currency and, in
SETUP mode, setup-capable is offered). Rejects at create time when no rail matches.

payment_method_types
Allowed:
metadata
object

Client supplied metadata. At most 50 keys with a max length of 40 characters are permitted. Values may be strings up to 500 characters each.

Response

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json