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

tenantIdrequired
eComStoreIdrequired
cartIdrequired

Request body (required)

application/json

Where the shopper returns after a redirect payment method, and who is paying

freightoptional

The 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"
carrierProductPayloadoptional

Provider-specific extra data

Show child fields
partnerNameoptional

Partner name from provider

partnerNumberoptional

Partner number from provider

freightVatRateoptional

VAT rate for freight as a percentage

  • Format: BigDecimal
Example"25.00"
netFreightAmountoptional

Net freight/shipping cost amount (excl. VAT)

  • Format: BigDecimal
Example"49.00"
returnUrlrequired

Absolute URL the shopper is sent back to after a redirect, e.g. Vipps. The storefront's checkout return page.

shopperEmailoptional

Shopper email, passed to the payment provider for risk and receipts

Responses

201Response
application/json

A 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.

amountrequired

Amount the session authorises: the cart's gross total

  • Format: BigDecimal
Example"100.0"
clientKeyrequired

Adyen client key for the Drop-in

currencyIsoCoderequired

ISO 4217 currency

Example"NOK"
environmentrequired

test or live

Example"test"
paymentIdrequired

Payment ID; hand it back at checkout

sessionDatarequired

Adyen session data for the Drop-in

sessionIdrequired
400Response
application/json
errorrequired

Stable error code

Example"INVALID_REQUEST"
messagerequired

Human-readable error message

Example"Invalid customer ID format"
resolutionrequired

Suggested next action

Example"Correct the customer ID and retry the request"
401Response
application/json
errorrequired

Stable error code

Example"INVALID_REQUEST"
messagerequired

Human-readable error message

Example"Invalid customer ID format"
resolutionrequired

Suggested next action

Example"Correct the customer ID and retry the request"
403Response
application/json
errorrequired

Stable error code

Example"INVALID_REQUEST"
messagerequired

Human-readable error message

Example"Invalid customer ID format"
resolutionrequired

Suggested next action

Example"Correct the customer ID and retry the request"
404Response
application/json
errorrequired

Stable error code

Example"INVALID_REQUEST"
messagerequired

Human-readable error message

Example"Invalid customer ID format"
resolutionrequired

Suggested 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/json
errorrequired

Stable error code

Example"INVALID_REQUEST"
messagerequired

Human-readable error message

Example"Invalid customer ID format"
resolutionrequired

Suggested next action

Example"Correct the customer ID and retry the request"
422Empty or unpriced cart

Empty or unpriced cart

application/json
errorrequired

Stable error code

Example"INVALID_REQUEST"
messagerequired

Human-readable error message

Example"Invalid customer ID format"
resolutionrequired

Suggested next action

Example"Correct the customer ID and retry the request"