Promotions
A promotion is a discount you define once, for example “10% off with credit cards in October”. WHITELABEL checks each payment against your promotions, shows the discounted price at checkout, and charges exactly that price.
Promotions is enabled per organization
Promotions is off by default. WHITELABEL turns it on for your organization, and it then works on the accounts of that organization. Ask your Technical Account Manager or Key Account Manager to enable it, in sandbox first and then in production.
Until it’s enabled, no promotion applies to your payments: Create Promotion Quote answers 204, and the checkout shows the regular price.
How it works
A promotion reaches a payment in three steps. The quote is the link between them: it’s the price the customer saw, and the payment charges that price.
- Create the promotion. Use the WHITELABEL Dashboard or Create Promotion. You set the discount, the dates, and the conditions a payment must meet (card BIN or BIN range, card type, payment method, country, currency, minimum or maximum amount).
- Get a quote. Before the payment, WHITELABEL prices it: which promotion applies, the original amount, the discount, and the charge. The answer carries
quote_idandpromotions(one entry today, withid,name,description,discountanddiscount_amount). With the WHITELABEL checkout this happens by itself. With a direct API integration, you call Create Promotion Quote. - Create the payment with the quote. Send the original
amountandadditional_data.order.discounts: [{ "type": "YUNO_PROMOTION", "quote_id": "qte_…" }]on Create Payment. WHITELABEL charges the quoted total and returns the breakdown.
A promotion applies only when the payment carries a quote id on a discount line
WHITELABEL never discounts a payment by itself. A payment without a quote_id on additional_data.order.discounts is charged in full, exactly as today, even when a promotion would have matched it.
Enable promotions for your organization
- Ask your Technical Account Manager or Key Account Manager to enable Promotions for your organization. Start with sandbox.
- Once it’s on, create your promotions from the Dashboard or the API. Each promotion belongs to one
account_id. If you run the same campaign on several accounts, create it once per account. - Test a payment in sandbox with a card that meets the conditions, then ask for production.
WHITELABEL can also turn Promotions off for an organization. When it’s off, quotes answer 204 and the checkout shows the regular price, so the customer never sees a discount that the payment doesn’t honour.
Create a promotion
curl --request POST \
--url https://api-sandbox.whitelabel.com/v1/promotions \
--header 'X-Idempotency-Key: <Your idempotency-key>' \
--header 'content-type: application/json' \
--header 'private-secret-key: <Your private-secret-key>' \
--header 'public-api-key: <Your public-api-key>' \
--data '
{
"account_id": "493e9374-510a-4201-9e09-de669d75f256",
"name": "10% off with credit cards - Mother'\''s Day",
"schedule": { "starts_at": "2026-10-01T03:00:00Z", "ends_at": "2026-11-01T02:59:59Z" },
"redemption": { "mode": "AUTOMATIC" },
"discount": { "type": "PERCENTAGE", "value": 10 },
"conditions": {
"bins": { "values": ["457896", "40263412"], "ranges": [{ "start": "45780000", "end": "45789999" }] },
"payment_methods": { "values": ["CARD"] },
"card_types": { "values": ["CREDIT"] },
"countries": { "values": ["AR"] },
"amounts": { "values": [{ "currency": "USD", "min": 100.00, "max": null }] }
}
}'Things to know before you create one:
- Promotions can’t be edited. The only change is to disable one, and that’s final. To change a discount, disable the promotion and create a new one. This keeps every past payment explainable.
- There’s no delete. A disabled or expired promotion stays in your list.
- The status follows the dates.
SCHEDULEDbeforestarts_at,ACTIVEinside the window,EXPIREDafterends_at, andDISABLEDonce you disable it. Dates are UTC. - All conditions must hold. AND across condition keys, OR inside each key’s
valueslist. Omit a key for no condition on that dimension. - Fixed discounts have a currency. A
FIXEDdiscount usesdiscount.amounts(one entry per currency, above zero). When you also setconditions.amounts, the two must list the same currencies or create returns400.
See The Promotion Object for every field.
Promotion codes
AUTOMATIC; codes are coming in a later release.A promotion can require a code instead of applying automatically. Set redemption.mode to CODE with a redemption.code (3 to 32 characters) when you create it; the code is unique per account among the promotions that can still apply, and becomes reusable once the earlier one is disabled or its schedule ends. The customer types the code at checkout, or your server sends it as code on the quote. A wrong code answers 404, and a code that can’t apply right now answers 422, so the customer can try again. Automatic promotions still apply without a code.
When more than one promotion matches
One payment gets one promotion. Promotions don’t add up.
When two or more promotions match the same payment, WHITELABEL picks the one that saves the customer the most. If two save the same amount, the oldest one (earliest created_at) wins; if that also ties, the smallest id wins. The result is the same every time you ask.
| Payment of USD 250 | Saving | Result |
|---|---|---|
| Promotion A: 10% off | USD 25 | |
| Promotion B: USD 30 off | USD 30 | Applies |
A fixed discount is capped at the payment amount; a charge of zero is valid. A promotion whose discount is zero doesn’t apply.
What the customer sees at checkout
With the WHITELABEL checkout you don’t build anything. When the customer enters a payment method that qualifies, the checkout:
- Asks WHITELABEL for the quote, right after the payment method is recognized.
- Announces the offer, for example “Your card has a 10% discount available”.
- Updates the order summary: the original price, the discount, and the new total. The pay button shows the new total.
If the customer changes to a payment method that doesn’t qualify, the summary goes back to the regular price. When no promotion applies, the checkout looks exactly as it does today.
| Order summary | USD |
|---|---|
| Original price | 250.00 |
| Discount (10% off) | − 25.00 |
| Total to pay | 225.00 |
Direct API integration
Without the WHITELABEL checkout, you ask for the quote yourself, from your server, and send it on the payment:
- Get the quote. Call Create Promotion Quote with the payment context: account, amount, country and payment method. For a card, identify it in one of two ways inside
payment_method:bin(the first 6 to 8 digits) withcard_type, ortokenorvaulted_token, and WHITELABEL resolves the card. Never both: abintogether with a token is rejected with400 INVALID_PARAMETERS, and so is abinwith more than 8 digits, fewer than 6, or anything but digits. Without a BIN, a promotion with abinsorcard_typescondition doesn’t apply. A wallet payment (Apple Pay, Google Pay) has no BIN; a promotion for a wallet has nobinscondition. - Show the price. On
200, showcharge_amountto your customer. On204, create the payment as usual, with noquote_idon a discount line. - Create the payment with the quote. Send the original
amountandadditional_data.order.discounts: [{ "type": "YUNO_PROMOTION", "quote_id": "<quote_id>" }], as shown below.
Create the payment with the quote
Send the original amount and a discount line with type: YUNO_PROMOTION and the quote_id (opaque, up to 500 characters) on Create Payment. WHITELABEL rejects a payment that sends the discounted amount instead of the original. Each line has a type: MERCHANT (the default) for a discount you computed, with id, name and unit_amount; YUNO_PROMOTION for a quote, with quote_id only. A YUNO_PROMOTION line rejects id, name and unit_amount; a MERCHANT line rejects quote_id; any mix returns 400. A line with quote_id and no type is read as YUNO_PROMOTION. One quote per payment.
{
"account_id": "493e9374-510a-4201-9e09-de669d75f256",
"country": "AR",
"amount": { "currency": "USD", "value": 250.00 },
"additional_data": {
"order": {
"discounts": [{ "type": "YUNO_PROMOTION", "quote_id": "qte_0d91f7ac3b2e" }]
}
}
}Don’t subtract the discount yourself
Send the original amount and the quote_id on a discount line. WHITELABEL computes the charge.
What the payment carries
amount on the response and on every payment.* webhook is the amount you sent, never rewritten. The net amount charged is on the transaction (transactions[].amount). The total WHITELABEL discount is a new top-level discount_amount, the sum of the YUNO_PROMOTION lines. WHITELABEL fills your YUNO_PROMOTION discount line (quote_id, id = the promotion id, name, unit_amount = the discount in the order currency). Your own MERCHANT lines stay as you sent them. The provider receives the filled discount line.
{
"id": "b2c9d0e1-6f0e-4c2a-9c55-7d8a0b311f2e",
"status": "SUCCEEDED",
"amount": { "currency": "USD", "value": 250.00 },
"discount_amount": { "currency": "USD", "value": 25.00 },
"additional_data": {
"order": {
"discounts": [
{
"type": "YUNO_PROMOTION",
"quote_id": "qte_…",
"id": "b7c1a4f2-6e0d-4a3b-9c55-1f2e7d8a0b31",
"name": "10% off with credit cards - Mother's Day",
"unit_amount": 25.00
},
{
"type": "MERCHANT",
"id": "LOYALTY-5",
"name": "Loyalty 5%",
"unit_amount": 12.50
}
]
}
},
"transactions": [
{ "type": "PURCHASE", "amount": { "currency": "USD", "value": 225.00 } }
]
}| Field | Meaning |
|---|---|
amount | The amount you sent. Never rewritten. |
discount_amount | Total WHITELABEL discount on this payment (sum of the YUNO_PROMOTION lines). Top level. |
additional_data.order.discounts[] with type: YUNO_PROMOTION | Your quote line, filled by WHITELABEL after the verify: quote_id, id (the promotion id), name, unit_amount (the discount in the order currency). |
additional_data.order.discounts[] with type: MERCHANT | Your own discounts, passed through unchanged. |
transactions[].amount | The net amount charged: amount minus discount_amount. |
amount − discount_amount= the transaction amount.- Refunds and captures operate on the transaction amount (the net). No new rule.
- A payment without a promotion is byte-for-byte today’s response.
- Every
payment.*webhook carries the samediscount_amountand the same filled discount line.
The customer pays the quoted price, or the payment is rejected
A quote is valid for 30 minutes after it is issued (expires_at), on every path. Inside that time the payment charges the quoted price, even if the promotion’s end date passed after the quote was issued.
If WHITELABEL can’t honour the quote, it rejects the payment and never charges the full price silently. Re-quote and show the new price, or confirm the full price with the customer. A retry after a decline may reuse the quote while it is valid.
| HTTP | Code | When | What to do |
|---|---|---|---|
422 | PROMOTION_QUOTE_INVALID | The quote id is malformed or its signature does not verify. | Get a new quote. |
422 | PROMOTION_QUOTE_EXPIRED | The quote is past expires_at. | Get a new quote. |
422 | PROMOTION_ACCOUNT_MISMATCH | The payment is on another account than the quote’s. | Use the quote on the account it was made for. |
422 | PROMOTION_AMOUNT_MISMATCH | The amount or currency differs from the quote. | Send the quoted original amount. |
422 | PROMOTION_CONTEXT_MISMATCH | Country, payment method, card type, card or session differ from the quote. | Get a new quote for the real context. |
422 | PROMOTION_ENGINE_UNAVAILABLE | WHITELABEL could not verify the quote after one retry. Nothing was charged. | Retry the same payment once, then get a new quote. |
400 | (validation) | A discount line mixes MERCHANT and YUNO_PROMOTION fields, or the payment carries two quote lines. | Fix the line. |
The verify compares only the fields that take part in the promotion’s conditions, plus the account, the amount, the expiry, and the checkout session when both sides have it. A changed amount, another account or another card never pays with the quote.
What’s not included yet
- Subscriptions and recurring payments. Promotions apply to one-time payments.
- Combining promotions. One promotion per payment.
- Usage limits and caps. A promotion has no redemption limit.
- Editing a promotion. Disable and create a new one.
- Coupons.