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.
| Requirement | Value |
|---|---|
| Authentication | X-Api-Key: sk_live_... |
| Idempotency | Idempotency-Key header, required |
| Content type | application/json |
| Body field | Type | Required | Rules |
|---|---|---|---|
amount | decimal string | Yes | Positive plain decimal |
asset | string | Yes | USDT in the current production flow |
network | string | Yes | TRON in the current production flow |
externalId | string | Yes | 1–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.