contents order, and text from the offer’s fixed fields such as name. Position breaks when a template has more slots than the fixed fields, or when a new template version orders its slots differently.
All four fields are optional. A response without them stays valid: the web shop shows the offer in your shop’s default template for its type and fills the slots by position.
Agree your templates, their versions and their slot names with your Stash engineering partner. Stash compares every
templateKey, layoutKey, buyButton.layoutKey and textSlots key exactly as sent: case-sensitive, untrimmed, and with no prefix matching. Title and title are different slots, and starter-offer-v2 and starter-offer-v3 are different templates.
product using named slots
starter-offer template. Its Title slot shows “Spring Starter Bundle”, not the name, and each reward fills the slot its layoutKey names.
Template choice
Reward slots
Rewards and slots that do not match up. Each template has room for a set number of rewards, in total and in each part of the card. An offer whose rewards do not fit is left out of the web shop and reported as
ITEM_NOT_RENDERABLE in CATALOG_ITEMS_DROPPED. With fewer rewards than reward slots, the unfilled slots stay empty.
Buy button slots
A template can give each buy button a slot of its own, separate from the slots its rewards fill, for example one buy button slot per price point of a pack. Name it in the buy button’slayoutKey, in attributes.buyButton of the product or the pack item.
- The label stays the price.
textis optional on a buy button. SendbuyButtonwith onlylayoutKeyto name the slot and keep the button’s default label, the price. - Buy buttons only.
layoutKeyis read on a buy button. On an info button it is ignored. - Empty or long keys. An empty
layoutKey, or one longer than 128 characters, counts as no key. - Buttons without a matching slot. When a buy button has no
layoutKey, has one that names no buy button slot of the template, or names the same slot as another buy button of the offer, the template decides where that button sits. - Display only. The slot never changes what is bought, charged or sent to
ConfirmPayment.
Text slots
A text slot shows the first of these that has a value:- Its
textSlotsvalue. - The fixed field the template fills that slot from, for example
namefor a title slot. Stash defines that field for each template.
textSlots changes only the offer card. Checkout and receipts show the fixed fields, so always send name (title on an info item).Localization
Localization
Each
textSlots value is a LocalizableText, localized like every other text field (see Localization). When its localizationKey has no translation for the player’s language, the slot shows the entry’s defaultText. When that is empty too, the slot shows its fixed field. Both cases are reported in CATALOG_TEXT_FALLBACK when catalog diagnostics are on for your shop.Ignored entries
Ignored entries
An entry whose key is empty, longer than 128 characters or not a text slot of the template is ignored, and so is an entry whose text is empty or resolves to empty. The offer still shows. Text of only spaces counts as a value.
Limit and repeated names
Limit and repeated names
- Limit. Stash keeps at most 50 entries with text, the first 50 by slot name in byte order.
- Repeated names. Send each slot name once. If a name repeats within one
textSlotsobject, Stash uses its first value and the rest of the catalog still loads.
Slots on purchase packs
SettemplateKey and textSlots on the pack, once for the whole offer. A price point (an item in the pack’s items) can add its own textSlots:
- For a slot set on both, the price point’s value is used for that price point. The pack’s entries fill every other slot.
- A price point entry that is ignored, for example an empty text or a key over 128 characters, leaves the pack’s entry for that slot.
- Of the combined entries, Stash keeps the first 50 by slot name in byte order.
attributes.buyButton. Here each price point’s rewards fill a Resources_* slot and its buy button sits in a SKU_* slot:
pack with a buy button slot per price point
These fields change only how the offer card shows the offer. What Stash sends to
ConfirmPayment, and what your backend grants, do not change.
Slot names belong to a template version. When you move an offer to a new version in
templateKey, send that version’s slot names. A name the version does not have counts as no key: the reward still shows, where the template places rewards without a slot, and the text slot shows its fixed field.
