<iframe>. Your users browse and choose cards inside it; you decide whether they may have them (for example, by spending points in your app); you then pay WizzGift from your prepaid balance. WizzGift delivers the cards straight to the email address the user entered.
You never handle card codes, and you never need your own product catalog.
How it works
- The user fills a cart in the iframe and enters their email.
- WizzGift prices the cart and the iframe posts a signed quote to your page (
order-requested). - Your backend charges the user on your side, then redeems the quote with your API key. That creates the order and pays it from your balance.
- WizzGift fulfils the order, emails the cards to the user, and sends a signed callback to your server with the outcome.
You need a business account with B2B enabled, an API key with the
orders:create and orders:read scopes, a funded balance (see the B2B quickstart), and an https endpoint for callbacks.1
Get your integration settings
Response (200)
signingSecret server-side only. It verifies the callbacks in step 5.2
Embed the storefront
You can link straight to a section by adding a path before the query string:
/gift-cards/<category>, /gift-cards/<product-slug>, /refill (mobile top-ups), or /recharge/<product-slug>.3
Receive the quote
When the user checks out, the iframe posts a message to your page. Accept it only from the storefront origin and from the iframe you embedded:
Message
orderInfo is a JWT signed by WizzGift. Its payload repeats the quote (totalAmount in USD, items, the user’s email, iframeIntegrationId, and jti, the quote id). You can decode it to show a confirmation, but you can’t verify the signature: WizzGift checks it when you redeem.If you passed email and need the cards to go only to that address, compare the token’s email claim with it before redeeming. The user controls the iframe URL and can change the address in the cart.4
Redeem the quote
From your backend, after you have charged the user:
The response is the order (
success: true plus the fields of GET /b2b/orders/{checkoutId}). 201 means a new paid order; 200 means you retried a quote that was already redeemed for the same partnerRef.5
Handle the callback
When the order reaches
completed, partial, or failed, WizzGift sends a POST to your callbackUrl:- Verify
X-Wizzgift-Signaturewith yoursigningSecret, using the same scheme and code as webhook signatures. X-Wizzgift-Eventisorder.completed,order.partial, ororder.failed.- Any non-2xx response is retried 3 more times (after about 3, 10, and 30 seconds). Return
2xxonce you have recorded the outcome, and make your handler idempotent. - WizzGift refunds failed units to your balance automatically.
refund_details.amountis the value of every failed unit in USD: return that much to your user. Forfailed, return the full amount.
Card codes and privacy
Cards from the embedded storefront belong to the end user. WizzGift emails them to the address entered in the iframe, and the user can also open them at thelink above. Callbacks and the order API show you fulfillment status only; they never include card codes for these orders.
Security checklist
- Accept
order-requestedonly fromhttps://iframe.wizzgift.comand from your own iframe’s window. - Derive the charge from the token on your server; keep one order per token (
jti). - Redeem only from your backend; keep your API key and
signingSecretout of browser code. - Use an https callback URL and verify every callback’s signature before acting on it.