This article presents possible use cases and corresponding sample flows that you can support. This can be a helpful jumping off point as you plan your implementation.
Retrieve the full history of balance changes for a specified gift card when managing gift cards for customer service or reporting. This flow retrieves all transactions ordered by creation date.
To query a gift card's complete transaction history, follow these steps:
Call Query Gift Cards to retrieve gift cards and their IDs.
Call Query Gift Card Transactions with the gift card ID:
Process the transactions array in the response. Each transaction includes the amount, type, and updatedBalance after the transaction is applied.
Analyze specified transaction types when generating reports. For example, filter to show only REDEEM transactions to understand gift card usage patterns.
To filter transactions by type, follow these steps:
Call Query Gift Card Transactions with a filter for the desired transaction type:
Process the transactions in the response, which now contain only redemption records.
To analyze refunds instead, change the filter value to "PAYMENT_METHOD_REFUND".