Show the gift cards you sell. Customers choose the amount and pay on Naayya.
Who this is for#
Business owners and managers with their own website. See supported builders. To create an offer, see Gift Cards.
Add the gift cards widget#
Under Which widget?, choose Gift cards. Follow the shared copy and paste steps.
The code looks like this:
<script type="module" async src="https://www.naayya.com/plugin/v2/loader.js"></script>
<naayya-gift-cards business-id="YOUR_EMBED_KEY"></naayya-gift-cards>Use the generated embed key. When embedding several widgets on one page, add one element per widget and one loader script for the page.
What the widget shows#
The widget shows the gift cards on your gift cards page, in the same order. A gift card marked Inactive in Admin → Gift Cards does not show. Each card shows:
- The name, on a card in the gift card's own colours with your business name.
- The amounts customers can choose, smallest first. These are the amounts you set in Price Options, and they are what checkout charges.
- How long the gift card is valid once bought, from Valid for.
- A Buy button.
A gift card with no amount customers can buy does not show.
Buying a gift card#
When a visitor selects Buy, the gift card's purchase page opens in a small window over your website:
- The visitor chooses an amount and who the gift card is for, then pays by card.
- A visitor already signed in to Naayya in that browser buys from their account. Anyone else buys as a guest. A guest can send the gift card by email now or keep it. A signed-in customer can also choose to send it later from their account.
- When the purchase is complete, the window closes and the widget shows Purchase complete.
- If the visitor closes the window without paying, nothing changes.
- If the visitor's browser blocks pop-up windows, the purchase page opens in a new tab instead, and the widget does not show a confirmation.
The widget is told only that a purchase was completed. It is never told who bought the gift card, who it is for, or which amount they chose.
Choose which gift cards show#
In the Website embed section, with Gift cards selected, the Gift cards section sets which gift cards the widget shows:
- Show everything (on): every gift card you sell, in the same order, including any you add later.
- Show everything (off): only the gift cards you turn on, in the order you set. Turn each gift card on or off, and use the up and down arrows to move it. A gift card you add later stays off until you turn it on.
If you mark a chosen gift card Inactive in Admin → Gift Cards, it leaves the widget. When you make it active again, it comes back in the same place.
Changes save as you go. The Embed preview shows your choice straight away, and your website shows it the next time a page loads, without new code.
Match your brand#
Use the shared Appearance settings. Schedule cards applies only to the schedule. The gift card keeps the colours of its own design.
Your websites#
The Your websites rules apply to this widget for both code and frames.
React and Next.js#
For an app built with Lovable, choose Lovable and select Copy React code. In another React or Next.js app, use the wrapper directly:
import { createNaayyaGiftCards } from 'https://www.naayya.com/plugin/v2/react.js'
import React from 'react'
const NaayyaGiftCards = createNaayyaGiftCards(React)
export function GiftCards() {
return <NaayyaGiftCards businessId="YOUR_EMBED_KEY" />
}