The integration has five logical steps:
| Step | Part | Required? | What it means for the merchant |
|---|---|---|---|
1 |
Create session ( |
Yes |
Create one session per checkout attempt and store the returned identifiers. |
2 |
Render wallet widget (iframe with |
Yes |
Show the wallet UI to the customer. |
3 |
Shipping callback ( |
Conditional |
Required only when shippable items exist and shipping options must be calculated dynamically. |
4 |
Return to shop and create order ( |
Yes |
After customer approval, the flow returns to your shop. Create the order in this step. Optionally fetch session details ( |
5 |
Process session ( |
Yes |
Call this after return to |
Redirect terms:
merchantRedirectUrl is where the flow returns the customer to your shop.
redirectUrl is returned by /express-checkout/session/process and is the next URL your shop must redirect the customer to.
Method: POST
URL: /api/v2.0/express-checkout/session/create
Authentication: HMAC token
For the full list of fields and their descriptions, see API Client.
Request model: IExpressCheckoutSession.ICreate.
Response model: ExpressCheckoutSessionCreateResponse.
{
"currency": "CHF",
"merchantRedirectUrl": "https://your-shop.com/checkout/complete?sessionUuid=550e8400-e29b-41d4-a716-446655440000",
"merchantShippingCallbackUrl": "https://your-shop.com/api/shipping-options?sessionUuid=550e8400-e29b-41d4-a716-446655440000",
"paymentMethodConfigurationId": 12345,
"lineItems": [
{
"uniqueId": "item-1",
"sku": "SKU-001",
"name": "Product Name",
"type": "PRODUCT",
"quantity": 1,
"amountIncludingTax": 42.00,
"shippingRequired": true,
"currency": "CHF",
"taxes": []
}
]
}
In this example, sessionUuid=550e8400-e29b-41d4-a716-446655440000 is a merchant-generated correlation value.
The shop must map sessionUuid to the returned sessionId.
The response contains:
sessionId — the ID of the created session
sessionToken — security token needed for processing
Implementation notes:
Required in practice: include order-defining data (currency, lineItems, merchantRedirectUrl).
Conditionally required: provide merchantShippingCallbackUrl when the wallet must request shipping options.
Optional: paymentMethodConfigurationId can be provided to target a specific payment method configuration. If not provided, the first available configured payment method configuration is used.
Required for reliable correlation: generate your own sessionUuid, append it to merchantRedirectUrl and merchantShippingCallbackUrl, and store a mapping sessionUuid <→ sessionId.
Store identifiers appropriately: persist sessionId for later processing. Keep sessionToken available until widget rendering is completed (persistent storage is optional).
Embed the wallet iframe in your page using the widget URL built with the sessionToken.
The widget handles address selection, shipping option display, and payment approval.
Minimal embed example:
<script src="https://<scope-base-path>/assets/payment/express-checkout-handler.js"></script>
<div id="express-checkout-container"></div>
<script>
window.ExpressCheckoutHandler.load('express-checkout-container', sessionToken);
</script>
The handler derives the target scope from the sessionToken and builds the widget endpoint as /s/{spaceId}/express-checkout/widget/{sessionToken}.
Using a scope-based script URL remains recommended, but root /assets/payment/express-checkout-handler.js also works as long as the sessionToken is passed unchanged.
Implementation notes:
Required: render the widget with the containerId and the sessionToken from session creation.
After wallet approval and return to your merchantRedirectUrl, call the processing endpoint to create the transaction and authorize the payment.
Method: POST
URL: /api/v2.0/express-checkout/session/process
Authentication: HMAC token (same as all REST API calls)
For the full list of fields and their descriptions, see API Client.
Request model: IExpressCheckoutSessionProcessRequest.
Response model: ExpressCheckoutSessionProcessResponse.
{
"sessionId": 123456,
"orderId": "ORDER-789",
// Optional. If omitted, the default URLs configured in the portal are used.
"successUrl": "https://your-shop.com/checkout/success",
"failureUrl": "https://your-shop.com/checkout/failure"
}
Implementation notes:
Required: call this endpoint after approval and after the customer is redirected back from the portal to your shop.
Required: provide sessionId and an idempotent orderId to make retries safe.
Required: redirect the browser to the URL returned in the response.
Optional: successUrl and failureUrl can be omitted. If omitted, the default URLs configured in the portal are used.
Optional (recommended): fetch session details before processing to validate final amount, address, and selected shipping option.
Recommended: treat webhooks as the source of truth for final asynchronous status (AUTHORIZED / FAILED), while browser redirects drive customer navigation.
The response contains a redirect target URL. Redirect the customer there to continue 3DS (if needed) and complete the flow.
You can retrieve the approved Express Checkout session before processing. This is useful to create or validate the shop order based on the final customer selections.
Method: GET
URL: /api/v2.0/express-checkout/session
Authentication: HMAC token
For the full list of fields and their descriptions, see API Client.
Typical usage:
Resolve your internal checkout reference to the stored sessionId
Fetch the session details
Build or validate your order from the returned address, selected shipping option, and totals
Call /express-checkout/session/process
If your products require shipping, you must implement a callback endpoint that wallee calls to fetch shipping options when the customer changes their address. The URL of this endpoint is provided per session via the merchantShippingCallbackUrl field in the create request.
The callback contract uses the following three models (for this callback, these models might not be listed under /doc/api/web-service):
IExpressCheckoutShippingOptionRequest
Required: countryCode, currency, language, expressCheckoutId, spaceId, requestId
Optional: state, street, city, postalCode
IExpressCheckoutShippingOptionsResponse
shippingOptions: list of IExpressCheckoutShippingOption entries (return at least one on success, empty list on error).
For the full list of fields and their descriptions, see IExpressCheckoutShippingOption.
error: null on success, or an IExpressCheckoutShippingOptionsClientError object on business error
IExpressCheckoutShippingOptionsClientError
Fields: error (short type), message (human-readable explanation), timestamp (optional time string)
Method: POST
URL: Your configured callback URL
Content-Type: application/json
Wallee sends the following fields in IExpressCheckoutShippingOptionRequest:
| Field | Type | Required? | Notes |
|---|---|---|---|
|
Long |
Yes |
Identifier of the Express Checkout session. |
|
String |
Yes |
Merchant space identifier. |
|
String |
Yes |
Correlation ID for tracing. |
|
String |
Yes |
Country code (ISO-3166 alpha-2). |
|
String |
Yes |
Currency code (ISO-4217). |
|
String |
Yes |
Language code (ISO-639). |
|
String |
No |
State or province code. |
|
String |
No |
Street address. |
|
String |
No |
City name. |
|
String |
No |
Postal or ZIP code. |
{
"expressCheckoutId": 123456,
"spaceId": "84",
"requestId": "21a2f7fe-51b7-4ed5-9f88-1fb128292986",
"countryCode": "CH",
"currency": "CHF",
"language": "en",
"state": "ZH",
"street": "Example Street 5",
"city": "Winterthur",
"postalCode": "8400"
}
Return a JSON object with shipping options or an error.
Your shop endpoint must return IExpressCheckoutShippingOptionsResponse to wallee as the HTTP response body.
Response contract:
Success path: return one or more shippingOptions and set error to null.
Error path: return an empty shippingOptions array and provide a populated error object.
Do not use non-200 HTTP codes for business errors: keep HTTP 200 and communicate errors in the body.
Use non-200 HTTP codes only for technical failures: for example invalid payload format, authentication failure, or server-side outage.
| Field | Type | Required? | Notes |
|---|---|---|---|
|
String |
Yes |
Unique identifier of the shipping option. |
|
String |
Yes |
Display name shown to the customer. |
|
String |
No |
Optional descriptive text. |
|
Decimal |
Yes |
Total shipping amount including taxes. |
|
Array |
No |
Tax lines with |
|
String |
Yes |
ISO-4217 currency code. Must match the session currency. |
| Field | Type | Required? | Notes |
|---|---|---|---|
|
String |
Yes |
Short error type identifier (for example |
|
String |
Yes |
Human-readable error description. |
|
String |
No |
Timestamp when the error occurred. |
{
"shippingOptions": [
{
"id": "standard",
"label": "Standard Shipping",
"description": "Delivery in 3-5 business days",
"amountIncludingTax": 9.99,
"taxes": [
{ "title": "VAT", "rate": 7.70 }
],
"currency": "CHF"
},
{
"id": "express",
"label": "Express Shipping",
"description": "Delivery in 1-2 business days",
"amountIncludingTax": 19.99,
"taxes": [
{ "title": "VAT", "rate": 7.70 }
],
"currency": "CHF"
}
],
"error": null
}
| Wallet | Status | Notes |
|---|---|---|
Available |
For testing and development only. |
|
In progress |
— |
|
Planned |
— |
|
Planned |
— |
For testing, use Bogus Pay.
It provides mock addresses, test cards, and approval flows (including 3DS simulation).