Gift & Loyalty
Merchant gift card programs lead customers to spend—on average—60 percent more than the value of their gift cards. In addition, 72 percent of shoppers also shop for themselves when they go online or in-store to purchase a gift card.
Heartland helps you acquire more loyal customers with our innovative gift card program. You can personalize your own gift cards, offer reloading capabilities and use a card-not-present program that allows your customers to use their phone number as their identifier.
Create a Gift Card Object
When consuming gift cards, you will need to first create a GiftCardData
object to pass to the subsequent methods.
Creating a Gift Card
<?php
use GlobalPayments\Api\PaymentMethods\GiftCardData;
$card = new GiftCardData();
$card->number = "5022440000000000098";
using GlobalPayments.Api.PaymentMethods;
var card = new GiftCardData {
Number = "5022440000000000098";
};
import com.global.api.paymentMethods.GiftCardData;
GiftCardData card = new GiftCardData();
card.setNumber("5022440000000000098");
from globalpayments.api.payment_methods import GiftCardData
card = GiftCardData()
card.number = '5022440000000000098'
# coming soon
import { GiftCardData } from "globalpayments-api";
const card = new GiftCardData();
card.number = "5022440000000000098";
Get a Gift Card Balance
You might want to check the balance of a Gift Card before you try to create a sale.
Get Gift Card Balance
<?php
$response = $card->balanceInquiry()
->execute();
var response = card.BalanceInquiry()
.Execute();
import com.global.api.entities.Transaction;
Transaction response = card.balanceInquiry()
.execute();
response = card.balance_inquiry() \
.execute()
# coming soon
const response = await card.balanceInquiry()
.execute();
Charge a Gift Card (Sale)
Creating a sale on a Gift Card is simple.
Charge Gift Card
<?php
$response = $card->charge(10)
->withCurrency("USD")
->execute();
var response = card.Charge(10m)
.WithCurrency("USD")
.Execute();
import com.global.api.entities.Transaction;
import java.math.BigDecimal;
Transaction response = card.charge(new BigDecimal("10"))
.withCurrency("USD")
.execute();
response = card.charge(10) \
.with_currency('USD') \
.execute()
# coming soon
const response = await card.charge(10)
.withCurrency("USD")
.execute();
Next Steps
Learn more about Heartland Ecommerce gift & loyalty payments with: