Walkthrough 2: Use a Gift Card

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.

Link to section

Step 1: Add a gift card on file (optional)

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.

  1. 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

  2. Copy the id of the customer profile from the response.

  3. 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.

Link to section

Next step

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:

Link to section

See also