Skip to main content
Gift card payments are supported directly through the API with support for split tender across traditional payment methods and gift cards, as well as automatic reversal.

Setup

See the Qwikcilver and Value Link connector pages for setup instructions.

Features

  • Balance checks - Query the balance of one or more gift cards before checkout.
  • Gift card-only payments - Accept payments funded entirely by gift cards.
  • Split tender - Split a payment across one or more gift cards and a standard payment method.
  • Stored gift cards - Vault gift cards against a buyer for reuse.
  • Automatic reversal - Automatically revert all gift card charges if any single card fails.
  • Virtual card issuance - Issue a new virtual gift card through a supported gift card service.
  • Physical card activation - Activate a physical gift card, with the option to store it in the vault.

API endpoints

The API for gift cards consists of the following endpoints and API features.

Integration

Check a gift card balance

Before processing a payment, you can check the balance of one or more gift cards. You can query by stored gift card ID or by raw card number and PIN.
See the balance check API reference for the full list of request and response fields.

Store a gift card

You can store a gift card in the vault to use it in future transactions without re-entering the card details. Optionally, associate the card with a buyer.
See the stored gift cards API reference for managing and listing vaulted gift cards.

Issue a virtual gift card

You can issue a new virtual gift card through the primary gift card service configured on the merchant account.
The response includes a url for the issued gift card. The raw card number and PIN are not returned directly in the API response. If you want to store the card for future use, retrieve the card details from that URL and pass them to the store a gift card endpoint. See the issue a gift card API reference for the full list of request and response fields.

Activate a physical gift card

You can activate a physical gift card through the primary gift card service. The pin is optional, but if provided, it must be the correct PIN for the card. Set store to true to also store the activated gift card in the vault, optionally associating it with a buyer using buyer_id or buyer_external_identifier. A pin is required when store is true.
When store is true, a gift-card.created webhook is sent once the card has been stored. See the activate a gift card API reference for the full list of request and response fields.

Reversals

As part of processing gift cards, the ability to automatically revert an authorized payment method or redeemed gift card before it is reverted is supported. The logic for this feature is as follows.
  • When a transaction occurs, regular payment methods are authorized (or captured) first, depending on their support for delayed capture.
  • Gift cards are only redeemed after the (optional) regular payment method has succeeded to authorize/capture.
    • When no regular payment method is present, gift cards are always redeemed.
  • In the case that any of the gift cards failed to redeem, any redemptions of other gift cards and regular payments are reverted, so that no charges remain at the end.
    • In the case of an authorized or captured regular payment method, the transaction is reverted by either voiding the authorization or refunding a capture.
In some cases, gift card redemptions are not reverted. Please see the anti-fraud section below.

Outcome

There are two fields returned by the transaction API which allows you to quickly understand if the original intent of a transaction was met.
  • The multi_tender (boolean) field indicates if the transaction included more than one tender.
  • The intent_outcome (enum) field indicates if the original intent (authorize / capture) was met. This field is set to either pending if the transaction has not completed yet, succeeded in the case all tenders were processed successfully, and failed if any of them failed. This field does not change value after the succeeded or failed status has been achieved, even if the transaction is subsequently captured, voided, or refunded in any way.

Reversals and anti-fraud reviews

There is a key difference in how reversals are handled when a transaction encounters any kind of halt in processing. This happens when the transaction is held in anti-fraud review. In these situations, if the approval fails, or if the transaction is rejected, the gift cards are not refunded. The reason for this is that because of the time delay between the redemption and refund the user may no longer have the gift card at hand anymore.

Gift card usage data

Each stored gift card tracks usage statistics that help you determine which card to preselect at checkout or prioritize in your UI.
Usage data is not back-filled. Only transactions processed after this feature was enabled are counted.

Sorting by usage

The list buyer gift cards endpoint supports a sort_by query parameter to order results by any of the four usage fields.
Results are returned in descending order by default, so the most recently used or most frequently used gift card appears first. To sort in ascending order, set order_by=asc.

Stored gift card filtering

The API automatically removes any gift cards stored for a buyer with a zero balance or an expiry date in the past. When you add a new card, you may receive an error informing you that you’ve hit the limit of the number of stored cards (defaults to 10).
You need to actively call the GET /buyers/gift-cards to clear out any expired and zero balance gift cards.

Limits

By default, the number of gift cards that can be used at the same time is limited to 10. This limit applies to the APIs for querying gift card balances, processing gift cards, as well as the number of gift cards that can be stored on a buyer. To change this limit, reach out to the support team. In the event of the limit being exceeded, a HTTP 400 response with an error message The buyer's gift card count has already reached the maximum limit of 10 gift cards is returned.

Testing

Use the gift card simulator to test balance checks, redemptions, and error codes in your sandbox environment without a live connector.