Developer documentation
The Brionic Payments API creates crypto charges and invoices, manages customers, and pushes real-time webhooks. It's a JSON REST API that follows Stripe-style conventions closely enough that most tooling works out of the box.
Base URL
https://pay.brionicsecurity.com/api/v1
The public health check (no auth) lives at https://pay.brionicsecurity.com/api/health.
Authentication
Authenticate every request with a secret API key as a Bearer token. Create keys in your dashboard under Developers → API keys. A key is shown once: store it securely and never expose it in client-side code.
sk_live_…, live keys settle real on-chain payments.sk_test_…, test keys for integration work.
curl https://pay.brionicsecurity.com/api/v1/charges \
-H "Authorization: Bearer sk_live_your_key_here"
Requests without a valid key return 401 Unauthorized.
Each key has scopes, chosen when you create it (all by default), and every endpoint needs one.
A request outside them gets 403 with error.type insufficient_scope.
| Scope | Allows |
|---|---|
payments:read | See your charges, invoices, customers, refunds and events. |
payments:write | Create charges, invoices and customers, and cancel or void them. |
refunds:write | Record refunds you send from your own wallet. |
x402:write | Create pay-per-call (x402) endpoints. |
webhooks:write | Get notified about your payments at an address of its choosing. |
No scope can move or withdraw money: payments always settle straight to your own wallet. Apps and platforms acting for other merchants use OAuth instead of a key.
Errors & status codes
The API uses standard HTTP status codes. Errors return a JSON body with a message:
{
"error": {
"type": "invalid_request",
"message": "Amount must be greater than zero."
}
}
| Code | Meaning |
|---|---|
200 / 201 | Success. |
400 / 422 | Invalid request or validation error. |
401 | Missing or invalid API key. |
404 | Resource not found. |
409 | A request with the same Idempotency-Key is still running; retry shortly. |
429 | Rate limited, slow down. |
Safe retries (Idempotency-Key)
Every POST accepts an Idempotency-Key header: any unique string up to 255
characters. If a request times out, send it again with the same key. The first request runs once, and
every repeat within 24 hours gets its response back, marked Idempotent-Replayed: true,
instead of creating a second charge or invoice.
curl https://pay.brionicsecurity.com/api/v1/charges \
-H "Authorization: Bearer sk_test_…" \
-H "Idempotency-Key: order-1042-attempt" \
-H "Content-Type: application/json" \
-d '{"asset":"XRP","fiat_amount":"25.00","fiat_currency":"USD"}'
Using a key again for a different request is refused with 422
(idempotency_error). A failed request (4xx validation error or
5xx) is not kept, so a corrected retry can use the same key.
The whole API is described in OpenAPI 3.1
(also listed at /.well-known/api-catalog) for code generators and agent frameworks.
Charges
A charge is a single request for payment in a crypto asset. Each one has its own pay page, a QR code, and whatever the watcher uses to match the payment back to it: a unique destination tag (XRP/RLUSD), memo id (XLM/USDC on Stellar), payment reference (Solana, Sui), its exact amount (USDC on Base), or, for Bitcoin, an address of its own.
| Method | Endpoint | Description |
|---|---|---|
| POST | /charges | Create a charge. |
| GET | /charges | List charges. |
| GET | /charges/{id} | Retrieve a charge. |
| POST | /charges/{id}/cancel | Cancel an open charge. |
Create a charge, price it directly in crypto, or in fiat (auto-converted at the current rate):
curl https://pay.brionicsecurity.com/api/v1/charges \
-H "Authorization: Bearer sk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"asset": "XRP",
"fiat_amount": "49.99",
"fiat_currency": "USD",
"description": "Pro plan",
"success_url": "https://yoursite.com/thanks"
}'
Response:
{
"id": "ch_9f2c…",
"object": "charge",
"status": "pending",
"asset": "XRP",
"crypto_amount": "99.980000",
"receive_address": "r…",
"hosted_url": "https://pay.brionicsecurity.com/pay/ch_9f2c…",
"expires_at": "2026-06-20 12:30:00"
}
Accepted assets on this server: XRP, XLM, USDC_XLM, SOL, SUI, USDC_SUI, USDC_SOL, USDC_BASE, BTC, RLUSD(USDC_XLM is USDC on Stellar; the old code USDC is still accepted). Your own account can be paid
only in the coins you have a receiving wallet for: GET /assets lists them.
Provide either amount (crypto) or fiat_amount + fiat_currency, not both.
Bitcoin (beta), where enabled: add your wallet's extended public key (xpub, ypub or zpub) under Wallets, not an address. Each charge is paid to a new address from it, so payments are told apart without a tag, and they show in your own wallet. Brionic can only watch those addresses, never spend from them. A charge settles after one block (about ten minutes); until then its pay page shows the payment as seen. The smallest Bitcoin charge is 0.00001 BTC, and Bitcoin is not offered for pay-per-call (x402).
Invoices
An invoice is an itemized request for payment you can email to a customer. It wraps a long-lived charge and has its own branded pay page.
| Method | Endpoint | Description |
|---|---|---|
| POST | /invoices | Create an invoice. |
| GET | /invoices | List invoices. |
| GET | /invoices/{id} | Retrieve an invoice. |
| POST | /invoices/{id}/send | Finalize & email the invoice. |
| POST | /invoices/{id}/void | Void an invoice. |
curl https://pay.brionicsecurity.com/api/v1/invoices \
-H "Authorization: Bearer sk_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"asset": "USDC_XLM",
"customer_email": "[email protected]",
"customer_name": "Jane Doe",
"items": [
{ "description": "Design work", "quantity": 1, "unit_amount": "250" }
],
"send": true
}'
Payment links
A reusable pay page anyone can pay, again and again: a tip jar, a product, a donation. Ideal to post from a bot.
POST /payment_links with slug, asset, and amount for a fixed price
(leave it out to let the payer choose); the response has the public url. List them with
GET /payment_links and stop one with POST /payment_links/{id}/deactivate. A key or app with a
per-transaction limit can only make fixed-price links within it. Also available as MCP tools.
Customers
| Method | Endpoint | Description |
|---|---|---|
| POST | /customers | Create a customer. |
| GET | /customers | List customers. |
| GET | /customers/{id} | Retrieve a customer. |
Settlement (non-custodial)
Brionic is fully non-custodial. Every charge and invoice is addressed to
your own wallet, so payments settle directly to you on-chain and Brionic never holds your
funds. There is no platform balance and no payout step. Add a receiving wallet for each asset you accept
under Wallets in your dashboard; a charge in an asset you have no wallet for is rejected.
You can override the destination per charge by passing a receive_address.
Events
| Method | Endpoint | Description |
|---|---|---|
| GET | /events | List recent events. |
| GET | /events/{id} | Retrieve an event. |
Webhooks
Add HTTPS endpoint URLs under Developers → Webhooks. We POST a JSON
event the instant something happens. Each endpoint has its own signing secret
(whsec_…).
Event types include:
charge.created charge.pending charge.confirmed
charge.completed charge.underpaid charge.expired
payment.unverified
invoice.created invoice.sent invoice.paid invoice.voided invoice.scheduled
Apps and bots can register endpoints themselves with POST /webhook_endpoints
(url, optional events; needs webhooks:write and payments:read).
The response carries the signing secret once. A connected app sees and removes only its own endpoints
(GET /webhook_endpoints, POST /webhook_endpoints/{id}/delete), and they stop when
the merchant disconnects it.
curl -X POST https://pay.brionicsecurity.com/api/v1/webhook_endpoints -H "Authorization: Bearer bpa_…" \
-H "Content-Type: application/json" -d '{"url": "https://bot.example/hooks", "events": ["charge.completed"]}'
Verifying signatures
Each delivery includes a Brionic-Signature header so you can confirm it
came from us and wasn't tampered with:
Brionic-Signature: t=1718900000,v1=<hex hmac_sha256("<t>.<rawBody>", whsec)>
Brionic-Event-Id: evt_…
Brionic-Event-Type: charge.completed
To verify: take the t value, concatenate t + "." + rawRequestBody,
compute an HMAC-SHA256 with your endpoint's signing secret, and compare it to v1
in constant time. Reject timestamps that are too old (e.g. > 5 minutes) to prevent replays.
// PHP example
$payload = $_SERVER['HTTP_BRIONIC_SIGNATURE']; // "t=...,v1=..."
parse_str(str_replace(',', '&', $payload), $sig);
$expected = hash_hmac('sha256', $sig['t'] . '.' . file_get_contents('php://input'), $whsec);
if (hash_equals($expected, $sig['v1']) && abs(time() - (int) $sig['t']) < 300) {
// ✓ trusted event, process it
}
Respond with a 2xx status to acknowledge. We retry failed deliveries with
exponential backoff.
AI assistants (MCP server)
Brionic runs a hosted Model Context Protocol server that exposes the API as tools an AI assistant or agent can call in natural language: create charges and invoices, record refunds, look up records, and manage pay-per-call endpoints. There is nothing to install. Connect any MCP client to:
https://pay.brionicsecurity.com/mcp
Clients that support MCP sign-in (Claude, ChatGPT, Cursor, VS Code, Claude Code) need nothing else: the server
answers 401 with a pointer to its OAuth metadata, the client opens
Connect with Brionic, and you approve it with the permissions, mode and spending limits you choose.
Anything else sends Authorization: Bearer sk_test_…. It speaks Streamable HTTP, protocol
2026-07-28 and the earlier initialize handshake (2025-03-26 to
2025-11-25). The tool list is public. Test mode works on every plan; live payments over MCP need the
Gold or Diamond plan.
# Claude Code (then /mcp to sign in)
claude mcp add --transport http brionic https://pay.brionicsecurity.com/mcp
// Cursor (.cursor/mcp.json) or VS Code (.vscode/mcp.json, with "type": "http")
{ "mcpServers": { "brionic": { "url": "https://pay.brionicsecurity.com/mcp" } } }
// With a key instead of signing in, add:
"headers": { "Authorization": "Bearer sk_test_…" }
Each tool runs through the same endpoint as the matching REST call, so the mode, scopes, spending limits and
plan of your key or connection apply unchanged. Lookups are marked read-only; every create tool takes an idempotency_key
so an agent that retries makes the payment request once. The full list is in
OpenAPI (each operation names its tool in x-mcp-tool).
Clients that can only launch a local command (Claude Desktop, for example) can use the
downloadable server (ZIP, Node.js 18+), which forwards to the hosted one
and adds brionic_x402_fetch for paying other x402 endpoints from your machine:
{
"mcpServers": {
"brionic": {
"command": "node",
"args": ["/path/to/brionic-mcp/src/server.js"],
"env": { "BRIONIC_API_KEY": "sk_test_…" }
}
}
}
The model never sees your key: your MCP client sends it. Start on sk_test_…; charges
created with an sk_live_… key settle real on-chain payments. Give an agent its own key with a
per-transaction and daily limit under Developers → API keys.
Connect with Brionic (OAuth 2.1)
For anything that acts for merchants other than you: an AI app, a bot on X, Telegram or Discord, a SaaS or a marketplace. Each merchant approves your app once, on a Brionic screen where they choose its scopes, test or live mode, and per-charge and daily limits. You get tokens, never a key, and they can disconnect you any time under Developers → API keys.
- Discovery:
https://pay.brionicsecurity.com/.well-known/oauth-authorization-server(RFC 8414) andhttps://pay.brionicsecurity.com/.well-known/oauth-protected-resource/mcp(RFC 9728). - Register your app with
POST https://pay.brionicsecurity.com/oauth/register(RFC 7591), or use the https URL of a client ID metadata document as yourclient_id. Servers get aclient_secret; apps that run on a device register with"token_endpoint_auth_method": "none". - Redirect URIs are matched exactly: https, an app’s own scheme, or
http://127.0.0.1/localhoston any port. - PKCE with
S256is required. Access tokens last an hour; refresh tokens last 30 days and change on every use, and presenting a used one ends that sign-in. resource=https://pay.brionicsecurity.com/mcpor…/api/v1limits a token to that one (RFC 8707).
# 1 · Register (once)
curl -X POST https://pay.brionicsecurity.com/oauth/register -H "Content-Type: application/json" \
-d '{"client_name": "My Bot", "redirect_uris": ["https://bot.example/oauth/callback"]}'
# 2 · Send the merchant to approve it
https://pay.brionicsecurity.com/oauth/authorize?response_type=code&client_id=bpc_…&redirect_uri=https%3A%2F%2Fbot.example%2Foauth%2Fcallback
&scope=payments%3Aread%20payments%3Awrite&state=…&code_challenge=…&code_challenge_method=S256
# 3 · Exchange the code (and later, grant_type=refresh_token)
curl -X POST https://pay.brionicsecurity.com/oauth/token -u bpc_…:bps_… \
-d grant_type=authorization_code -d code=… -d code_verifier=… \
-d redirect_uri=https://bot.example/oauth/callback
# 4 · Call the API or the MCP server with the access token
curl https://pay.brionicsecurity.com/api/v1/charges -H "Authorization: Bearer bpa_…"
Revoke a token with POST https://pay.brionicsecurity.com/oauth/revoke (RFC 7009). The model APIs from xAI (Grok),
OpenAI and Anthropic all accept the MCP server as a remote tool with a token; the
bots guide has the snippets.
Pay-per-call (x402)
Charge per request for an API or an AI-agent resource. A caller hits your endpoint at
https://pay.brionicsecurity.com/x402/{slug}. If it hasn't paid, Brionic answers HTTP 402
Payment Required with machine-readable payment requirements backed by an on-chain charge. The caller
pays (any coin you accept except Bitcoin), then retries with an X-PAYMENT header to receive the resource,
exactly once per payment. Create endpoints under Pay-per-call in your dashboard.
First request (unpaid) returns 402:
{
"x402Version": 1,
"error": "payment_required",
"accepts": [{
"scheme": "xrpl", "network": "mainnet", "asset": "XRP",
"amount": "0.50", "payTo": "r…", "destinationTag": 12345,
"paymentId": "ch_…", "payUrl": "https://pay.brionicsecurity.com/pay/ch_…"
}],
"instructions": "Pay payTo (with destinationTag/memo), then retry with header X-PAYMENT: ch_…"
}
After the charge settles on-chain, retry to unlock the resource:
curl https://pay.brionicsecurity.com/x402/premium-data \ -H "X-PAYMENT: ch_…" # → 200 OK, your configured JSON/text/redirect response
Built for the agent economy:
an agent can pay for a tool call programmatically, settled natively on the XRP Ledger or Stellar.
Manage endpoints via the dashboard, the REST API (GET/POST /api/v1/x402), or the
MCP server (brionic_create_x402_endpoint, brionic_x402_fetch).
Verified payers (XRPL Credentials)
Nominate a trusted credential issuer on the XRP Ledger under Settings → Verified payers. When a payment settles on an XRP Ledger asset (XRP, RLUSD), Brionic reads the payer's on-chain Credential (XLS-70) from that issuer and stamps the payment as a Verified payer when the credential is present, accepted, and unexpired, a compliance/KYC attestation that travels with the payment, without Brionic ever handling the payer's private documents.
Provide the issuer address (r…) and a credential type (plain text such as
KYC; Brionic hex-encodes it for the ledger lookup). The lookup is read-only and
best-effort, and it never blocks or delays settlement. The result appears on the payment detail page and in
the API (payer_verified, credential_detail).
Tick Flag payments from unverified payers to enforce the policy. When a payment settles
from a payer who does not hold a valid credential, Brionic records it as unverified, emits a
payment.unverified webhook, and emails the account owner so you can review it. Because settlement
is non-custodial the funds are already in your wallet: Brionic never rejects or reverses the on-chain
payment, and the flag is purely informational.
Account verification & plans
Brionic bills a flat monthly subscription (paid on-chain) rather than taking a percentage of each payment, so merchants keep 100% of what they're paid. A plan must be active before invoices can be sent, and the $1 Starter tier is what verifies the account. Each plan (Starter, Silver, Gold, Diamond) allows a set number of settled transactions per month. Manage your plan under Billing & plans in the dashboard.
Pay-per-call (x402) and the MCP server are included on the Gold and Diamond plans; the REST API and webhooks are available on every plan.
Brionic is non-custodial: payments settle straight to your own wallet for each asset (configured under Wallets), and funds never touch a platform-controlled address. There is nothing to hold and no payout to wait for. Add a receiving wallet for each asset you want to accept.
Plugins & integrations
Prefer not to write code? Drop-in integrations connect your store to Brionic and reconcile orders using the same signed webhooks described above.
WooCommerce
Download the plugin (ZIP) or see the WooCommerce overview. Then under WooCommerce → Settings → Payments → Brionic Payments:
- Paste a secret API key (
sk_live_…) from Developers → API keys. - Add a webhook endpoint in your dashboard pointing to
https://your-store.com/wp-json/brionic/v1/webhook(eventscharge.completed,charge.underpaid,charge.expired) and paste its signing secret (whsec_…) into the plugin. - Choose which coins to accept (Bitcoin, XRP, USDC, RLUSD, XLM, SOL, SUI). Customers pick at checkout and pay on the hosted page; the order is marked paid on-chain.
Shopify
Download the connector (ZIP) or see the Shopify overview. Run the Brionic ⇄ Shopify connector and install it on your store. It uses
the standard manual-payment pattern: a buyer who chooses your “Crypto” payment method places a
pending order, the connector creates a Brionic charge and exposes a hosted pay link via an App
Proxy, and when charge.completed arrives it marks the Shopify order paid through the
Admin API. Point a webhook endpoint at https://your-connector/webhooks/brionic.
Square (customer import)
Already selling with Square? Under Integrations in your dashboard, connect Square with a read-only access token and sync your Square customer directory into Brionic (matched by email, re-runnable any time). Nothing in Square is changed. It just lets you start invoicing your existing customers in crypto. There's a dedicated overview at /square.
All integrations are non-custodial: funds settle to the wallet you configure in Brionic. Need a plugin for another platform? Ask us.
Need help?
Reach us through the support form or at [email protected].