Per-client keys (Deprecated)
Each merchant has their own API key. You HMAC-sign every publish.
Each merchant has their own Branta platform and their own API key. You hold an HMAC secret and sign every payment publish, proving the request originated from you and not from someone who got a copy of a merchant's API key.
How requests are authenticated
Every payment publish carries two credentials:
The merchant's API key in
Authorization: Bearer …. This tells Branta which merchant's platform the payment belongs to, so the right name and logo render to senders.The parent's HMAC signature in
X-HMAC-SignatureandX-HMAC-Timestamp. The merchant's API key is configured with aparent_platform_id, which tells Branta to validate the request's HMAC against the parent's active API secrets. Requests missing a valid signature are rejected.
The merchant onboards as a normal Platform and, when generating their API key in Guardrail, selects your parent platform from the dropdown. From then on, that key only works when accompanied by your HMAC signature.
Onboarding
1. Get parent platform access enabled
A Branta admin needs to turn this on for your account. Reach out and ask — without it, the API Secrets section in Guardrail will not be available, and merchants won't be able to select you as a parent when issuing their API keys.
2. Generate an API Secret
Once parent platform access is enabled, an API Secrets section appears in Guardrail. Generate a secret there.
The secret is shown once at creation — copy it immediately and store it server-side (your secret manager, not source control).
You can hold multiple active secrets at the same time, which makes rotation safe: generate the new one, deploy it, then revoke the old one once nothing is signing with it.
3. Integrate
For each merchant you serve:
They onboard as a normal Platform (steps 1–3 of that flow), then create an API key in their own Guardrail account and select your parent platform from the dropdown.
They share that API key with you (the same way they'd share an API key with any payment service they use).
Your service
POSTs their payment destinations to Branta using their API key inAuthorization, signed with your HMAC secret.
The SDKs sign this when you pass the merchant's API key and your HMAC secret. Install from the SDK page.
The request body is identical to a regular platform publish (see Receive); the only difference is the two extra headers:
X-HMAC-Signature— hex SHA-256 HMAC of the canonical message string, keyed by your API Secret.X-HMAC-Timestamp— Unix epoch seconds. Branta rejects requests outside a 30-minute window.
The canonical message is the request method, full URL, raw body, and timestamp joined with literal | characters, no whitespace:
If you'd rather sign requests yourself:
Last updated

