Use Button for Loyalty and Rewards on
All Platforms

Use Button for Loyalty and Rewards

With Button you can perform real-time loyalty & rewards transactions across the app ecosystem so you can begin rewarding your members for their daily purchases on their mobile devices.

Note: Want to work with companies not supported today? Just let us know and we'll work with them to make it happen!

In this guide, we will go over:

What might I want to use Button to do?

Button can support a wide range of loyalty & rewards use-cases but here are a few we've seen:

  • Rewarding users for purchases made in apps or mobile web.
  • ⁣⁣Giving users points, digital items or currency for purchases.
  • ⁣Providing offers or deals from partners with closed-loop tracking.
  • Increase your mobile revenue by converting taps to transactions - we’ve found this can be an increase of >400%.

How does a Loyalty or Rewards Integration with Button work?

There are two components to a Loyalty or Rewards integration with Button:

  1. Choose the method to show your users products or services through Button (either partners, or items from partners). There are a few options:

    • Button Tracking
    • App-to-App Support
    • Embedded Web checkout
    • A simple link to a Merchant
  1. Receive Webhooks when users install or checkout in partner apps, and crediting your users as necessary.

What would that look like in a diagram?

It would look like this...

Set up loyalty with Button in 5 steps

1. Configure the SDK and set up user-level IDs

The first thing you'll need to do is add the Button SDK to your app, initialize it and identify your users with your unique User ID. This is so that when we later tell you about an order that happened, we can also tell you which user that was for so that you can credit them accordingly.

2. Show your users products / Button Actions / Purchase Path

You can fetch actions from Button either by using our drop-in UI components (called Buttons πŸ˜‰), by using our SDK's custom UI actions, or by directly accessing the Merchants API.

Another option is to pass an existing link to Button's SDK to enhance it with a mix of tracking, native technology, and a highly optimized user experience. This simple approach allows you to add Button to virtually any purchasable item that is accessible through a URL. The SDK is smart enough to determine if Button supports commissioning a particular URL, so all you have to do is pass it to the SDK and Button will take care of the rest. For more information on Button Purchase Path, check out this guide.

Each method has a different set of trade-offs, but generally we recommend the Merchants API if you want to offer Merchant-level actions (e.g. Shop at Jet and get 5% back), Buttons or Custom Button UI if you want contextual item-level offers (e.g. Book a table at this restaurant and get 100 points), and Button Purchase Path if you want ease of use and high versatility.

Method Button Actions Button Purchase Path Custom Button UI Merchants API
Effort πŸ‘Ύ πŸ‘Ύ πŸ‘Ύ ⁣ πŸ‘Ύ πŸ‘Ύ ⁣ πŸ‘Ύ ⁣ β£πŸ‘Ύ
Versatility πŸ€– πŸ€– πŸ€– πŸ€– πŸ€– πŸ€– πŸ€– πŸ€– πŸ€–
Contextual Inventory βœ… ❌ βœ… ❌
Rates Available ❌ ❌ ❌ βœ…
Partner Metadata ❌ ❌ ❌ βœ…

3. Send users to the partner app to purchase

If you're using drop-in Button UI components, this will happen when the user taps the Button. If not, you'll need to invoke the Button action when your user gets to the point you want to deep link them. (Invoke Action)

Note: If the user doesn't already have the app installed, they will install it inline and you will receive a Webhook on completion to inform you of the commission earned.

4. Configure Webhooks on Commission Events

In order to receive notifications when your users Install or Checkout in Button Marketplace apps, you need to configure a Webhook. Webhooks send you a notification by POSTing to an API endpoint you declare with the details of the user and transaction.

You can configure Webhooks in the Dashboard Webhooks tab.

Pending and Validated States

Your web hook will be sent Transaction: Pending and Transaction: Validated events from Button. These represent pending & validated transactions respectively.

Until a transaction is marked as validated, it can be changed and should not be redeemable / cash-out-able to a user. Pending transactions can be shown to users in a pending state (e.g. Balance vs. Available Balance.)

5. Give users their rewards from Webhooks!

When you receive a Webhook POST, you know that one of your users did something that you may want to reward them for!

The Webhook payload will contain a few fields that are particularly useful:

  • publisher_customer_id: The ID (your ID) for the user that transacted
  • category: The Category of transaction (New User, Existing User & Install)
  • order_total: For orders, this is the amount of the order
  • status: The status of the transaction
  • commerce_organization: The ID of the app that the purchase was in

Full Webhook documentation

In this case, if you wanted to give a user 100 points for purchasing in App A, we would perform logic like the following:

// Get the user that made the transaction
User affectedUser = User.userByID(webhook.publisher_customer_id);

if (webhook.commerce_organization == TARGET_COMMERCE_APP_ID) {
    if (webhook.status == "validated") {
        affectedUser.addPoints(100, "Purchasing in App X");
    else if (webhook.status == "pending") {
        // Optionally tell them something here

Note: Where you want to share the commission between yourselves & the user in question, we can work with you to break out webhooks to different accounts. Just contact us! That way you can immediately apply amounts from webhooks to the users account.

Testing your integration

Now it's time to test that everything is working correctly.

  • Display a Button in your app
  • Tap it and go through to the Merchant app
  • Make a purchase
  • Your webhook will fire
  • Confirm that the webhook fires with the correct amount & userID.

Note: You can also use the Button Partner Test App to test out your integration, but it does not currently support userID so all webhooks will fire without a user ID.


Have other use-cases in mind, or see something that doesn't make sense? Contact us and we'll get in touch!

What's Next

Now that you know Button for Loyalty and Rewards, see more on how to integrate:

Configure Webhooks

Button allows you to configure webhooks so you can get real-time updates to your system when users push Buttons in your app. To do so, you will need to configure the destination of the webhook and what events you want to receive. Then, Button will send you an HTTP request when any of those events are created.

View Guide

Pass data through Button

You may want to pass data unique to your system through Button for easier end-to-end tracking when integrating Button. This guide goes over different methods for setting these values and reading them downstream.

View Guide