Getting started
Welcome to Vauchflow — the Voucher & Promotions API built for developers.
Prerequisites
Section titled “Prerequisites”- A Vauchflow account (sign up free)
curlor any HTTP client
Quickstart
Section titled “Quickstart”-
Get your API key
From your dashboard, navigate to Settings → API Keys and create a secret key (
vf_sk_...). -
Create a campaign
Terminal window curl -X POST https://api.vauchflow.com/v1/campaigns \-H "Authorization: Bearer vf_sk_YOUR_KEY" \-H "Content-Type: application/json" \-d '{"name": "Summer Sale","type": "DISCOUNT","rules": {"discount_type": "PERCENT","discount_value": 20,"max_redemptions": 500,"expires_at": "2026-08-31T23:59:59Z"}}' -
Issue a voucher
Terminal window curl -X POST https://api.vauchflow.com/v1/vouchers \-H "Authorization: Bearer vf_sk_YOUR_KEY" \-H "Content-Type: application/json" \-H "Idempotency-Key: create-save20-001" \-d '{"code": "SAVE20","campaign_id": "cmp_01HX..."}' -
Redeem atomically
Terminal window curl -X POST https://api.vauchflow.com/v1/vouchers/SAVE20/redeem \-H "Authorization: Bearer vf_sk_YOUR_KEY" \-H "Content-Type: application/json" \-d '{"customer_id": "cust_external_123","order_value": 89.99}'# Response# { "discount_applied": 17.998, "status": "redeemed", "remaining": 499 }
API key types
Section titled “API key types”| Type | Prefix | Use case |
|---|---|---|
| Secret | vf_sk_ | Server-side only — full API access |
| Publishable | vf_pk_ | Client-side — validate only, never redeem |
Idempotency
Section titled “Idempotency”All write endpoints accept an Idempotency-Key header. Use a unique key per request to safely retry on network failures — you’ll get the same response without double-creating resources.
Next steps
Section titled “Next steps”- API Reference — full endpoint docs
- Webhook events — get notified on redemptions
- SDKs — official client libraries