domain (submitted during Merchant Registration) is whitelisted
automatically when your merchant account is approved.
If you serve the same app from additional origins — an apex plus www, a staging or preview host, a
country-specific TLD, or a partner domain — each of those must be whitelisted too, or the deposit flow
fails to authenticate on that origin. Use this endpoint to add them.
Your primary registration
domain is already covered — you only need this endpoint for extra origins.
Adding a domain you already registered is a harmless no-op.Local development. Privy matches the exact origin — including protocol and port — so a localhost
origin must include the port (for example
localhost:3000); a bare localhost resolves to
http://localhost, which won’t match a page served on a port. The common dev ports localhost:3000,
localhost:5173, and localhost:5175 are already allowed, so you can test locally without registering
anything. For any other localhost port, register it through this endpoint — pass domain: "localhost:8080"
(localhost origins are registered on http://, not https://).Add a domain
POST https://api.blink.cash/v1/merchant-domains
On the testnet sandbox? Use
https://api-sandbox.blink.cash/v1/merchant-domains instead.X-Merchant-Authorization header (see
Authentication below) and your merchant account must be active (approved). The
request body carries only the domain.
201 Created):
added lists the origins newly whitelisted by this call. For a bare apex (for example coolapp.com)
both the apex and its www variant are registered together, so added may contain two origins. When the
domain is already whitelisted, added is an empty array (idempotent — no slot is consumed).
Authentication
Requests are authenticated the same way as merchant withdrawals: a signature-based envelope proving “I am merchant X”, carried in theX-Merchant-Authorization header. It
is not a fund-movement authorization — it only proves identity.
The header value is a base64-encoded JSON envelope:
Build the payload
A small JSON object with a version and a fresh timestamp:Blink enforces a 15-minute max signature age, so generate
signatureTimestamp per request.Base64url-encode the payload
Encode the JSON string to base64url — this exact string is what you sign.
Sign the encoded string
Sign the base64url payload string with ECDSA P-256 + SHA-256 (the same algorithm as the signer), then
base64url-encode the signature. See Key Generation for the key, and the
Signer Endpoint for the identical signing mechanics.
Request fields
| Field | Type | Required | Validation |
|---|---|---|---|
domain | string | Yes | A hostname (for example, www.coolapp.com) or localhost, optionally with a :port (localhost:3000, pay.coolapp.com:5173). An http(s):// scheme is accepted and stripped; no path or query. Max 255 chars. Stored lowercased. |
Response codes
| Code | Meaning |
|---|---|
201 | Domain registered (or already present). added lists newly whitelisted origins. |
400 | Validation error — the X-Merchant-Authorization header is malformed, or domain is missing or not a valid hostname. |
401 MERCHANT_AUTHORIZATION_MISSING | The X-Merchant-Authorization header is missing. |
403 MERCHANT_NOT_REGISTERED / MERCHANT_NOT_ACTIVE | The merchant is unknown, or not yet approved. Wait for approval before whitelisting additional domains. |
422 MERCHANT_DOMAIN_LIMIT_REACHED | The merchant already has the maximum of 10 additional domains. |
502 | Blink could not reach its upstream domain registry. Retry. |
Limits and behavior
Maximum 10 additional domains per merchant. This is in addition to your primary registration
domain. Re-adding a domain you already have does not count against the limit.- Add-only. There is no list or delete endpoint. To remove a domain, contact Blink at s@blink.cash.
- Idempotent. Re-posting the same domain is safe and returns
added: []. - Apex +
wwwtogether. Posting a bare apex (coolapp.com) also whitelistswww.coolapp.com; posting awwwhost also whitelists the apex. Deeper subdomains (pay.coolapp.com) are registered exactly as given.