Upsell after a completed purchase
Offer extra products to the customer once their credit purchase is complete. Today, build your own UI and call Reauthorize. A second option β letting Walley Checkout render the upsell inside the iframe β is in development and documented below as a draft.
Upsell only works for credit purchases (Walley invoice / part-payment) with status NotActivated or PartActivated. Auto-activated invoices cannot be upsold.
Choose your integrationβ
| Option | Who renders the UI | When to pick it |
|---|---|---|
| In-checkout upsell (draft) | Walley Checkout iframe | Under construction β not yet ready for production. Sweden, credit only. |
| Custom upsell using Reauthorize | Your own post-checkout UI | Recommended today. Use when you need full control or upsell is decided post-checkout. |
In-checkout upsellβ
This section describes a feature that is not yet generally available. The API shape, validation rules, and UI may still change. Do not integrate against this in production β for now, use the Reauthorize-based flow below.
How it worksβ
- Pass an
upsell.itemsarray on the Initialize Checkout request. Max 10 items. - The customer completes their purchase as usual.
- On the purchase-completed view, Walley Checkout renders the items as cards (image, description, price, Add button).
- When the customer taps Add, Walley appends the article to the order and reauthorises automatically. No merchant call required.
- Accepted items appear as extra rows in the order. Read them from Get Checkout Information under
order.itemsonce the purchase is complete.
Availabilityβ
- Country: Sweden (
SE) only. - Payment method: Walley credit purchases (invoice / part-payment).
- Order state: not auto-activated. If the order auto-activates, no upsell is shown.
If any of the above is not met the upsell block is silently omitted from the completed view β the rest of the checkout is unaffected.
Adding upsell items at initβ
Extend your existing Initialize Checkout request with an upsell object:
POST /checkouts HTTP/1.1
Host: api.uat.walleydev.com // (Different hostname in production)
Authorization: Bearer bXlVc2VybmFtZTpmN2E1ODA4MGQzZTk0M2VmNWYyMTZlMDE...
Content-Type: application/json
{
"storeId": 123,
"countryCode": "SE",
"reference": "123456789",
"redirectPageUri": "https://example.com/purchase-completed",
"merchantTermsUri": "https://example.com/terms",
"cart": {
"items": [
/* primary cart items */
]
},
"upsell": {
"items": [
{
"id": "10101",
"description": "Premium gift wrapping",
"quantity": 1,
"unitPrice": 49.0,
"vat": 25.0,
"sku": "GIFTWRAP-PREMIUM",
"imageUrl": "https://cdn.example.com/img/giftwrap.jpg"
},
{
"id": "10102",
"description": "Extended 2-year warranty",
"quantity": 1,
"unitPrice": 199.0,
"vat": 25.0,
"imageUrl": "https://cdn.example.com/img/warranty.jpg"
}
]
}
}
upsell.items[] propertiesβ
| Property | Required | Explanation |
|---|---|---|
| id | Yes | Article id. Max 50 characters. Shown on the invoice. |
| description | Yes | Short product description shown on the upsell card and the invoice. |
| quantity | Yes | Allowed values 1β99999999. |
| unitPrice | Yes | Unit price including VAT. Max 2 decimals. Range -999999.99β999999.99. |
| vat | Yes | VAT in percent. Max 2 decimals. Range 0β100. |
| imageUrl | Yes | Absolute HTTPS URL to the product image. Max 2048 characters. Rendered in the upsell card. |
| sku | No | Stock Keeping Unit. Max 1024 characters. |
A maximum of 10 upsell items can be sent per checkout.
Reading back what the customer acceptedβ
When the customer adds an upsell item, Walley appends it to the order. After the purchase is complete, Get Checkout Information returns the final order under order.items β accepted upsell rows show up alongside the original cart rows, keyed by the same id you sent at init:
{
"order": {
"orderId": "...",
"totalAmount": 248.0,
"items": [
/* original cart rows */
{
"id": "10101",
"description": "Premium gift wrapping",
"quantity": 1,
"unitPrice": 49.0,
"vat": 25.0,
"sku": "GIFTWRAP-PREMIUM"
}
]
}
}
Compare order.items against the cart you sent at init to determine which upsell items were accepted. Accepted items are already on the Walley invoice β no further merchant call is required.
Custom upsell using Reauthorizeβ
Itβs possible to include your own upsell functionality after the purchase is complete in the checkout. This is done with a call to Reauthorize with the added products of the customer's choice or a larger amount than the original.

How to get started πβ
- When the purchase is completed and the checkout information is fetched, it will return an
orderId. - Use the
orderIdfor calling the Reauthorize endpoint, remember to send along all existing article rows with the new upsell articles if you want the old articles to show on the new invoice. If you only want to adjust the amount, sending in an amount is enough. This will return a201or202response depending on if a credit check is needed or not. The response headers will contain aLocationheader with a path to the order. - Use this url path to verify that the order has successfully been reauthorized. In the case where a credit check happens (201), you will need to poll on the endpoint you recieved in the
Location headerto await that the reauthorize finalizes.