Skip to main content

Introduction

The Thanx Gift Cards API enables users to add, view, and manage gift cards directly within your application. Gift cards are securely stored and can be used for purchases at participating merchants. Balance information is fetched in real-time from gift card providers to ensure accuracy.

Gift Card Lifecycle

Gift cards in the Thanx platform have two primary states:

Active

A gift card is active when it’s available for the user to view and use. Active gift cards appear in the user’s gift card list and can be retrieved individually for payment operations.

Archived

A gift card is archived when the user chooses to remove it from their active list. Archived gift cards are soft-deleted and no longer appear in standard gift card queries, but the data is retained in the system.

Provider Integration

The Thanx platform integrates with external gift card providers to manage card validation and balance checking. When a user adds a gift card, the system validates it with the provider and fetches the current balance. Balance information is retrieved in real-time whenever gift card details are requested, ensuring users always see accurate, up-to-date information.

Merchant Configuration

Merchants can customize how gift cards are presented in your application through the merchant configuration endpoint. This configuration includes:
  • External purchase links: Direct users to a URL where they can purchase gift cards, with optional custom imagery
  • Card background styling: Customize the appearance of gift cards in your UI with colors or background images
Use the Get Merchant Configuration endpoint to retrieve these settings and render a branded gift card experience.

Common Use Cases

Viewing Gift Cards

Use the Get Gift Cards endpoint to display a paginated list of the user’s active gift cards. This is ideal for showing all available cards in a wallet or payment selection screen.

Adding a Gift Card

Use the Create Gift Card endpoint to allow users to add new gift cards to their account. The endpoint validates the card with the provider and checks the balance before storing it.

Viewing Card Details

Use the Get Gift Card endpoint to retrieve details for a specific gift card, including the current balance. This is useful when displaying card information during checkout or in a detailed card view.

Removing a Gift Card

Use the Delete Gift Card endpoint to archive a gift card that the user no longer wants in their active list.
Please review proper request headers here.