This walkthrough provides step-by-step instructions that show how to redeem a gift card for a purchase, reload it with additional funds, and check gift card activity. The walkthrough includes separate procedures for applications that process orders and payments with the Square Orders and Payments APIs or with a custom processing system.
This walkthrough assumes that you completed Walkthrough 1: Sell a Gift Card and have an activated gift card.
This walkthrough includes steps that show how your application can take payment from a gift card on file. To prepare for this procedure, you must link a customer profile to your gift card.
Note
Linking a customer profile to a gift card is only required to follow the steps in this walkthrough, which takes a payment from a gift card on file.
Alternatively, to get the gift card ID to provide as the source_id
in the CreatePayment
request, your application can collect the gift card account number (GAN) from the buyer and call RetrieveGiftCardFromGAN.
Call SearchCustomers or ListCustomers to get the ID of a customer profile in your Customer Directory.
If you don't have a customer profile, call CreateCustomer to create one:
Create customer
Copy the
id
of the customer profile from the response.Call LinkCustomerToGiftCard to add a gift card on file for the customer. Provide the gift card ID as a path parameter and the customer ID as a body parameter:
Link customer to gift card
For more information about linking customers to gift cards, see Manage gift cards on file.
You are now ready to use a gift card. In this walkthrough, you take a gift card payment, add additional funds to the gift card, and check gift card activity.
This walkthrough provides two separate application flows:
Redeem and Reload a Gift Card When Using Orders and Payments API Integration. This procedure shows how to redeem and reload a gift card when your application uses the Orders API and Payments API.
Redeem and Reload a Gift Card When Using a Custom Processing System. This procedure shows how to redeem and reload a gift card when your application uses a custom order and payment processing system.