Initialize Payment Session

POST/store/:storeCode/payment-collections/:id/payment-sessions
publishable key

Initialize a payment session with a provider.

Path Parameters
storeCoderequiredstring

Store slug in the URL (first argument to every SDK store method).

idrequiredstring

Payment collection ID.

Query Parameters
fieldsstring

Comma-separated fields to include. Prefix with `*` to expand a relation (e.g. `id,*variants`).

Request Body

Schema

Copy
HttpTypes.StoreInitializePaymentSession

Properties

provider_idrequiredstring

Payment provider ID.

dataRecord<string, unknown>

Provider-specific data.

contextRecord<string, unknown>

Additional context for the provider.

Response

Status

200OK

Schema

Copy
HttpTypes.StorePaymentCollectionResponse

Properties

payment_collectionrequiredStorePaymentCollection

Payment collection with the new session.