Quickstart
This guide takes you from zero to a sent invoice using sandbox, so nothing is billed and no real customer is emailed.
-
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_..." -
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: falseconfirms you’re in sandbox. -
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"}'const res = await fetch('https://api.brrndops.com/v1/invoices', {method: 'POST',headers: {Authorization: `Bearer ${process.env.BRRNDOPS_API_KEY}`,'Idempotency-Key': crypto.randomUUID(),'Content-Type': 'application/json',},body: JSON.stringify({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',}),});const invoice = await res.json();import os, uuid, requestsinvoice = requests.post("https://api.brrndops.com/v1/invoices",headers={"Authorization": f"Bearer {os.environ['BRRNDOPS_API_KEY']}","Idempotency-Key": str(uuid.uuid4()),},json={"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",},).json()$ch = curl_init('https://api.brrndops.com/v1/invoices');curl_setopt_array($ch, [CURLOPT_POST => true,CURLOPT_RETURNTRANSFER => true,CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('BRRNDOPS_API_KEY'),'Idempotency-Key: ' . bin2hex(random_bytes(16)),'Content-Type: application/json',],CURLOPT_POSTFIELDS => json_encode(['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',]),]);$invoice = json_decode(curl_exec($ch), true);The response is the full invoice. Note its
id(inv_…), the auto-assignednumber(TEST-INV-001in sandbox) and the calculatedtotal:25000000is ₦250,000.00. -
Download the PDF
Terminal window curl https://api.brrndops.com/v1/invoices/inv_.../pdf \-H "Authorization: Bearer $BRRNDOPS_API_KEY" \-o invoice.pdfSandbox PDFs carry a TEST watermark so they can never be mistaken for real ones.
-
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.
Next steps
Section titled “Next steps”- Learn the full invoice lifecycle in Create and send an invoice.
- Make your integration safe to retry with idempotency keys.
- When you’re ready, follow Going live.