Skip to main content

Go live with Boost

Take a campaign from created to a customer redeeming a reward — and read the lift it produced — end to end.

This is the full customer journey stitched together in code: show a customer the rewards on offer, record that they completed your action, deliver the reward, send them through the tracked redemption link, and then measure what happened.

By the end you'll have driven one journey from teaser to redemption and read the campaign's statistics.

Before you begin​

All calls in this tutorial go to the Boost host, https://boost.paylode.com.

The journey, step by step​

A journey is one customer's pass through the campaign. It's tracked by a journeyId that Paylode mints when you fetch teasers; you carry that id through the later steps so they all tie back to the same customer.

1. Show the teasers​

Teasers are the "here's what you could earn" preview — reward titles, callouts, and branding, with no redemption detail yet. Fetching them starts the journey and returns the journeyId.

# Authentication for the customer-journey endpoints (teasers, track, rewards,
# click) is being finalized — see the API reference for the current requirement.
curl "https://boost.paylode.com/teasers/9b2c1e40-7a3d-4c88-9f21-2a1b6c5d4e30"

The response carries the journeyId and the ranked teasers (trimmed):

{
"journeyId": "1f4d0a90-5c2b-4e77-8a13-9d6f2b0c7e51",
"teasers": [
{
"rank": 1,
"title": "Get 16 free meals",
"callout": "up to 70% off",
"description": "Fresh dinners delivered to your door",
"banner": "https://image.paylode.com/public/banners/example.png",
"partner": { "name": "Sunrise Kitchen", "logotype": "https://image.paylode.com/public/logos/example.png" }
}
]
}

Hold on to that journeyId — every later step uses it.

A gift-card incentive comes back as a teaser too, marked "type": "GIFT_CARD" and carrying the card's face value. The brand is the partner, and the callout reads as the card's value (trimmed):

{
"rank": 2,
"type": "GIFT_CARD",
"title": "Example Coffee Co.",
"callout": "$25 gift card",
"denomination": 25,
"currency": "USD",
"banner": "https://image.paylode.com/public/logos/example.png",
"partner": { "name": "Example Coffee Co.", "logotype": "https://image.paylode.com/public/logos/example.png" }
}

A teaser only shows the card. Nothing is set aside from your pool until the reward is delivered in step 3. A teaser without type is a perk.

2. Track the action​

When the customer completes your target action (creates the account, makes the purchase), record it against the journey with POST /track/{campaignId}. The event name and parameters are yours to define:

# Authentication is being finalized — see the API reference.
curl -X POST "https://boost.paylode.com/track/9b2c1e40-7a3d-4c88-9f21-2a1b6c5d4e30" \
-H "Content-Type: application/json" \
-d '{
"name": "account created",
"journeyId": "1f4d0a90-5c2b-4e77-8a13-9d6f2b0c7e51",
"parameters": [
{ "key": "plan", "value": "starter" }
]
}'

A successful track returns 204 No Content. Event names are 3–60 characters and you must send at least one parameter (key 1–60 chars, value up to 255).

3. Deliver the rewards​

Now fetch the rewards for the journey with GET /rewards/{campaignId}, passing the journeyId from step 1 so the reward ties back to the same customer:

# Authentication is being finalized — see the API reference.
curl "https://boost.paylode.com/rewards/9b2c1e40-7a3d-4c88-9f21-2a1b6c5d4e30?journeyId=1f4d0a90-5c2b-4e77-8a13-9d6f2b0c7e51"

Unlike teasers, a reward carries everything the customer needs to redeem — a redemption_note, a single-use coupon when the reward is a coupon perk, and a click_url for the Redeem button (trimmed):

{
"journeyId": "1f4d0a90-5c2b-4e77-8a13-9d6f2b0c7e51",
"rewards": [
{
"rank": 1,
"title": "Get 16 free meals",
"callout": "up to 70% off",
"redemption_note": "Use code SPRING16 at checkout",
"is_coupon": true,
"coupon": "SPRING16",
"click_url": "https://boost.paylode.com/click?token=sk_example_perk_7c1e9a",
"banner": "https://image.paylode.com/public/banners/example.png",
"partner": { "name": "Sunrise Kitchen", "logotype": "https://image.paylode.com/public/logos/example.png" }
}
]
}
note

Rewards are idempotent per journey. Calling getRewards again with the same journeyId returns the same reward — a coupon code is allocated once per journey, so re-fetching doesn't burn a second code.

A gift-card reward is where the card is actually handed out. The first getRewards call for a journey reserves one card from the incentive's pool and creates its reward link. The reward carries the face value, a redemption_note, and an end_date: the moment the link expires if the customer hasn't revealed the card. The link stays valid for the duration you set on the incentive, counted from this first delivery (trimmed):

{
"rank": 2,
"type": "GIFT_CARD",
"title": "Example Coffee Co.",
"callout": "$25 gift card",
"denomination": 25,
"currency": "USD",
"redemption_note": "Open your reward page to reveal the card",
"is_coupon": false,
"click_url": "https://boost.paylode.com/click?token=sk_example_gift_7c1e9a",
"end_date": "2026-11-01T14:30:00Z",
"partner": { "name": "Example Coffee Co.", "logotype": "https://image.paylode.com/public/logos/example.png" }
}

One journey gets one card. Calling getRewards again with the same journeyId returns the same card and the same expiry; it never reserves a second one. If the customer doesn't reveal the card by end_date, the link expires and the card goes back to your pool.

Put the reward's click_url behind the Redeem button. It points at the Boost click redirect — when the customer follows it, GET /click?token=... records the click and responds with a 302 to the offer. You don't build this URL; you use the one the reward gave you:

<a href="https://boost.paylode.com/click?token=sk_example_perk_7c1e9a"
target="_blank" rel="nofollow noopener noreferrer">Redeem</a>

For a gift card, the same redirect takes the customer to the card's Allocation Page, where they reveal the code. Your cmeta_ and utm_ parameters on the Redeem link are recorded with the click, just as for a perk (see cmeta for Boost).

caution

A gift card's click_url hands over the card. Anyone who follows it reaches the card's reveal page, so treat it like the reward link it leads to. Show it only to the customer who earned it, and keep it out of your logs, analytics events, and error reports.

That's the whole loop: teaser → action → reward → redemption, all tied to one journeyId.

Test without polluting your numbers​

Every customer-journey call accepts disableTracking=true. The call behaves normally — teasers and rewards come back, a coupon is handed out as a throwaway — but the request is flagged as test data and left out of your statistics. Use it to rehearse the flow end to end before you point real traffic at it:

curl "https://boost.paylode.com/teasers/9b2c1e40-7a3d-4c88-9f21-2a1b6c5d4e30?disableTracking=true"

A gift-card reward fetched this way is a stand-in: no card is reserved and your pool's counts don't move, so you can rehearse as often as you like. Its Redeem link doesn't lead to a real card. To see the page your customers will reveal, preview it from the pool instead; see Share gift-card reward links.

Measure the lift​

Campaign performance isn't part of the journey API — read it where the rest of your team does:

  • In the app — the campaign's Performance tab shows completed actions and the business value they represent (the completed-action count multiplied by the value you set on the campaign). Test-flagged journeys (disableTracking=true) are excluded.
  • In analytics — for your own dashboards or deeper slicing, query the same activity through Analytics: the Boost event views and conversions_of_boost break engagement down by campaign, journey, and your cmeta attributes. Start with Boost performance.

Formatting reward copy as HTML​

By default description and details come back as plain text. Add htmlFormatting=true to a teasers or rewards call and Paylode converts them to HTML — line breaks become <br>, list-like lines become <ul>/<ol>, and links are wrapped in <a> tags. The response is still JSON; only those string fields change:

curl "https://boost.paylode.com/rewards/9b2c1e40-7a3d-4c88-9f21-2a1b6c5d4e30?htmlFormatting=true"

Error reference​

StatusMeaningWhat to do
400 (string body)A bad request. Click errors return TOKEN_INVALID; campaign create/update errors return codes like PERK_NOT_FOUND or PERK_RANK_DUPLICATED.Fix the offending value and retry.
403Rewards are restricted to your IP whitelist — the campaign's IP-whitelist setting is on, or the reward is a protected offer — and the caller isn't on the list (CALLED_FROM_UNTRUSTED_SOURCE).Call from a whitelisted address — see Restrict access by IP.
404Campaign not found.Check the campaignId.
409The campaign is paused; teasers and rewards aren't served.Resume it — see Pause a campaign or incentive.
422Every active incentive in the campaign is exhausted; the body carries reason: "ALL_DEPLETED".Top up the gift-card pools or swap in fresh perks — see Add and rank incentives.

Troubleshooting​

caution

Rewards come back empty. Only active, valid incentives on an active campaign are shown. Confirm the campaign is active, that at least one incentive is active, and that its perk hasn't expired (the app flags campaigns whose perks expire soon).

note

A coupon reward shows "Sorry, no codes left". The reward's coupon pool is empty. Swap in a replacement perk before more customers reach it.

note

A gift-card reward shows "Sorry, no cards left". The incentive's pool ran out of cards at that amount before this journey's card was reserved. The reward comes back with an empty click_url and no end_date, so hide its Redeem button. The incentive pauses itself at that point: top up the pool, then set it back to active; see Add and rank incentives.

note

Empty is not depleted. A campaign with no active incentives still returns 200 with an empty rewards list — there's simply nothing configured to show. 422 with reason: "ALL_DEPLETED" means something different: the campaign has active incentives, but every one of them has run out. Handle both cases in your integration if you message the state to customers.

For the full request and response schema, see the customer-journey operations (getTeasers, trackEvent, getRewards, registerClick) and the statistics operations (getCampaignStatistics, getCampaignsStatistics) in the API reference.