Loyalty Rewards Integration

Adding the PG on Juspay Dashboard

  • Login to the Juspay Dashboard and open PG Control Centre. Select the LOYLTYREWARDZ gateway and enter the gateway credentials to configure the PG.

  • Select LOYLTYREWARDZ Reward from Payment Method Configurations

Note

For Loyalty Rewardz, order_id = txn_id config needs to be disabled as each order would have more than one transaction

User Flows

Saved Card Flow

When a user selects the option to "Securely save the card for future payments" and successfully completes a transaction on the merchant app, then the card would be available as a pre-saved payment instrument in all future transactions.

Saved Card Flow | Fetch Balance
Saved Card Flow | Fetch Balance
Saved Card Flow | Split Transaction
Saved Card Flow | Split Transaction
Saved Card Flow | Full Redemption
Saved Card Flow | Full Redemption
No Rewards
No Rewards

New Card Flow

When a user initiates a transaction on the merchant app with a new (previously unsaved) card.

New Card Flow | Eligibility
New Card Flow | Eligibility
New Card Flow | Fetch Balance
New Card Flow | Fetch Balance
New Card Flow | Split Transaction
New Card Flow | Split Transaction

Order Status API

The transaction details will be available in the root structure of the orderStatus (/orders/:order_id) block.

For Loyalty Rewardz integration, merchant needs to handle new order statuses (AUTO_REFUNDED and PARTIAL_CHARGED) and a new array block txn_list in the order status response for the 2 transactions (CARD + LOYLTYREWARDZ).

Note
  • AUTO_REFUNDED

    It indicates that primary card transaction is successful but the LOYLTYREWARDZ transaction got failed and JUSPAY has called Auto Refund for primary card transaction.

  • PARTIAL_CHARGED

    It indicates that primary card transaction is successful but the LOYLTYREWARDZ transaction is in PENDING state.

Order Status - Sample Request

Order Status Response: Reward Transaction

Order Status Response: Card + Reward Transaction

Refund Handling

Refund requests (full/partial) can be initiated by the merchant at Transaction level or at Order level.

Since the LOYLTYREWARDZ transactions can be split between an existing Gateway and LOYLTYREWARDZ, the merchant can choose between one of the two provisions:

  • Order based refunds

    • Merchant will pass order_id and amount (refund amount) to Juspay.

    • An order may have 2 transactions (Card and LOYLTYREWARDZ), Juspay will try to prioritise card transaction for refund and if the refund amount is greater than card transaction amount then JUSPAY will initiate refund call to LOYLTYREWARDZ.

    • In case refund amount is lower than card transaction amount than merchant will receive refund response similar to transaction id based refund response

    • Refund response will include new key split_refund_details

  • Transaction based refunds

    • Merchant would initiate refunds against all transaction Ids, with txn_id and amount for each transaction

    • Refund response will remain the same as what merchants currently sees for transaction based refunds. No additional handling required.

Order Based Refund - Sample Request and Response

Transaction Based Refund - Sample Request and Response

Last updated 1 year ago