Skip to content

Latest commit

 

History

History
19 lines (16 loc) · 21.8 KB

File metadata and controls

19 lines (16 loc) · 21.8 KB

SessionRequest

Fields

Field Type Required Description Example
amount Amount ✔️ In v2 endpoints, monetary amounts are represented as objects with a currency and value field.
description String ✔️ A user-friendly description of the session that may be shown to the customer during the checkout process.

Any payment created for the session will use the same description.
Order #12345
lines List<SessionLineItem> ✔️ List of items the customer will pay for in this session. The sum of all line items must equal the
session's amount.

All lines must have the same currency as the session.
redirectUrl String ✔️ The URL your customer will be redirected to after the payment process.

It could make sense for the redirectUrl to contain a unique identifier – like your order ID – so you can show the
right page referencing the order when your customer returns.
https://example.org/redirect
billingAddress Optional<PaymentAddress> N/A
shippingAddress Optional<PaymentAddress> N/A
customerId Optional<String> N/A cst_5B8cwPMGnU
sequenceType Optional<SessionSequenceType> N/A oneoff
metadata Map<String, Object> Provide any data you like in a JSON object. We will save the data alongside the entity. Whenever
you fetch the entity with our API, we will also include the metadata. You can use up to approximately 1kB.

Any payment created for the session will use the same metadata.
payment Optional<Payment> N/A
profileId Optional<String> The identifier referring to the profile this entity belongs to.

Most API credentials are linked to a single profile. In these cases the profileId can be omitted in the creation
request. For organization-level credentials such as OAuth access tokens however, the profileId parameter is
required.
pfl_5B8cwPMGnU
testmode JsonNullable<Boolean> Whether to create the entity in test mode or live mode.

Most API credentials are specifically created for either live mode or test mode, in which case this parameter must
not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting
testmode to true.
false