Skip to main content
The Credibill API uses API keys to authenticate requests. You can view and manage your API keys in the Developer Dashboard.

API Keys

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.
Key TypePrefixDescription
Secret Keysk_Used for server-side requests. Has full access to your account. Keep secret.
Publishable Keypk_Used in client-side code (e.g., React, iOS) to tokenize payment details. Safe to expose.

Authenticating Requests

Authentication to the API is performed via HTTP Basic Auth. Provide your API key as the basic auth username value. You do not need to provide a password. Alternatively, you can authenticate via the Authorization header using the Bearer scheme.
Authorization: Bearer sk_test_51...

Example Request

curl https://api.credibill.tech/v1/customers \
  -H "Authorization: Bearer sk_test_..." \
  -d email="[email protected]"

Error Handling

If the API key is missing, malformed, or invalid, the API will return a 401 Unauthorized response.
{
  "error": {
    "code": "unauthorized",
    "message": "Invalid API Key provided."
  }
}