Back to blog

Automate Gift Card Delivery with n8n and FazerCards

FazerCards
Automate Gift Card Delivery with n8n and FazerCards

Fulfilling digital orders manually works fine at low volume — but when a reseller processes hundreds of gift-card orders a day across multiple storefronts, the time spent copying order details, calling the API, and pasting codes into customer messages becomes the real bottleneck. n8n, an open-source workflow automation tool with a visual canvas, removes that bottleneck without requiring a custom server or a backend developer on retainer. Once you wire the FazerCards REST API into an n8n workflow, orders flow from your storefront through stock validation and fulfilment and out to the customer — all in seconds, entirely unattended. If you would rather not host anything yourself, the same pipeline can be built on a managed platform instead — see our Make.com automation guide; this article takes the open-source route.

Prerequisites

  • Before building the workflow, make sure you have:
  • A running n8n instance — self-hosted via Docker (free, full control) or n8n Cloud
  • A FazerCards account on any plan; use the 5-day Gold free trial to test the full API without a payment method
  • Your FazerCards API key from the dashboard under Settings → API Keys
  • An order source that can send webhooks: a Telegram bot, a checkout page, a Tilda form, or any order tool
  • A quick read of the FazerCards webhooks reference and the API cookbook before you start

Step 1: Authenticate with the FazerCards API

The FazerCards API authenticates with a bearer token in the Authorization header. In n8n:

  1. Open Settings → Credentials → New Credential and choose Header Auth.
  2. Set the Name field to Authorization and the Value field to Bearer followed by your API key.
  3. Save this credential as "FazerCards API".

Every HTTP Request node in the workflow reuses the same credential. You configure it once and never paste a raw token into a node manually again.

Step 2: Set up the order trigger

Your workflow needs an entry point. Add a Webhook node as the first node on the canvas:

  1. Set its HTTP method to POST and copy the generated webhook URL.
  2. Paste the URL into your storefront's webhook configuration — the endpoint your store calls when a new order is placed.
  3. Test the trigger by submitting a sample order; n8n will show the captured JSON payload in the execution panel.

The payload should carry at minimum: the product SKU, the quantity, and a customer reference (email or internal order ID). n8n maps all incoming JSON fields by name, making them available to every downstream node automatically.

Step 3: Validate stock before committing

Checking availability before placing an order prevents failed transactions and gives you a clean fallback path. Add an HTTP Request node:

  1. Set the method to GET and point the URL to the FazerCards product-lookup endpoint for the incoming SKU — the exact path is in the API docs.
  2. Attach the FazerCards API credential from Step 1.
  3. After the request, add a Set node to extract stock_status, current_price, and product_name from the response.
  4. Connect an IF node: if stock_status equals "available", continue to the order step. If not, route to a notification branch that messages the customer about the delay and logs the miss.

This guard is especially useful in high-velocity scenarios where a popular denomination — a $50 Steam card or a large Roblox Robux package — may sell out between the time your customer sees the listing and the time the order fires.

Step 4: Place the order

Add another HTTP Request node immediately after the availability check:

  1. Method: POST, URL: the FazerCards orders endpoint (see API docs for the path).
  2. Body type: JSON. Send the SKU and quantity from the webhook payload, plus a reference field — use your internal order ID so you can reconcile the response with your own records.
  3. Credential: FazerCards API.

For the vast majority of products in the FazerCards catalog — gift cards, game currencies, platform top-ups across PlayStation, Nintendo, Google Play, and dozens of game titles — the response arrives in seconds and contains the delivery payload inside data.delivery. A Set node extracts the code or redemption URL into a named variable for the next step. If you are running batch orders or high concurrency, the cookbook examples cover rate-limit handling and parallel order patterns.

Step 5: Deliver to the customer and log the transaction

Fan out from the delivery code into two parallel branches so fulfilment and logging happen simultaneously:

  • Customer delivery branch:
  • Telegram: add a Telegram node and send the code to the chat ID carried in the original webhook payload.
  • Email: add a SendGrid or SMTP node and fire a transactional message with the code embedded and instructions for redemption.
  • Logging branch:
  • Add a Postgres, MySQL, or Airtable node and write the order ID, SKU, delivery code, price paid, and a UTC timestamp to your records.

Running these in parallel — using n8n's fan-out pattern — keeps customer delivery fast regardless of database write latency. You can also add a Slack or Telegram notification to your own account so you see each successful delivery in real time while the business is new.

Step 6: Handle async callbacks for delayed fulfilment

A small fraction of products fulfil asynchronously — FazerCards queues the order internally and pushes a webhook callback once the code is ready. The webhooks reference documents the event schema. To support this path in n8n:

  1. Add a second Webhook node in a separate n8n workflow. This is your callback receiver.
  2. Register its URL in your FazerCards dashboard under Settings → Webhooks.
  3. In the callback workflow, read the incoming reference field, look up your order record, then execute the same customer-delivery branch from Step 5.

Your primary order workflow returns a 200 to the storefront immediately after placing the order; the code reaches the customer when the callback lands. For a broader look at the event model and why async matters at scale, the article Wholesale API, Gift Cards, and Webhooks Explained covers the architecture in detail.

What you have at the end

  • A self-running workflow that:
  • Accepts orders from any webhook-capable source — storefront, bot, or form
  • Validates stock and current pricing against the live FazerCards catalog before committing to the purchase
  • Places the order and delivers the code to the customer in seconds via their preferred channel
  • Falls back gracefully to an async callback path for delayed fulfilment
  • Logs every transaction for reconciliation, support, and margin analysis

The workflow is product-agnostic by design. Duplicate it, swap the SKU for a different category — Xbox gift cards, Valorant VP, Genshin Impact crystals, any of the 10,000+ products available through FazerCards — and the rest of the logic carries over unchanged. That is the compounding value of building on a wholesale API: one integration, unlimited catalog growth.

Try it yourself with the 5-day Gold free trial — full API access, no credit card, no KYC. Build and test this entire workflow before committing to a plan.

FAQ

Does n8n support automatic retries on API failures?

Yes. Every HTTP Request node in n8n has a Retry on Fail setting. For nodes calling the FazerCards API, configure three retries with a five-second delay between them. This handles transient network timeouts without any manual restart or monitoring overhead.

Can I use n8n Cloud instead of self-hosting?

Yes. n8n Cloud is the managed, paid version of n8n; it connects to the FazerCards API exactly the same way as a self-hosted Docker instance. Self-hosting is free and keeps your API credentials and order logs entirely within your own infrastructure — the better choice for resellers handling sensitive customer data.

How do I extend this to cover multiple product categories?

Add a Switch node after the Webhook trigger, routing by product category or SKU prefix to category-specific sub-workflows. Each branch can carry its own notification template, price-check logic, and delivery format while sharing the same FazerCards API credential. As your catalog grows, you add branches without rebuilding the core fulfilment logic.

Is the FazerCards API available on all subscription plans?

The REST API and webhooks ship on every paid plan, starting with Bronze at $9.99/month. See pricing for the full plan comparison. The Gold free trial gives you complete API access for five days with no payment method or KYC required — more than enough time to build, test, and go live with this workflow.