Rewards as a Service (RAAS)

Please note, this feature has been known to explosively increase user retention, so proceed with caution 🤯

Our rewards as a service API allows you to offer your users rewards based on how well they spend using your card product. By doing this you can drive customer acquisition, increase retention, and also get your users to spend more on using your product.

With this feature, you can provide your users with promo codes and deals from over 30 merchants like Aliexpress, Namecheap, Edureka, Shein, Ebay, etc. as a reward whenever they perform transactions using your card.

Depending on the goal your company is trying to achieve, you can set up configurations for us to send the user a reward after every $100 they spend on the card or when they make their second transaction in a month, it's totally up to you.

Our machine-learning model will then go through the transactions the user has done before and match them with a relevant promo code or deal from one of their favorite merchants.

We've done all of the heavy lifting for you and you should be able to get going with this in a few hours.

STEP 1

The first thing you need to do is to get the rewards API activated for your organization, You can do this by contacting us via your dedicated support channel.

STEP 2

Secondly, you'll need to set the rules that will guide when a user gets a reward. You can do this from the settings page on the dashboard by selecting from the options we have available. Here's what each configuration do

  1. After every $100 transaction: This configuration sends a reward to a user after they perform transactions with a total value greater than $99. You can always configure what the amount threshold should look like.

  2. After the first 2 transactions in a month: This configuration sends a reward to a user after they perform 2 transactions in a month. You can also configure what the number of transaction requirements should look like.

  3. When a user hasn't done a transaction in the last 3 weeks: This configuration sends a reward to a user if they haven't performed a transaction in the last 3 weeks. You can also configure what the duration of inactivity should be.

Feel free to A/B test each of these configurations till you figure out what works best for your product based on the goal you'd like to achieve.

STEP 3

After your selected rule is met, we automatically give the user a reward and also send you a webhook event to notify you when this happens.

We use machine learning models to decide what type of reward to assign to a user based on the merchants they frequently purchase from and in cases where we have multiple deals from a merchant take for instance, several product promo codes for an e-commerce website we allow them to pick from one.

In the sandbox environment, we have an API that you can use to randomly assign a reward to a cardholder so you can test the webhooks and all other APIs. This endpoint will randomly assign either a Deal or a Promo code type of reward to the user and you can call it multiple times.

curl --location 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/reward/assign_reward' \
--header 'accept: application/json' \
--header 'token: Bearer at_test_****' \
--header 'Content-Type: application/json' \
--data '{
  "cardholder_id": "0190394985939030202202c0"
}'
Body
  • cardholder_id : String *required
Response

🟢 201: Reward was assigned successfully to the cardholder.

{
  "status": "success",
  "message": "Reward was assigned successfully",
  "data": {}
}

Below is the webhook event a user will get when they earn a reward

{
    "event": "reward_assigned_event.successful",
    "data" : {
        "cardholder_id": "859505050505",
        "reward_type": "DEAL",
        "reward_id": "474844949940209383883",
        "reward_description": "You just got a promocode that gives you 20% a domain purchase on Namecheap.",
        "issuing_app_id": "9ujinoncpsni3943198393939930ke",
        "livemode": True
    }
}

There are two types of rewards a user can get:

  1. Promo codes: A promo code is simply a coupon that gives the user a certain percentage off a specific product. e.g a promo code that gives a user 20% off a domain name purchase on Namecheap. Below is the model object for a promo code type of reward.

{
  "reward_id": "05b0757ba0704a8086c9a57c36f3634b",
  "reward_type": "PROMO_CODE",
  "coupon_code": "ABC20%",
  "reward_description": "Get 20% off all domain purchases on namecheap.",
  "merchant": "Namecheap",
  "created_on": "06/07/2023",
  "valid_till": 1656543600,
  "valid_till_date": "29/06/2022",
  "success_record": 40, //percentage
  "is_available": true,
  "upvotes": 10,
  "downvotes": 1,
  "product_link": "https://namecheap.com/domain"
}
  1. Deals: A deal allows a user to select from a large list of products which promo code offer they want. For example, we have over 3000 promo codes on Aliexpress. An Aliexpress deal allows the user to look through this list of 3000 products and select one product they'd like a promo code for. Below is the model object for a deal type of reward.

{
  "reward_id": "c0e3846500694a89b5edc17e6b78e03b",
  "reward_type": "DEAL",
  "description": "Select a deal from over 3000 products available on Aliexpress",
  "merchant": "Aliexpress",
  "created_on": "06/07/2023"
}

STEP 4

We have also provided you with an API that you can use to fetch all the rewards that a cardholder has.

curl --location 'http://issuecards.api.bridgecard.co/v1/issuing/reward/get_cardholder_rewards?cardholder_id=30db5a79d3bd4279b7e84fbd48c94b23' \
--header 'accept: application/json' \
--header 'token: Bearer ****'
Body
  • cardholder_id : String *required
Response

🟢 200 : Cardholder rewards fetched successfully.

{
  "status": "success",
  "message": "Cardholder rewards fetched successfully",
  "data": {
    "rewards": [
      {
        "PROMO_CODE": {
          "coupon_code": "USNEW10",
          "created_on": "1 year ago",
          "description": "$10 Off Order Over $100",
          "downvotes": 0,
          "is_available": true,
          "merchant": "AliExpress",
          "reward_id": "c2379b711db64f3c95b7b3080befcf5a",
          "reward_type": "PROMO_CODE",
          "success_record": 0,
          "upvotes": 0,
          "valid_till": 1849123459,
          "valid_till_date": "31/12/2028"
        },
        "has_been_claimed": true,
        "reward_earned": 1692834811,
        "reward_id": "c2379b711db64f3c95b7b3080befcf5a",
        "reward_type": "PROMO_CODE"
      },
      {
        "DEAL": {
          "created_on": "1692834325",
          "description": "Select from over  2 promocodes on Aliexpress",
          "merchant": "aliexpress",
          "reward_id": "db89fc4c996740ef931f653aa0f4998c",
          "reward_type": "DEAL"
        },
        "has_been_claimed": false,
        "reward_earned": 1692834325,
        "reward_id": "7627e3a948484040b247f05c3859c3f1",
        "reward_token": "f4367f280c294daeac28d2985b9ec13e",
        "reward_type": "DEAL"
      }
    ]
  }
}

🔴 400: Invalid Cardholder ID

{
    "message": "Invalid cardholder ID, there's no cardholder with this ID."
}

In the sandbox environment, we have an API that you can use to randomly assign a reward to a cardholder so you can test the webhooks and all other APIs. This endpoint will randomly assign either a Deal or a Promo code type of reward to the user and you can call it multiple times.

curl --location 'https://issuecards.api.bridgecard.co/v1/issuing/sandbox/reward/assign_reward' \
--header 'accept: application/json' \
--header 'token: Bearer at_test_****' \
--header 'Content-Type: application/json' \
--data '{
  "cardholder_id": "0190394985939030202202c0"
}'
Body
  • cardholder_id : String *required
Response

🟢 201: Reward was assigned successfully to the cardholder.

{
  "status": "success",
  "message": "Reward was assigned successfully",
  "data": {}
}

STEP 5

Promo codes are instantly ready to use by the user because they already show a coupon code the user can enter when they make a purchase on the merchant's website.

But deals work slightly differently, with deals your users can select from a list of products available at a merchant and then claim a promo code for one of these products based on what they find most relevant.

Once they claim the deal, the deal object automatically gets updated to a promo code object and the user can then use the coupon code they selected for the specific purchase. These are the steps involved in doing this

A. So when you see a deal in a user's reward list you will like this item cell on your client app to be clickable and then you can route them to the web page that we've built. This webpage shows them a list of products and allows them to select one product with a promo code they'd like to get.

So let's say your client app sees a deal object in the user's reward list, the first step will be to communicate with your backend to generate a token using the user's card_id.

Your backend service will need to create an endpoint where what it does is send a token to your client side from the card_id the client side sends to it.

Here's the API to do this

curl --location 'https://issuecards.api.bridgecard.co/v1/issuing/cards/generate_token_for_card_details?card_id=b7fc2fa1f2249e2ff' \
--header 'token: Bearer at_live_xxxxx'
Response

🟢 200: card token generated successfully.

{    
    "status": "success",
    "message": "Card token generated successfully, token is only valid for 5 minutes.",
    "data": {
        "token": "0d225cfe23e8496e84d8caa8c3ac3618"
    }
}

🔴 400: Invalid card ID

{
    "message": "Invalid card ID, there's no card with this ID."
}

B. Now that your client side has a valid token they can compose a url using this format

Production: https://bridgecard-issuing-app.com/rewards-service?reward_token=<reward_token>&card_token=<card_token>&merchant=<merchant> Sandbox: https://bridgecard-issuing-app.com/rewards-service?reward_token=<reward_token>&card_token=<card_token>&merchant=<merchant>&environment=sandbox and render this url in a webview.

The variable <card token> is where your client side will use the token they got from the backend in step A above

The value for the variable reward_token can be found in the deal object from the cardholder reward list.

The value for the variable merchant can be found in the deal object as well from the cardholder reward list.

The value for the variable environment is optional in the production environment but in the sandbox environment you'll have to pass the value sandbox

After you redirect your users to this web-view we will handle the rest.

We'll show the user a list of products and they can select from any of these products

After the user selects one of the products, he'll be redirected to a screen to claim the promo code for the product.

From here we automatically update the deal in the cardholder's reward list to a promo code and they can go back into your app to copy the promo code.

These are all the steps you need to follow to integrate the reward as a service API.

Last updated