Home/Docs

Authentication

Send your API key on every request:

Authorization: Bearer {{API_KEY}}
Content-Type: application/json

Call Link App from your server only. Do not put the API key in a mobile app or website.

Getting an API key

Request a test key and a live key from Chapa when you onboard. Each key is tied to your merchant account.

Test vs live

Both use the same base URL:

https://api.chapa.link
KeyUse for
Test keyBuilding and testing your integration
Live keyReal customers and real money

Data from test does not appear when you switch to live.

List endpoints (GET /card/payments, GET /card/payouts) include mode on each item (live or test) so records always reflect the key you used.

What your key can access

Common errors

StatusMessageWhat it usually means
401UnauthorizedMissing or wrong API key
401Token expiredKey has expired — request a new one from Chapa
403ForbiddenKey is inactive or not set up for the gift card API
403API key must be linked to a business_idToken is missing a business_id — contact Chapa
{
  "status": "error",
  "message": "Unauthorized",
  "error": "Unauthorized"
}
{
  "status": "error",
  "message": "Forbidden",
  "error": "API token cannot create gift cards"
}
{
  "status": "error",
  "message": "API key must be linked to a business_id. Set user_api_tokens.business_id for this token",
  "error": "Set user_api_tokens.business_id for this token"
}

These errors apply to every Link App endpoint before your request is processed.

Next steps