CoinfiraEnergy API
API v1 API Reference

API keys and IP allowlists

#Create credentials

API credentials are created in the Coinfira dashboard under Developer API. A credential consists of:

  • API key: identifies the credential and is sent in every request;
  • API secret: signs requests and webhooks and is displayed only once;
  • optional IP allowlist: limits where requests may originate;
  • status and usage metadata.

Coinfira supports up to three active credentials per merchant. This permits key rotation without downtime.

#Multiple keys

Each key has its own secret. Coinfira looks up the correct secret by X-CF-API-Key, so multiple active credentials do not cause ambiguity.

Orders remember the credential that created them. Their terminal webhooks are signed with that credential's secret and identify it in X-CF-API-Key.

#IP allowlist

The allowlist accepts IPv4, IPv6, and CIDR ranges. Examples:

203.0.113.10/32
198.51.100.0/24
2001:db8:1234::/48

An empty allowlist means requests are accepted from any IP. Only add stable outbound IPs belonging to the merchant's backend or trusted gateway.

#Rotation procedure

  1. Create a new credential and store its secret.
  2. Add the new key to the merchant backend.
  3. Verify a signed request with the new key.
  4. Keep the old secret available for verifying webhooks from older orders.
  5. Switch new requests to the new key.
  6. Disable the old credential in the dashboard.

Disabling a key blocks new API requests immediately. Coinfira retains the encrypted secret to finish signing webhooks for orders created before rotation.

#Compromise response

If a secret may be exposed, create a replacement, switch traffic, and disable the affected credential immediately. Review source control, build logs, proxy logs, and monitoring systems for accidental secret storage.