Skip to content

API Reference

Base URL: https://fincobra.com

Checkout API

These endpoints are served by the checkout service and handle configuration, invoices, and payments.

Configuration

MethodPathAuthDescription
GET/api/checkout/configRequiredGet your checkout configuration
PUT/api/checkout/configRequiredCreate or update configuration
GET/api/checkout/config/balanceRequiredGet wallet balance

Invoices

MethodPathAuthDescription
POST/api/checkout/invoicesRequiredCreate a new invoice
GET/api/checkout/invoicesRequiredList invoices (with filters)
GET/api/checkout/invoices/statsRequiredGet invoice count by status
GET/api/checkout/invoices/:idRequiredGet full invoice detail + QR code
GET/api/checkout/invoices/:id/statusRequiredGet invoice status (lightweight)

Payment page

MethodPathAuthDescription
GET/api/checkout/pay/:idNonePublic invoice data for payment page

Main API

These endpoints are served by the main FinCobra backend and handle API key management. They require session or bearer token authentication.

API key management

MethodPathAuthDescription
POST/api/users/:id/checkout-api-keySession/BearerGenerate a new API key (max 3 active)
GET/api/users/:id/checkout-api-keysSession/BearerList active API keys
DELETE/api/users/:id/checkout-api-key/:keyIdSession/BearerRevoke an API key

Authentication methods

MethodHeader/CookieUsed for
API KeyX-Api-Key: fc_live_...Programmatic access to checkout API
Sessionsession cookie (JWT)Browser-based dashboard access
BearerAuthorization: Bearer <jwt>Server-to-server or mobile

Common error format

All errors follow the same shape:

json
{
  "error": "Human-readable error message"
}

Validation errors may include additional detail:

json
{
  "error": "Validation failed",
  "details": { ... }
}

HTTP status codes

CodeMeaning
200Success
201Created (new invoice)
400Validation error
401Authentication failed
404Resource not found
409Conflict (duplicate xpub, max keys reached)
502Upstream service error (wallet balance)

Rate limits

API key management endpoints have strict rate limits. Invoice creation and listing have moderate limits. If you exceed the limit, you'll receive a 429 Too Many Requests response.