Skip to main content
To view historical gift card purchases and virtual cards on your account, use the getUserPurchases query. The query requires LIST_PURCHASES scope. This query response can get bulky, so we ask you to provide a pagination input, and an optional filter input:

Pull Purchase History

You can use the following query in order to view your transactions.
  1. getUserPurchases — Get User Purchases

Pagination Input

The OffsetInput argument is used to manage pagination in API responses, allowing you to control how many items are returned per page and how many items should be skipped from the beginning of the list.

Fields

limit (Int): This field specifies the number of items to return per page. The maximum number of items you can request per page is 20. If you do not specify a value for limit, it will default to 20. offset (Int): This field specifies the number of items to skip before starting to return the items. If you do not specify a value for offset, it will default to 0, meaning it will start from the first item in the list.

Filter Input

The UserPurchaseFilterInput argument is used to filter the purchases returned in the response. It allows you to retrieve purchases made by the user associated to your app, or purchases made under the account associated to your app, etc. It is optional. If it is not provided, the response will return purchases made by the user associated to your app, across all accounts.

Fields

scope (Array of PurchaseScopeFilter): This field specifies the type of filter to use.
PurchaseScopeFilter enum
  • TOKEN_USER: filter based on userId
  • TOKEN_ACCOUNT: filter based on accountId

Examples

Response

When you run this query, it will respond with an array of your historical gift card purchases and generated virtual cards.

Fields in the UserPurchase Object