Atomic logo

Mutual TLS for API Requests

Mutual TLS (mTLS) adds certificate-based client authentication to the requests your servers make to Atomic's API. With standard TLS, your client verifies Atomic's server certificate. With mTLS, Atomic also verifies a client certificate that your server presents during the TLS handshake, so a connection is only accepted when it carries a certificate Atomic has been configured to trust.

mTLS is optional. It is an additional layer on top of your API key and secret, not a replacement. Requests to the mTLS endpoint still need the same authentication headers as requests to the standard endpoint.

mTLS is enabled per customer and per environment on request. Contact your Atomic implementation representative to get started. Sandbox is typically ready within one to two business days of receiving your certificate material.

Atomic terminates mTLS at a dedicated load balancer in front of the same API that serves the standard endpoints. The load balancer validates that your client certificate chains to a certificate authority (CA) in a trust store configured for your account, then forwards the request to the API. Your API key and secret are checked as usual after that.

Because mTLS is enforced at the edge, it uses a different hostname per environment:

EnvironmentStandard API hostmTLS API host
Sandboxsandbox-api.atomicfi.comapi2.atmcsbx.com
Productionapi.atomicfi.comapi2.atomicfi.com

Paths, request bodies, and responses are identical between the two hosts. Only the hostname and the client certificate differ. The server certificate on the mTLS hosts is issued by a public CA (Amazon Trust Services), so no additional CA needs to be installed on your side to trust Atomic.

The sandbox mTLS host is under the atmcsbx.com domain rather than atomicfi.com. If your network restricts outbound traffic by hostname, add both domains to your allowlist.

The requirements below are what Atomic enforces plus Atomic's recommendations.

RequirementValue
FormatX.509 v3, PEM encoded
Key algorithm ECDSA P-384 recommended. ECDSA P-256 and P-521, and RSA 2048 through 8192, are also accepted.
Signature algorithmSHA-256 or stronger
Extended Key UsageMust include clientAuth (TLS Web Client Authentication)
Subject Use a distinct Common Name (CN) per environment, in a domain you control, for example atomic-client-sandbox.example.com and atomic-client-prod.example.com. Other subject fields (O, OU, L, ST, C) may follow your own policy. Share the CN values with Atomic so they can be recorded for your account.
Subject Alternative Names None required. A dNSName matching the CN is fine if your CA adds one.
Chain Must chain to a CA Atomic trusts for your account: either Atomic's issuing CA or your organization's CA. Self-signed leaf certificates are not accepted.
Validity One year when Atomic issues the certificate. Set by your CA policy otherwise.
TLS versionTLS 1.2 minimum, TLS 1.3 preferred
Public CAs are phasing out certificates with the clientAuth key usage, so a certificate bought from a commercial CA is unlikely to work for mTLS. Use one of the two issuance options below instead.

There are two ways to obtain a client certificate Atomic will trust. Either way, your private key is generated on your side and never leaves your systems.

This is the simplest option and the one Atomic recommends. You generate a key pair and a certificate signing request (CSR) per environment and send Atomic the CSRs. Atomic signs them with its private CA and returns the signed certificates along with the CA chain. Nothing needs to be added to Atomic's trust store because the certificates already chain to a CA Atomic trusts.

  1. Generate a private key and CSR for each environment.
  2. Send the CSRs (PEM, public material only) to your Atomic representative. Never send the private key.
  3. Atomic returns the signed leaf certificate plus the issuing and root CA certificates.
  4. Configure your HTTP client with the leaf certificate and your private key.
Generate a key and CSR with OpenSSL
# ECDSA P-384 private key (keep this on your side)
openssl ecparam -name secp384r1 -genkey -noout \
  -out atomic-client-sandbox.key

# CSR to send to Atomic for signing
openssl req -new -key atomic-client-sandbox.key \
  -subj "/CN=atomic-client-sandbox.example.com/O=Example Bank" \
  -out atomic-client-sandbox.csr

# Repeat with a distinct CN for production, e.g.
# /CN=atomic-client-prod.example.com

If your organization runs its own PKI, it can issue the client certificate directly. Send Atomic the public CA chain (root and any intermediates) for each environment, and Atomic adds that chain to the trust store for your account. Any leaf certificate your CA issues under that chain, with the clientAuth key usage, is then accepted.

Tell Atomic the CN values you plan to use so they can be documented alongside your account. Send only public material: the CA certificates and, optionally, the leaf certificate. Never send a private key.

Configure your HTTP client or egress gateway to present the client certificate and private key on connections to the mTLS host, and include your API key and secret as you would on the standard host. Use a separate certificate for sandbox and production and keep the two configurations isolated.

Create an access token over mTLS
curl https://api2.atmcsbx.com/access-token \
  --cert atomic-client-sandbox.pem \
  --key atomic-client-sandbox.key \
  -H "x-api-key: $ATOMIC_API_KEY" \
  -H "x-api-secret: $ATOMIC_API_SECRET" \
  -H "Content-Type: application/json" \
  -d '{ "identifier": "YOUR_USER_IDENTIFIER" }'

To confirm the setup, make a request with the certificate and expect a normal API response. Then make the same request without a certificate and confirm the TLS handshake is rejected. A handshake failure means the certificate was not presented, has expired, or does not chain to a trusted CA. An HTTP 401 after a successful handshake means the API key or secret is wrong.

Track the expiry of your client certificates and begin renewal at least 30 days before they expire. What renewal involves depends on how the certificate was issued:

  • Atomic-signed certificates: generate a new CSR (reusing or replacing your key, your choice) and send it to Atomic. Atomic returns a new signed certificate. Swap it in on your side; no other coordination is needed because the CA chain is unchanged.
  • Certificates from your own CA: renew the leaf certificate as usual. Nothing changes on Atomic's side as long as it still chains to the CA Atomic trusts. If your root or intermediate CA changes, send Atomic the new chain at least 30 days before cutover so both chains can be trusted during the transition.

If you suspect a private key has been compromised, revoke the certificate at your CA where applicable and contact Atomic immediately so trust for it can be removed.

  • PayLink endpoints that route through Atomic's PCI Card Data Environment do not currently support mTLS. Direct deposit and other non-PCI endpoints do.
  • mTLS does not restrict which source IP addresses can call the API. It authenticates the certificate, not the network.
  • mTLS does not remove the need for API credentials. Both layers are always in effect on the mTLS hosts.