In this guide you will learn how to integrate, redeem and use Points for a purchase.
For more information on Thank You Points, see our Overview.
Before starting the steps in this guide, you must do the following:
This step takes in the customer's card and returns the available rewards they can use for a purchase. This will provide the number of points, the currency value of the points and any discounts if available.
{
"account_id": "ESA_a1781985f3bb482ba18bcd1729ffea14",
"transaction": {
"amount": "2000"
},
"payment_method": {
"first_name": "Jane",
"last_name": "Doe",
"entry_mode": "ECOM",
"card": {
"number": "4391200100101497",
"expiry_month": "12",
"expiry_year": "25"
}
}
}{
"total_record_count": 1,
"current_page_size": 1,
"merchant_id": "MER_f910aa8af22a477d9208e17d4cbd2fbf",
"merchant_name": "UCP_QA_Fidelity_Testing_Valid Merchant",
"account_id": "ESA_a1781985f3bb482ba18bcd1729ffea14",
"account_name": "Valid Testing account Fidelity",
"filter": {
"card.number_last4": "XXXXXXXXXXXX1497"
},
"paging": {
"page_size": 1,
"page": 1,
"order": "ASC",
"order_by": "TIME_CREATED"
},
"memberships": [
{
"rewards": [
{
"type": "POINTS",
"count": "7271590.0",
"currency_amount": "116345400"
},
{
"type": "DISCOUNT",
"code": "10005",
"description": "10% descuento en tus compras",
"currency_amount": "200"
}
]
}
],
"action": {
"id": "ACT_9vggH7K48tMKtVqluVFyoM6FxkeOTe",
"type": "MEMBERSHIP_LIST",
"time_created": "2025-09-22T19:30:34.289Z",
"result_code": "SUCCESS",
"app_id": "dt8gykOQ8JiC06rDx1hcTTYYI9k1zAYg",
"app_name": "Valid_app_for_Fidelity_testing"
}
}Once you have obtained the points balance, you can redeem the points for a specific transaction amount. This will deduct the customer's Points balance from their account. If Discounts are available, the discount will be applied first before the available points are used. This will return a unique Loyalty ID (LOR_ID)
{
"type": "REDEMPTION",
"account_id": "ESA_a1781985f3bb482ba18bcd1729ffea14",
"reference": "12345 ",
"transaction": {
"amount": "2000"
},
"payment_method": {
"first_name": "Jane",
"last_name": "Doe",
"entry_mode": "ECOM",
"card": {
"number": "4391200100101497",
"expiry_month": "12",
"expiry_year": "25"
}
}
}{
"id": "LOR_5625066",
"type": "REDEMPTION",
"status": "COMPLETE",
"time_created": "2025-09-22T19:39:29.762Z",
"time_last_updated": "2025-09-22T19:39:29.762Z",
"currency_amount_redeemed": "2000",
"points_redeemed": "113.0",
"discount_amount_redeemed": "200",
"transaction": {
"amount": "2000"
},
"rewards": [
{
"count": "7271477.0",
"currency_amount": "116343600",
"type": "POINTS"
}
],
"action": {
"id": "ACT_NEQlPtDKlyY2PgbEEm21sgKLwrz5kE",
"type": "LOYALTY_ORDER_REDEEM",
"time_created": "2025-09-22T19:39:29.762Z",
"result_code": "SUCCESS",
"app_id": "dt8gykOQ8JiC06rDx1hcTTYYI9k1zAYg",
"app_name": "Valid_app_for_Fidelity_testing"
}
}Once the Points have been redeemed, you can now carry out the transaction with the points redemption details. If there is a remaining balance , this will be sent to the gateway to be authorized. It is important to note that the transaction amount has to be the full amount of the sale.
{
"account_id": "TRA_de4056731241446fb82371a542439c74",
"type": "SALE",
"channel": "CP",
"amount": "5000",
"currency": "MXN",
"country": "MX",
"capture_mode": "AUTO",
"reference": "TRANS-202300987623ee68",
"description": "DESC-20098765927",
"payment_method": {
"first_name": "Jane",
"last_name": "Doe",
"entry_mode": "ECOM",
"card": {
"number": "4391200100101497",
"expiry_month": "12",
"expiry_year": "25"
}
},
"loyalty_order": {
"redeem_id":"LOR_5625066"
}
}{
"id": "TRN_6RYa1wY6lOdNzQfR0X2A1Uru1UF5Nj",
"time_created": "2025-09-22T19:52:38.189Z",
"type": "SALE",
"status": "CAPTURED",
"channel": "CP",
"capture_mode": "AUTO",
"amount": "3000",
"currency": "MXN",
"country": "MX",
"merchant_id": "MER_f910aa8af22a477d9208e17d4cbd2fbf",
"merchant_name": "UCP_QA_Fidelity_Testing_Valid Merchant",
"account_id": "TRA_de4056731241446fb82371a542439c74",
"account_name": "Portico Integration Fidelity Testing account",
"reference": "TRANS-202300987623ee68",
"payment_method": {
"result": "00",
"message": "APPROVAL",
"entry_mode": "ECOM",
"card": {
"brand": "VISA",
"masked_number_last4": "XXXXXXXXXXXX1497",
"authcode": "VI5000",
"brand_reference": "305265450007958",
"provider": {
"result": "00",
"avs_result": "0"
},
"commercial_level": "LEVEL_1"
}
},
"platforms": [
{
"type": "PORTICO",
"transaction_id": "643199666"
}
],
"batch_id": "BAT_1211205-44",
"loyalty_order": {
"redeem_id": "LOR_5625066",
"redeem_status": "COMPLETE",
"currency_amount_redeemed": "2000",
"points_redeemed": "113.0",
"discount_amount_redeemed": "200"
},
"action": {
"id": "ACT_6RYa1wY6lOdNzQfR0X2A1Uru1UF5Nj",
"type": "AUTHORIZE",
"time_created": "2025-09-22T19:52:38.189Z",
"result_code": "SUCCESS",
"app_id": "dt8gykOQ8JiC06rDx1hcTTYYI9k1zAYg",
"app_name": "Valid_app_for_Fidelity_testing"
}
}Points Redemption can also be reversed resulting in the points balance being restored to the customer's account. If a Transaction with points is to be reversed, it is important to also reverse the points redemption.
{
}{
"id": "LOR_5625066",
"type": "REDEMPTION",
"status": "REVERSED",
"action": {
"id": "ACT_RVARByQtXgoactyFBcSRV8RLZBIcp8",
"type": "LOYALTY_ORDER_REVERSE",
"time_created": "2025-09-22T20:42:07.638Z",
"result_code": "SUCCESS",
"app_id": "dt8gykOQ8JiC06rDx1hcTTYYI9k1zAYg",
"app_name": "Valid_app_for_Fidelity_testing"
}
}Our Thank You Points solution is available for testing in our Sandbox environment for registered users of this developer portal. Use our test cards to try different scenarios for your application to handle. For the full list of card numbers, see Test Cards.