Skip to content

Quickstart

This guide takes you from zero to a sent invoice using sandbox, so nothing is billed and no real customer is emailed.

  1. Get a sandbox key

    Sign in to the developer dashboard, create your business, then open Developers → API keys and click Create sandbox key. Copy the key: it starts with bd_test_ and is only shown once.

    Store it as an environment variable on your server:

    Terminal window
    export BRRNDOPS_API_KEY="bd_test_..."
  2. Check the key works

    Terminal window
    curl https://api.brrndops.com/v1/account \
    -H "Authorization: Bearer $BRRNDOPS_API_KEY"
    { "object": "account", "id": "acct_…", "livemode": false, "plan": "" }

    livemode: false confirms you’re in sandbox.

  3. Create an invoice

    Terminal window
    curl https://api.brrndops.com/v1/invoices \
    -H "Authorization: Bearer $BRRNDOPS_API_KEY" \
    -H "Idempotency-Key: $(uuidgen)" \
    -H "Content-Type: application/json" \
    -d '{
    "currency": "NGN",
    "customer": { "name": "Bola Ade", "email": "bola@example.com" },
    "line_items": [
    { "description": "Website design", "quantity": 1, "unit_amount": 25000000 }
    ],
    "due_date": "2026-11-30"
    }'

    The response is the full invoice. Note its id (inv_…), the auto-assigned number (TEST-INV-001 in sandbox) and the calculated total: 25000000 is ₦250,000.00.

  4. Download the PDF

    Terminal window
    curl https://api.brrndops.com/v1/invoices/inv_.../pdf \
    -H "Authorization: Bearer $BRRNDOPS_API_KEY" \
    -o invoice.pdf

    Sandbox PDFs carry a TEST watermark so they can never be mistaken for real ones.

  5. Send it

    Terminal window
    curl -X POST https://api.brrndops.com/v1/invoices/inv_.../send \
    -H "Authorization: Bearer $BRRNDOPS_API_KEY"

    The invoice moves to sent. In sandbox no email goes out, so you can test this step as often as you like.