> For the complete documentation index, see [llms.txt](https://developer.branta.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.branta.pro/setup/receive/custom-integration/parent-platforms/per-client-keys.md).

# Per-client keys (Deprecated)

Each merchant has their own API key. You HMAC-sign every publish.

{% hint style="warning" %}
Deprecated. Use [Shared key](https://developer.branta.pro/setup/receive/custom-integration/parent-platforms/shared-key.md) for new integrations.
{% endhint %}

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:

1. **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.
2. **The parent's HMAC signature** in `X-HMAC-Signature` and `X-HMAC-Timestamp`. The merchant's API key is configured with a `parent_platform_id`, which tells Branta to validate the request's HMAC against the parent's active secrets. Requests missing a valid signature are rejected.

The merchant onboards as a normal [Platform](https://developer.branta.pro/setup/receive.md) 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 **Secrets** tab in Guardrail will not be available, and merchants won't be able to select you as a parent when issuing their API keys.

#### 2. Create a Secret

Once parent platform access is enabled, a **Secrets** tab appears in Guardrail. Create and rotate secrets as described in [HMAC signing](https://developer.branta.pro/setup/receive/hmac-signing.md#onboarding).

The secret signs every payment you publish on behalf of every merchant. Treat it like a root credential.

#### 3. Integrate

For each merchant you serve:

1. They onboard as a normal [Platform](https://developer.branta.pro/setup/receive.md) (steps 1–3 of that flow), then create an API key in their own Guardrail account and select your parent platform from the dropdown.
2. They share that API key with you (the same way they'd share an API key with any payment service they use).
3. Your service `POST`s their payment destinations to Branta using their API key in `Authorization`, signed with your HMAC secret.

The request body is identical to a regular platform publish (see [Receive](https://developer.branta.pro/tech/api/receive.md)). The only difference is the two HMAC headers, signed with your HMAC secret and sent alongside the merchant's API key. The SDK adds them when you pass the merchant's API key and your HMAC secret. For the signing format, the SDK option, a curl example, and error responses, see [HMAC signing](https://developer.branta.pro/setup/receive/hmac-signing.md).
