Authentication
Authenticate Ivorypay Business API requests with the correct TEST or LIVE secret key and keep merchant credentials on your server.
Use an Ivorypay Business (IVB) secret API key for server-to-server Merchant API requests at https://api.ivorypay.io/api/v1. Get it from the IVB dashboard. Each endpoint states its authentication requirements; the public transaction-verification route is an exception.
Building a customer Buy crypto or Sell crypto flow? Check which product to use first. On/Off Ramp uses its own dashboard, API host and credentials; an IVB key does not grant access to that API.
API Keys
Ivorypay issues two keys per environment:
Secret Key
sk_
Server-side API calls. Never expose this publicly.
Public Key
pk_
Client-side, read-only contexts.
Use the Secret Key for authenticated Merchant API requests. A public key is not a replacement for a secret key on these routes.
Environments
Each key is scoped to a single environment at generation time. There is no environment header to pass: the stored key configuration determines which environment the request runs in. Both TEST and LIVE Merchant keys start with sk_; the prefix alone does not identify the environment. Merchant and On/Off Ramp keys are separate credentials.
TEST
sk_xxxx...
Sandbox. No real money moves.
LIVE
sk_xxxx...
Production. Real transactions.
Always use your TEST key during development and integration testing.
Generating API Keys
If you do not have an account, sign up for IVB and verify your email first.
API keys are generated from the Ivorypay Dashboard:
Generating new keys immediately invalidates the previous key pair for that environment. Store your keys securely: they are only shown once.
Sending the API Key
Pass your secret key directly in the Authorization header: no Bearer prefix:
Example
What Happens on Each Request
Your API key is your secure identifier: it tells Ivorypay who you are, which business you belong to, and which environment you're operating in. Every request to the Merchant API must carry it. Requests without a valid key will be rejected immediately.
Security Best Practices
Never expose your secret key in frontend code, mobile apps, or public repositories.
Store keys in environment variables (e.g.
process.env.IVORYPAY_SECRET_KEY).Rotate your keys immediately if you suspect a compromise: generate a new pair from the Dashboard.
Use TEST keys in staging and CI environments; never use LIVE keys outside production.
Restrict access to the server or service that holds the key using firewall rules where possible.
Configure an IP allow-list for your integration servers. It's optional for most endpoints, but mandatory before you can use LIVE crypto or fiat payouts.
Error Responses
401
Unauthorized
Authorization header is missing
401
Invalid key
Key does not exist or has been rotated
401
Account not found
The user tied to the key was deleted
401
Your account is inactive. Please contact support
Business or user account suspended
Last updated