Guides

Invoices & Payments

Manage invoices and process payments through multiple providers.

Invoices & Payments

NovaBilling automatically generates invoices for subscriptions and processes payments through your configured providers.

Invoice Lifecycle

DRAFT → FINALIZED → PAID
                  → FAILED → PAID (after retry)
                  → VOID

List Invoices

curl "http://localhost:3000/api/invoices?status=PENDING&page=1&limit=20" \
  -H "Authorization: Bearer sk_live_a1b2c3d4..."

Create a Manual Invoice

curl -X POST http://localhost:3000/api/invoices \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk_live_a1b2c3d4..." \
  -d '{
    "customerId": "cust_x1y2z3",
    "dueDate": "2025-02-28",
    "items": [
      {"description": "Pro Plan - Monthly", "quantity": 1, "unitAmount": 180000}
    ]
  }'

Finalize and Pay

# Finalize a draft invoice
curl -X POST http://localhost:3000/api/invoices/inv_abc123/finalize \
  -H "Authorization: Bearer sk_live_a1b2c3d4..."

# Mark as manually paid
curl -X POST http://localhost:3000/api/invoices/inv_abc123/mark-paid \
  -H "Authorization: Bearer sk_live_a1b2c3d4..."

# Void an invoice
curl -X POST http://localhost:3000/api/invoices/inv_abc123/void \
  -H "Authorization: Bearer sk_live_a1b2c3d4..."

Download PDF

curl "http://localhost:3000/api/invoices/inv_abc123/pdf" \
  -H "Authorization: Bearer sk_live_a1b2c3d4..."

Checkout

Generate a hosted checkout URL for an invoice so customers can pay online:

curl -X POST http://localhost:3000/api/invoices/inv_abc123/checkout \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk_live_a1b2c3d4..." \
  -d '{}'

Payments

Payments are created automatically when invoices are processed. You can list and refund them.

List Payments

curl "http://localhost:3000/api/payments?page=1&limit=20" \
  -H "Authorization: Bearer sk_live_a1b2c3d4..."

Refund a Payment

curl -X POST http://localhost:3000/api/payments/pay_abc123/refund \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk_live_a1b2c3d4..." \
  -d '{
    "amount": 50000,
    "reason": "Customer overcharged"
  }'

Payment Statuses

StatusDescription
PENDINGPayment initiated but not yet processed
PROCESSINGPayment is being processed by the provider
SUCCEEDEDPayment completed successfully
FAILEDPayment attempt failed
REFUNDEDPayment has been refunded
Copyright © 2026