Skip to content

Getting started

Welcome to Vauchflow — the Voucher & Promotions API built for developers.

  • A Vauchflow account (sign up free)
  • curl or any HTTP client
  1. Get your API key

    From your dashboard, navigate to Settings → API Keys and create a secret key (vf_sk_...).

  2. 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"
    }
    }'
  3. 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..."
    }'
  4. 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 }
TypePrefixUse case
Secretvf_sk_Server-side only — full API access
Publishablevf_pk_Client-side — validate only, never redeem

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.