BramaPay Docs

Invoices API

Create and verify project invoices from your server.

Base URL: https://api.bramapay.com

POST /v1/invoices

Creates an invoice using the project associated with the secret key.

RequirementValue
AuthenticationX-Api-Key: sk_live_...
IdempotencyIdempotency-Key header, required
Content typeapplication/json
Body fieldTypeRequiredRules
amountdecimal stringYesPositive plain decimal
assetstringYesUSDT in the current production flow
networkstringYesTRON in the current production flow
externalIdstringYes1–200 characters; unique durable order attempt

Success returns HTTP 201 with invoiceId, externalId, status, checkoutUrl, and ISO-8601 expiresAt.

GET /v1/invoices/:invoiceId

Returns the same integration projection for server-side status verification. Use the same project's secret key. Malformed, absent, and cross-project IDs return 404 INVOICE_NOT_FOUND without leaking ownership.

Require status === "PAID" and match the stored externalId before fulfillment.

Idempotency

Persist the idempotency key with your order. Retry transient failures with the same key and identical body. Reusing the key for different input, or reusing an already-reserved external order identifier for a conflicting attempt, returns 409 IDEMPOTENCY_CONFLICT.

On this page