Protect your API keys
An API key speaks for your organization. A read-write key can move money.- Keep keys on your servers. Never put a key in a browser, a mobile app, a URL or a source repository. Keep it in a secret store and load it at runtime. Conduit shows a key once, at creation, and keeps only a hash, so it cannot show the key again (API keys).
- Use one key per service. Give each integration its own named key, so you can revoke one without stopping the others. The API Keys page in the dashboard shows each key’s name, owner and creation date.
- Start read-only. New keys are read-only by default and can make
GETrequests only. Use read-only keys for reporting, reconciliation and dashboards. Create a read-write key only for a service that must write, for example to create customers, orders, payouts or webhook endpoints. Only an Admin can create, revoke or change the allowlist of a read-write key (Access level). - Restrict each key to your IP addresses. On the API Keys page, set Restrict to specific IPs and list up to 20 IPv4 or IPv6 addresses or CIDR blocks. Conduit refuses a request from any other address with
403 API_KEY_IP_NOT_ALLOWED, even when the key is correct. List the public address your requests leave from: if your servers sit behind a proxy or a NAT gateway, that is the gateway’s address. The allowlist applies to API calls only, never to the dashboard, so you can always edit it. - Rotate keys. Keys do not expire. Rotate them on a schedule and whenever someone who had access leaves: create the new key, deploy it, confirm traffic on it, then revoke the old key.
- Replace keys before you remove their owner. A key stops working when the team member who created it leaves or is removed from your organization. Before you remove a person, move each service that uses their keys to a key that another team member owns.
- Scan for leaked keys. Live keys start with
ck_live_and sandbox keys withck_sandbox_. Add both prefixes to the secret scanning on your repositories, logs and support tickets.
Keep sandbox and production apart
- Use separate keys. A key works in one environment only. A sandbox key on the production API, or a live key on the sandbox API, returns
401 API_KEY_INVALID(Environments). - Store them separately. Keep live keys out of development machines, test suites and CI. Give each environment its own secret store and its own webhook endpoint and signing secret.
- Build and test in sandbox. Sandbox moves no real money, so develop and test every flow there first (Sandbox overview).
If an API key leaks
1
Revoke the key
On the API Keys page, revoke the key. Conduit refuses it from the next request.
2
Create a replacement
Create a new key with the same access level, restrict it to your IP addresses, and deploy it.
3
Check your webhook endpoints
A read-write key can create webhook endpoints. List them with
GET /v2/webhooks/endpoints or on the Webhooks page, and delete any endpoint you did not create (Managing endpoints).4
Check your payout destinations
A read-write key can also register addresses and whitelist recipients, which later payouts can send to. List the registered addresses and whitelist recipients of each customer, and revoke any you did not create.
5
Review recent activity
List the orders, payouts and transactions created since the key leaked, and compare them with your own records.
6
Contact Conduit
Tell your Conduit representative or support which key leaked, when, and anything you found. Include the
x-correlation-id of any request you need to ask about.Secure your webhook endpoint
Anyone who knows your endpoint URL can send it a request. The signature is how you know Conduit sent it.- Verify every delivery before you process it. Check
X-Conduit-Signatureagainst the raw request body before you read any field or header, and reject a delivery whose timestamp is more than 300 seconds old (Verify signatures, signature verifier). - Store the signing secret like an API key. Conduit shows it once, when you create the endpoint or rotate the secret.
- Rotate the secret when it leaks or on a schedule. After a rotation, Conduit signs each delivery with both the new and the previous secret for about 48 hours, so you can deploy the new secret without dropping events (Rotate your signing secret).
- Serve the endpoint over HTTPS on a public address. Conduit delivers only to an
httpsURL that resolves to a public address, and does not follow redirects. Register the final URL. - Do not rely on the source IP. Conduit does not publish a fixed list of addresses that webhooks come from. Use the signature as your sender check.
- Process each event once. Delivery is at least once. Deduplicate on the event
id, so a repeated delivery changes nothing.
Control who can do what in the dashboard
Each person on your team has one role. Conduit checks the role on every change made in the dashboard.- Give each person the lowest role that does the job. Developers cannot move money, and Operators cannot create API keys.
- Use one account per person. Do not share a dashboard login. Each API key then has a named owner, and removing one person ends only that person’s access.
- Keep Admins few. Only an Admin can invite people, change roles and remove people, on the Team page.
- Remove people when they leave. Removing a person ends their dashboard access and stops the API keys they created. Invitations expire after 7 days; revoke one that is no longer needed.
Protect payout approvals
On a non-custodial wallet, Conduit can never move funds without your approval, and you hold your private keys: Conduit receives public keys only (Signing modes).- Choose the signing mode for your risk, before your customers claim their wallets. Conduit sets the mode with you, and a wallet keeps the mode it was claimed with. In passkey-required mode, a person approves each payout. In programmatic mode, your servers can approve payouts, but only a passkey admin can change the signers or the threshold, so protect those passkeys too. In programmatic unattended mode, your servers can do both, and your key management becomes your control (What each mode commits you to).
- Keep machine signing keys in your own key store. Generate each signer’s keypair in your key management system or hardware security module, and register only the public key. No Conduit endpoint takes a private key (Programmatic payout signing).
- Remove a compromised signer at once. Removal is how you contain a key. If the remaining signers cannot reach the threshold, add a replacement first, then remove the compromised signer (Operational facts).
- Send each link only to its signer. An approval link (
verificationUrl) grants access to whoever holds it, which is why read-only keys see it redacted. Conduit does not send enrollment links either: send each one to the person it names, over a channel you trust (Multi-signer wallets). - Approve only what you expect. The approval page shows the asset, the amount and the destination. Tell approvers to check all three, and to decline a payout they do not recognize. One decline stops the payout (Verify page).
Make retries safe
- Send an
idempotency-keyon every request that moves money or creates a resource. Generate a fresh UUID for each new operation, store it before you send the request, and use a new key only for a new operation. Request headers states how Conduit answers a retry with the same key. - Retry an unknown outcome with the same key. After a timeout, a network error or a
5xx, retry with the same key and the same body. A new key cannot see the first attempt, so it can create a second order or payout.
Related
Authentication
API keys, access levels, environments and request headers.
Webhooks
Signing, rotation, retries and endpoint management.
Signing modes
Who approves payouts on your non-custodial wallets.
Errors
Every error code, with what to do.