POST/v1/tenants/{tenantId}/ecom_stores/{eComStoreId}/carts/{cartId}/payment_session
Open a payment session for a cart Experimental
Creates an Adyen Drop-in session for the cart's current gross total plus the chosen delivery option's gross freight. The store's credentials stay in SnowBee; the response holds only what the Drop-in needs in the browser. Complete the session in the Drop-in, then check out the cart with the paymentId and the Drop-in's sessionResult. Available for stores with web payment configured.
Parameters
tenantIdrequiredeComStoreIdrequiredcartIdrequired
Request body (required)
application/jsonWhere the shopper returns after a redirect payment method, and who is paying
freightoptionalThe delivery option the shopper chose, as it will be sent at checkout. Its gross freight is added to the amount authorised.
Show child fields
carrierAgreementCoderequired- Example
"6838716034162098000" carrierCoderequired- Example
"porterbuddy" carrierNameoptional- Example
"Porterbuddy" carrierProductCoderequired- Example
"8747679326213767168" carrierProductNameoptional- Example
"Evening delivery" carrierProductPayloadoptionalProvider-specific extra data
Show child fields
partnerNameoptionalPartner name from provider
partnerNumberoptionalPartner number from provider
freightVatRateoptionalVAT rate for freight as a percentage
- Format: BigDecimal
Example"25.00"netFreightAmountoptionalNet freight/shipping cost amount (excl. VAT)
- Format: BigDecimal
Example"49.00"
returnUrlrequiredAbsolute URL the shopper is sent back to after a redirect, e.g. Vipps. The storefront's checkout return page.
shopperEmailoptionalShopper email, passed to the payment provider for risk and receipts
Responses
application/jsonA Drop-in session for the cart. Mount the Drop-in with sessionId, sessionData, clientKey and environment; pass paymentId and the Drop-in's sessionResult to checkout.
amountrequiredAmount the session authorises: the cart's gross total
- Format: BigDecimal
Example"100.0"clientKeyrequiredAdyen client key for the Drop-in
currencyIsoCoderequiredISO 4217 currency
Example"NOK"environmentrequiredtest or live
Example"test"paymentIdrequiredPayment ID; hand it back at checkout
sessionDatarequiredAdyen session data for the Drop-in
sessionIdrequired
400Response
application/jsonerrorrequiredStable error code
Example"INVALID_REQUEST"messagerequiredHuman-readable error message
Example"Invalid customer ID format"resolutionrequiredSuggested next action
Example"Correct the customer ID and retry the request"
401Response
application/jsonerrorrequiredStable error code
Example"INVALID_REQUEST"messagerequiredHuman-readable error message
Example"Invalid customer ID format"resolutionrequiredSuggested next action
Example"Correct the customer ID and retry the request"
403Response
application/jsonerrorrequiredStable error code
Example"INVALID_REQUEST"messagerequiredHuman-readable error message
Example"Invalid customer ID format"resolutionrequiredSuggested next action
Example"Correct the customer ID and retry the request"
404Response
application/jsonerrorrequiredStable error code
Example"INVALID_REQUEST"messagerequiredHuman-readable error message
Example"Invalid customer ID format"resolutionrequiredSuggested next action
Example"Correct the customer ID and retry the request"
409The store takes no web payments, its Adyen integration is unavailable, or the provider refused to open a session
The store takes no web payments, its Adyen integration is unavailable, or the provider refused to open a session
application/jsonerrorrequiredStable error code
Example"INVALID_REQUEST"messagerequiredHuman-readable error message
Example"Invalid customer ID format"resolutionrequiredSuggested next action
Example"Correct the customer ID and retry the request"
422Empty or unpriced cart
Empty or unpriced cart
application/jsonerrorrequiredStable error code
Example"INVALID_REQUEST"messagerequiredHuman-readable error message
Example"Invalid customer ID format"resolutionrequiredSuggested next action
Example"Correct the customer ID and retry the request"