No momento, esta página não está disponível em português
Payment-method icon

Gift cards for API only

Add gift card payments to an existing API-only integration.

  Postman collection

Implementation examples
  Java Spring
  .NET
  Node.js

Accept gift card payments using our APIs, and build your own payment form to have full control over the look and feel of your checkout page.

Requirements

These instructions explain how to add gift cards to your existing API-only integration. The API-only integration works the same way for all payment methods. If you haven't done this integration yet, refer to our API-only integration guide.

Before starting your integration make sure you:

  1. Set up your back end implementation.
  2. Added each gift card variant that you want to test in your Customer Area.

    You can test a limited number of gift card variants and simulate gift card payments. When testing, you use a simulator that tries to behave and respond in the same way as an end-to-end connection with a gift card provider. Before you go live, you must onboard with a gift card provider and add the gift card variant to your live Customer Area.

Build your payment form for gift cards

You must build a separate integration for each gift card provider.

You can process payments for supported gift cards or manage other transactions like adding to the balance of a gift card.

If you are using the /paymentMethods request to show the available payment methods to your shopper, specify the following in your request:

In the response, you receive the gift cards available to your shopper as elements in the paymentMethods array, for example:

    {
        "name": "VVV Giftcard",
        "brand": "vvvgiftcard",
        "type": "giftcard"
    }

Render logos and names of the available brands for the shopper to choose. When the shopper selects a type of gift card, show the payment form.

Check the balance

After the shopper enters the gift card details, check if the balance is enough to make a full payment.

  1. Make a /paymentMethods/balance request including:

    Field Required Description
    paymentMethod.type -white_check_mark- The brand from the /paymentMethods response. For example, givex.
    paymentMethod.number -white_check_mark- The gift card number.
    paymentMethod.cvc -white_check_mark- The card verification code or security code.
    merchantAccount -white_check_mark- Your merchant account.

    The response includes the balance of the gift card.

  2. If the balance amount is equal to or greater than the full payment amount, then continue to make a payment.

    If the balance is less than the full payment amount, make an /orders request. This lets you create partial payments: a payment with the gift card, and a payment for the remaining amount using a different payment method.

Make a payment

From your server, make a /payments request, specifying:

Field Required Description
paymentMethod.type -white_check_mark- giftcard
paymentMethod.brand -white_check_mark- The brand from the /paymentMethods response. For example, vvvgiftcard or genericgiftcard.
paymentMethod.number -white_check_mark- The gift card number without separators.
paymentMethod.cvc -white_check_mark- The card verification code.

For some gift cards, there are regulatory limits on transaction amounts. Check with your gift card provider to learn if these limits affect you.