input CreatePaymentSessionInput

FieldTypeDescription
orgIdID!

Organization identifier the payment session belongs to.

amountAmount!

Total payment amount. Ex. 100.10. Must be greater than zero unless storePaymentMethod is Enabled, where zero means the payment method is validated and stored without taking a payment. Zero requires Enabled rather than AskForConsent: a customer who declined would leave the session with nothing to do.

currencyCurrency!

Three letter ISO currency code. Ex. USD

callbackUrlURL

URL to receive payment session events

successUrlURL

URL to redirect after a payment session is completed by the customer

contactIdID

Optional contact for which this payment session is attached. You cannot provide both a contactId and a contactRef. Note that some features are unavailable if a contactId or contactRef is not provided. Required when storePaymentMethod is anything but Disabled: a payment method is stored against a platform contact, so a contactRef alone will not do.

contactRefPaymentSessionContactRefInput

Optional merchant supplied reference contact information external to the platform. You cannot provide both a contactId and a contactRef. Note that some features are unavailable if a contactId or contactRef is not provided.

transactionRefString

Optional merchant supplied reference ID for the transaction external to the platform.

invoiceIds[String!]

Optional array of invoice IDs which this payment session is attached to. You cannot provide both invoiceIds and invoiceRefs. Note that some feature are unavailable unless at least one invoiceId or invoiceRef is provided.

invoiceRefs[PaymentSessionInvoiceRefInput!]

Optional array of invoice references which this payment session is attached to. You cannot provide both invoiceIds and invoiceRefs. Note that some features are unavailable unless at least one invoiceId or invoiceRef is provided.

expirationDateDateTime

Optional expiration date for the payment session. ISO 8601 format.

storePaymentMethodStorePaymentMethodMode

Optionally store the payment method the customer enters against the session's contact so it can be charged again with chargePaymentMethod. Defaults to Disabled, and any other value requires contactId.

Enabled stores the method as a condition of paying, and withdraws payment options that are unsuitable for storing from the session: consumer financing such as FlexPay, for example, applies to a single purchase. AskForConsent leaves those options in place and stores the method only if the customer accepts, so a session may complete having stored nothing.

When amount is zero the instrument is validated and stored and no payment is taken, which requires Enabled. This setting may only be set on payment session creation.

recurringProcessingModelRecurringProcessingModel

How a method stored by this session will be declared to the card networks when it is charged later. Defaults to UnscheduledCardOnFile, which covers payments you initiate that follow no fixed schedule. Set it to Subscription when later payments will run on a fixed interval, whatever the amount, and to CardOnFile when later payments will be started by the customer from your own checkout. Storing under Subscription or UnscheduledCardOnFile makes the customer authenticate during this session wherever Strong Customer Authentication applies, including on a zero-amount session. A later payment may use a different model from the one declared here. Ignored when storePaymentMethod is Disabled.

createPendingPaymentBoolean

Optionally create a pending payment record for this payment session. Default is false which means a payment record is created upon payment session completion. Set this to true if you require a pending payment to be visible in the payment list in the dashboard before payments are made. This is useful for use cases involving payment sessions without expirations. This setting may only be set on payment session creation.

checkoutConfigurationIdID

The checkout configuration ID to be used for this payment session. If a checkout configuration ID is not provided, the default checkout configuration will be used.

invoiceTotalAmount

Optional total amount due across the referenced invoices. When the payment amount exceeds this total (for example because of a surcharge or tip), financing options such as FlexPay are disabled since they cannot finance the additional amount.

brandLogoUrlURL

Optional URL to a logo image to display during checkout, overriding the default branding. The caller supplies a URL that is used to render the logo.

brandNameString

Optional brand or merchant name to display during checkout, overriding the organization name.