Customize Features Docs Changelog Support
Buy Now — $39/yr

Documentation

Complete guide for installing, configuring, and using Gift Cards for Amelia (v2.0.0).

Requirements

Installation

  1. Download the amelia-gift-cards.zip file from your LemonSqueezy account
  2. Go to WordPress Admin → Plugins → Add New
  3. Click Upload Plugin and select the ZIP file
  4. Click Install Now, then Activate

After activation, you should see a "Gift Cards" menu in your WordPress admin sidebar.

Quick Start

Get your gift card system running in under 10 minutes:

  1. Activate the plugin — an admin notice appears with a link to the License page and information about the Divi module
  2. Configure payments — Stripe/Square auto-detected from Amelia (Pro/Premium) or enter keys manually
  3. Create a gift card type — go to Gift Cards → Types and create your first type
  4. Add the form to a page — insert [agc_gift_card_form] on any page
  5. Test a purchase — use test mode to verify everything works

Payment Setup

Stripe Setup

Automatic (Pro / Premium)

If you have Amelia Pro or Premium, the plugin automatically uses your existing Stripe configuration from Amelia. No additional setup required.

Manual (Starter / Standard)

If you have Amelia Starter or Standard:

  1. Go to Gift Cards → Settings → Payments
  2. Enter your Stripe Publishable Key and Secret Key
  3. Enable Test Mode for initial testing
  4. Click Save & Verify to test the connection
Note: You can find your Stripe API keys at dashboard.stripe.com/apikeys.

Square Setup

Square is also supported as a payment provider:

  1. Go to Gift Cards → Settings → Payments
  2. Select Square as your payment provider
  3. Enter your Square Application ID and Access Token
  4. Click Save & Verify to test the connection

General Settings

Navigate to Gift Cards → Settings → General to configure:

Text & Language Presets

Every label, button and message on the public form and emails is editable. Open Gift Cards → Settings → Text and either translate strings one by one, or apply a one-click language preset:

Note: Applying a preset overwrites your current custom strings. Save a copy first if you have heavy customizations.

Email Settings

Configure email delivery at Gift Cards → Settings → Email:

Advanced Settings

Customize Menu

Gift Cards → Customize brings every visual setting in one place. The menu has two tabs: Visual Template for the public purchase form, and Mail for the recipient and purchaser emails. Both tabs offer a live preview that reflects your changes as you edit. New in v2.0

Migration from v1.x: The legacy Settings → Appearance and email-customization screens have been merged here. The global Primary/Secondary color settings have been removed — email colors are now driven by each gift card type's preset (see Email Templates).

Visual Template tab

Designs the public purchase form. Each of the 6 built-in templates (Spa, Restaurant, Beauty, Fitness, Medical, Generic) can be duplicated and edited independently — your customizations live alongside the originals so you can always revert.

Mail tab

Designs the recipient and purchaser emails. The colors come from the gift card type that's being sent — pick a type in the preview selector to see what each customer would actually receive.

Starter presets

Three one-click presets bundle typography, layout and spacing as a sensible starting point:

Typography

Layout

Branding

Live preview

A gift card type selector at the top of the preview lets you instantly visualize the actual rendering for each type — no need to send test emails to verify your branding.

Creating Gift Card Types

Gift card types define the look, amounts, and restrictions for your gift cards.

  1. Go to Gift Cards → Types
  2. Click Add New Type
  3. Fill in the name, description, and select an email template
  4. Configure amounts and restrictions
  5. Save

Amounts & Pricing

For each type, you can configure:

Restrictions

Restrict gift cards to specific Amelia services:

Email Templates

The plugin ships with 6 built-in templates. Each one defines a primary and secondary color, and the recipient email is automatically themed to match the gift card type that was bought:

To restyle a template — colors, font, button style, email typography and branding — use the new Customize menu. Duplicate any built-in template, edit it independently and the originals stay untouched.

Changed in v1.5: the global Primary/Secondary Color settings have been removed. Email colors now follow the gift card type's preset, so each recipient gets an email matching the type they were gifted.

Success Page

After a successful purchase, the buyer lands on a redesigned success page that visually matches the recipient email — a clean 600 px white card themed by the gift card type's primary/secondary colors. Redesigned in v1.5

WordPress Shortcode

Add the gift card purchase form to any page or post:

[agc_gift_card_form]

With Parameters

[agc_gift_card_form
    title="Buy a Gift Card"
    description="Give the perfect gift"
    amounts="25,50,100,200"
    allow_custom="yes"
    min_amount="10"
    max_amount="500"
    currency="EUR"
    css_class="my-custom-class"
]

Divi Builder Module

If you use the Divi theme, a native Gift Card module is available:

  1. Edit a page with Divi Builder
  2. Click Add Module and search for "Gift Card"
  3. Configure the design options (colors, fonts, spacing)
  4. Save and publish
Note: The Divi module is optional. The shortcode works with any theme.

Frontend Form

The purchase form guides customers through 3 steps:

  1. Choose Amount — select a preset or enter a custom amount
  2. Recipient Details — name, email, personal message
  3. Payment — secure Stripe or Square checkout with 3D Secure support

After payment, the recipient receives a beautifully designed email with their gift card code.

Dashboard

The dashboard (Gift Cards → Dashboard) provides:

Rolling Balance

Since v3.0, every gift card issued by the plugin carries a rolling balance. Recipients reuse the same code across multiple Amelia bookings until the value is fully consumed — a behavior that native Amelia coupons do not provide.

How it works in practice

  1. A customer buys a $100 gift card. The recipient gets a code with an initial balance of $100.
  2. The recipient books a $30 service in Amelia, enters the code as a coupon. Amelia applies the full $30 discount.
  3. The plugin records the redemption in its transaction ledger and updates the underlying Amelia coupon so the new available value is $70.
  4. The recipient automatically receives an email showing Used: $30 / Remaining: $70.
  5. Later, the recipient books a $50 event using the same code. Balance becomes $20, and another balance email is sent.
  6. When the balance reaches $0, the coupon is closed.

Automatic balance email

After each redemption, the plugin sends a transactional email to the recipient summarizing what was just used and how much remains on the card. The email uses the same visual template as the original gift card delivery email, so branding stays consistent.

Where to see the ledger

Open Gift Cards → All Gift Cards and press Details on any gift card to see its full record: the initial purchase, buyer and recipient details, every redemption with the matching Amelia booking ID, the running balance after each event, and every email that was sent. The Logs view shows the same events across all gift cards with date/type filters.

Note on cancellations: by design, deleting or cancelling an Amelia booking does not automatically restore the redeemed amount on the gift card. This preserves the integrity of the audit trail. If a refund is needed, issue a new gift card (or a manual top-up) instead.

Manual Gift Card Creation

Create gift cards directly from the admin:

  1. Go to Gift Cards → Add New
  2. Fill in the amount, recipient details, and optional message
  3. Choose whether to send the notification email
  4. Click Create

Export

Export gift card data from the Dashboard (CSV report) or from Gift Cards → Logs (CSV log export). Filter by date range or status before exporting.

Logs

View all system activity at Gift Cards → Logs:

Shortcode Reference

[agc_gift_card_form]

Main purchase form with Stripe integration.

ParameterDefaultDescription
titleForm title displayed at the top
descriptionDescription text below the title
amounts"50,100,150,200"Comma-separated preset amounts
allow_custom"yes"Allow custom amounts ("yes" / "no")
min_amount"10"Minimum custom amount
max_amount"1000"Maximum custom amount
currency"EUR"Currency code
template"default"Email template to use
css_classAdditional CSS class

Developer Hooks

WordPress actions and filters for connecting gift cards to another system — a CRM, an accounting tool, or a second voucher platform. Add these to your theme's functions.php or a small plugin.

agc_amelia_coupon_created

Fires once per Amelia coupon, immediately after it is created and linked to the gift card. This is the hook to use when another system needs a matching code: it carries the code, the amount and the expiry date, so no database lookup is needed. It fires for online purchases and for gift cards created by hand in the admin.

ParameterTypeDescription
$coupon_idintAmelia coupon ID
$gift_card_idintGift card ID
$gift_card_dataarraycode, amount, expiration_date, gift_card_type_id — added in v3.8.0
add_action( 'agc_amelia_coupon_created', function ( $coupon_id, $gift_card_id, $data ) {
    wp_remote_post( 'https://example.com/api/vouchers', array(
        'timeout' => 15,
        'headers' => array( 'Content-Type' => 'application/json' ),
        'body'    => wp_json_encode( array(
            'name'    => $data['code'],
            'value'   => (float) $data['amount'],
            'expires' => $data['expiration_date'],
        ) ),
    ) );
}, 10, 3 );

Declare 3 as the last argument, as above, or the gift card data will not reach your callback. Listeners registered with 1 or 2 arguments keep working unchanged.

Keep the callback fast. The hook runs inside the purchase request, so a slow API call becomes a slow confirmation screen for your customer. Schedule anything lengthy with wp_schedule_single_event().

Failures are contained, and therefore silent. An exception thrown by your callback is caught and logged rather than propagated — a gift card that has been paid for must not be undone by a failing integration. The trade-off is that the customer sees nothing, so log failures on your side and reconcile.

One edge case worth knowing: if a generated code already exists in Amelia's coupons table, the plugin links the existing coupon instead of creating one, and this hook does not fire. Codes are random and checked for uniqueness, so this is very rare — but if your systems must never drift, reconcile periodically, or switch on the purchase notification email below as a second channel.

agc_gift_card_created

Fires after the gift card is stored, before the Amelia coupon exists. Use it only for work that does not depend on the coupon; otherwise prefer agc_amelia_coupon_created above.

ParameterTypeDescription
$gift_card_idintGift card ID
$gift_card_dataarrayGift card data as stored

agc_fulfilment_email (filter)

Overrides the address that receives the shop notification, ignoring the value set in Settings → Delivery. Useful for routing notifications per gift card type, or into a ticketing system's inbox.

add_filter( 'agc_fulfilment_email', function ( $email ) {
    return 'vouchers@example.com';
} );

agc_gift_card_code (filter)

Rewrites a gift card code as it is generated, for when the code has to follow a format another system expects. For the common case — simply putting the amount at the end of the code — you do not need this filter: switch on Settings → General → Append the amount to the code and every new code becomes GIFT-A3B7-9K2M-195.

ParameterTypeDescription
$codestringThe generated code, with the amount already appended if that setting is on
$contextarrayGeneration context — see the keys below
KeyTypeDescription
amountfloatThe card's face value. Any delivery fee is excluded, so this matches the coupon's deduction rather than what the buyer paid
currencystringCurrency code, uppercase. Never written into the code unless you add it yourself
gift_card_type_idintGift card type, or 0 when the purchase is not tied to one
prefixstringThe prefix actually in use, after your setting is applied
sourcestringWhere the card came from: a customer purchase, one created by hand in the admin, or a legacy form
attemptintRetry counter, starting at 1
add_filter( 'agc_gift_card_code', function ( $code, $context ) {
    if ( 'purchase' !== $context['source'] || empty( $context['amount'] ) ) {
        return $code;
    }

    return sprintf(
        'VOUCHER-%s-%s',
        (int) $context['amount'],
        strtoupper( wp_generate_password( 8, false, false ) )
    );
}, 10, 2 );

Return something that varies. This filter runs inside the loop that guarantees a code is unique, and the value you return is the one checked against the database. A filter that always returns the same string can never become unique, so the loop gives up and the purchase fails after the customer has been charged — vary your code, for example with $context['attempt'].

Stay within the allowed characters. A returned code must be 64 characters or fewer and use only letters, numbers, dots, dashes and underscores; anything else is ignored in favour of the generated code, with a note in the log. The code is never changed to upper case, because Amelia matches coupon codes exactly. These limits exist because the code is stored in two tables and appears in the buyer's confirmation link.

agc_append_amount_to_code (filter)

The code equivalent of the Settings → General checkbox, so you can switch the amount suffix on for some gift cards and not others. It receives the current setting as a boolean and returns the value to use.

Purchase notification email

Not a hook, but often the simpler answer: under Settings → Delivery → Purchase notifications, switch on Notify me for every purchase to receive an email for every gift card sold, containing the code, the amount and the buyer's details. It is off by default. Physical gift cards always trigger it, since the code is never emailed to anyone else.

Common Issues

Gift Cards menu not visible

Ensure the Amelia Booking plugin is installed and activated. The Gift Cards plugin requires Amelia to function.

Payment errors

Emails not being received

Form not displaying

Diagnostics

The built-in diagnostics system (Gift Cards → Diagnostics) checks:

Each section gets a health score. Click on any failing check for remediation steps.

Debug Mode

Enable debug mode at Gift Cards → Settings → Advanced → Debug Mode.

When enabled, the plugin logs detailed information about:

Warning: Debug mode generates large log files. Only enable it for troubleshooting and disable it afterward.

FAQ

Can I use this without Amelia?

No. Gift Cards for Amelia is designed specifically to work with the Amelia Booking plugin. It creates Amelia coupons that are used during the booking process.

Is there a free version?

No. Gift Cards for Amelia is a premium plugin available for $39/year. This includes all features, 1 year of updates, and email support.

Can I use it on multiple sites?

Each license is for a single WordPress installation. Contact us for multi-site pricing.

What happens when a gift card is purchased?

  1. Customer pays via Stripe or Square
  2. Gift card record is created in the database
  3. A corresponding Amelia coupon is auto-created
  4. Recipient receives an email with the gift card code
  5. Buyer receives a confirmation email

How do recipients use their gift card?

Recipients enter their gift card code in the coupon/promo code field during the Amelia booking process. The discount is applied automatically based on the card's current balance. Since v3.0 the same code can be reused on subsequent bookings until the balance reaches zero, and the recipient receives a balance email after every redemption.