How does API authentication work?
You sign your requests with keys only you hold. At a high level it works like this:
- Generate an RSA key pair and send us your public key. Keep the private key on your own systems.
- We give you your merchant code and API key. You can see them, masked, in the developer portal under Developers → API keys, for the environment you're signed in to.
- Your server requests an access token, signing that request with your private key. The response includes an access token, a refresh token and a secret key.
- On every API call, send your API key and access token, a timestamp, a nonce (a new random value each time) and a signature made with the secret key.
The exact headers, the string to sign and code samples are in the authentication guide.