User Tools

Site Tools



For more details see the Gift Card for Magento 2 extension page.

Guide for Gift Card for Magento 2

Enable customers to buy gift cards and send them to friends via email or by post. Create an unlimited number of gift cards with different pricing models and easily keep track of all purchased certificates.

  • Create gift cards with fixed or open amount price types
  • Easily generate and upload gift codes
  • Send gift certificates via email or post office
  • Keep track of all purchased gift cards
  • Offer stunning gift card templates
  • API support
  • GraphQL compatibility

The module easily solves the gifting dilemma by offering specially designed gift certificates which can be sent to recipients via email or by post. Once the certificate is purchased, a unique code with a custom greeting message will be sent to the addressee. The module lets admin users create gift card products with different pricing types, use predefined card images or upload their own ones and helps them to keep track of all purchased gift certificates.

How do gift cards work?

  • Gift card is an alphanumeric code, consisting of letters and numbers, like BIRTHDAY_DF627. It can be applied at the cart/checkout to cover the order total
  • These codes are groped in code pools: Birthday cards, Christmas cards, etc. You can name them as you want. Before selling gift cards, you need to create a code pool for your campaign
  • In the catalog, gift card is represented as a custom product type. A customer can buy this product and get the code. You can allow customers to use gift cards they bought for themselves
  • Gift card is always linked to the code pool. Code pool should be generated first, then a product is linked to the pool
  • A gift card code becomes activated after the order invoiced only. If the order is not paid, a customer will not be able to apply a gift card
  • To track the balance of a particular voucher, Gift Code Accounts are issued. The store manager can adjust the balance manually

How do I ship my gift cards?

  • Gift Card as a product in your catalog may be virtual, printed or combined
  • A virtual gift card is just an email-sent code like virtual and downloadable products, it has no weight, there is no physical inventory and it cannot be shipped
  • When gift card is printed or combined, it means the code is being printed on a sheet of paper and delivered. The delivery flow is standard like for simple products
  • Amasty Gift Card does not cover printing issues, we offer only tracking tools

General Settings

To configure general extension settings please go to StoresConfigurationGift Card.

Enabled - set the option to Yes to run the extension.

Product Types, Which Can Be Bought with Gift Card - specify product types which customers will be able to purchase using a gift card.

Use a Gift Card to Pay for Shipping - select Yes, to pay for a shipment with your giftcard. I.e. a gift card can cover both a purchase and a shipping.

Use a Gift Card to Pay for Tax - enable the setting to allow customers to pay for tax with a gift card. This means, that a customer will be able to pay both for products and taxes with a gift card.

Display options

Gift Card Fields - Specify the fields a customer should fill in when purchasing a gift card.

When disabling certain fields by adjusting corresponding settings in the Gift Card Extension Configuration, do not forget to update your templates for gift card related emails. Otherwise, those unnecessary variables will be included in the body of the sent message and it may cause inconvenience.

Show Gift Card Options in Mini Cart And Checkout - Enable the option to show the gift card options on the cart page.

Timezones for User Choosing - Define the timezones a user can choose on the frontend. The option is connected with the delivery date setting. A user can define the date a gift card should be sent and, also, choose the timezone of a recipient.

Allow Users to Upload Own Images for Gift Card - Set to Yes to enable users to upload their own images for gift cards (in png, jpg, gif formats).

Tooltip Message for Users - Specify the message to inform customers upon certain restrictions when uploading their own images for gift cards.

Here's how customers will see the tooltip:

Gift Card Options

Lifetime (days) - Specify the number of days during which the gift card will be valid. When set to 0 (zero), certificate will have unlimited lifetime.

Allow Customers to Use Gift Cards They Bought for Themselves - Enable the option to let customers buy gift card without sending them to other recipient.

Notify Customers Before Certificate Expires - Set the option to ‘yes’ to enable notifications dispatch when the certificate lifetime expires. Notifications are available only for purchased gift cards.

Number of Days Before Expiry - specify when email reminders should be sent. When set to 0 (zero), the notification is sent once the certificate expires.

Email Options

Email sender - select an email sender.

Email Template - choose a template according to which an email will be generated.

Send Copy to - in this field you may specify particular email addresses to which notifications will be sent as well. Each email should be placed on a new line.

Expiry Notification Email Template - set the template for the expiry notifications.

Send Confirmation to Sender - enable this option to notify a gift card sender once the certificate is sent to the recipient.

Sender Confirmation Email Template - select the corresponding sender confirmation email template from the templates list.

Attach PDF Gift Card to Email - you can add a PDF gift card to the email.

Email Addresses

To specify store email addresses from which you want to send gift card emails and expiration notifications please go to StoresConfigurationStore Email Addresses.

Product Creation

To create a gift card product please go to ProductsCatalog → click on the Add Product button and select the Gift Card Pro product type in the dropdown.

Gift Card Information Settings

Gift Card product settings include the same options as other product types except for Prices and Gift Card Information settings.

Card Type - Select one of the card types:

  • Virtual;
  • Printed;
  • Combined:

Lifetime in days - It's possible to set individual lifetime for each particular gift card or use default settings.

Email Template - It's also possible to set an individual template per gift card product or use general configuration settings.

Choose gift card code pool - Select one of the available gift card code sets.

Choose gift card images - Choose a gift card image/images from the list of predefined images or upload your own ones.

Gift Card Price Settings

To set gift card price and possible pricing options, expand the Amasty Gift Card Prices tab.

Amounts - You can set fixed price for a gift card product.

The specified prices will be displayed on the frontend product page.

To add even more flexible pricing options, you may enable Open Amount and a Fee for purchase.

Open Amount - Enable the option to let customers specify a custom gift card amount.

Open Amount Min/Max Value - Limit an open amount with min/max values.

On the frontend the feature will be displayed in the following way:

Enable fee for purchase - Set the option to 'yes' to add an extra fee for a gift card product or vice versa - make the gift card product price lower than the certificate value.

Add a fee for purchase - Select a fee type either fixed or percent.

Specify fee value - in case you specify a negative amount, the price of a gift card product will be decreased accordingly. If you want to add an extra fee, either percent or fixed, please specify a positive value. E.g. -10 or 10.

Gift Card Codes Generation

To create gift card code pools please go to MarketingGift CardsCode Pools.

On the Gift Code Pools grid you'll see all previously generated gift code sets. You can easily delete or edit them if needed.

Create additional code pools with the Add New button. Configure the General Settings.

Code Pool Name - Specify the name for each code pool you create.

Conditions - set the necessary conditions that will limit the cases of a gift card application.

When a customer tries to apply a gift card code, that doesn't match the conditions set by the admin, he will see a notification:

Proceed to the Code Settings section.

Code Templates - Specify the template for codes generation, where {L} - letter, {D} - digit, e.g. PROMO_{L}{L}{D}{D}{D} results in PROMO_DF627. Recommended code length is 20 symbols

Codes Qty to Generate - Set the codes quantity that should be created.

You can also import gift card codes using a CSV file.

Hit the Generate button. Open the Codes List tab, where you'll find all generated or imported codes.

When a coupon is used, you will see the updated status in the codes list.

Gift Card Images

To upload gift card images please go to MarketingGift CardsImages.

See uploaded images on the grid. Click on the Add New button to upload a new image.

Image Title - specify the suitable title for internal use.

Enabled - switch to Yes to activate the image.

Hit the Upload Image button.

Specify code position - use the drag-and-drop option to specify code position on a gift card image.

Code Text Color - using the colo-picker tool, choose the color of a code that will suit the general image style.

Gift Code Accounts

To manage gift code accounts please go to MarketingGift CardsAccounts.

On the gift card code accounts grid you can view and edit the accounts of all purchased gift cards.

Click Edit in the Action column to check the info of a particular account.

Order ID - Click on the order ID to get redirected to the corresponding order page.

Edit gift card codes data:

  • Status;
  • Website;
  • Initial code value;
  • Current balance;
  • The date of expiration;

Comment - Admin users can write a comment for each gift card code for their internal needs.

Send Gift Card - Specify recipient's data to resend a gift card code if needed.

In the Order History tab you'll find all orders for which the gift card was used.

Gift Card Email Templates Settings

To create or edit an email template please go to MarketingCommunicationsEmail Templates. Choose the template you need and click on the Load Template button.

Template Content - In this field you can edit the template content according to your needs.

Gift Card Email Template Example

Also, the customers have the ability to preview the email with a gift card before they make a purchase.

Gift Card Frontend Examples

See the example of gift card products added to a separate category.

Here is the example of a gift card product page where a customer can select the gift card value (if there are any), upload a custom image, specify recipient's information and write a greeting message.

Gift Card Application

Customers can check the balance of each gift card in their acoounts. To see the balance, the recipient should open the corresponding tab in a customer account, enter the code and click on the 'Submit' button. Information about activated codes will be displayed below.

Customers can check a gift card status as well as apply the gift card on a shopping cart page.

Once a gift card code is applied, the order total will be automatically recalculated.

API Integration

The extension includes API support. Store admins may use the following APIs:


Amasty\GiftCard\Api\ImageRepositoryInterface - API for images processing

Available methods:


Amasty\GiftCard\Api\CodePoolRepositoryInterface - API for codes pool processing

Available methods:


Amasty\GiftCard\Api\CodeGeneratorManagementInterface - API for codes generation

generateCodesForCodePool(codePoolId, qty) - generation of codes qty for codePoolId

generateCodesByTemplate(codePoolId, template, qty) - generation of codes according to template for codePoolId


Amasty\GiftCardAccount\Api\GiftCardAccountRepositoryInterface - API for gift account processing

Available methods:


Amasty\GiftCardAccount\Api\GiftCardAccountManagementInterface - API for cards application to customers

Available methods:

saveByQuoteId(cartId, giftCardCode) - application //cartId// of gift account with //giftCardCode//
deleteByQuoteId(cartId, giftCardCode) - deletion //cartId// of gift account with //giftCardCode//

Amasty\GiftCardAccount\Api\GuestGiftCardAccountManagementInterface - API for card apllication to guests

Available methods:

saveByQuoteId(cartId, giftCardCode)
deleteByQuoteId(cartId, giftCardCode)
Find out how to install the Gift Card extension for Magento 2 via Composer.

Rate the user guide
 stars  from 8 votes (Details)
magento_2/gift_card.txt · Last modified: 2020/08/07 21:49 by hfedulova