Skip to main content

Authentication

All 4pay.cc API requests must be authenticated using an API Key passed as a Bearer token in the Authorization header.

API Key​

Obtain your API key from the 4pay.cc Dashboard under Settings → API Keys.

Authorization: Bearer YOUR_API_KEY
Keep your API key secret

Never expose your API key in client-side code, public repositories, or logs. Rotate it immediately if compromised.


Example Request​

curl -X GET "https://api.4pay.cc/api/v2/organizations/YOUR_ORG_ID/wallets" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"

Organization ID​

In addition to the API key, most endpoints require your Organization ID (org_id) as a path parameter. You can find it in the Dashboard under Settings → Organization.

/api/v2/organizations/{org_id}/wallets

Headers Summary​

HeaderRequiredValue
AuthorizationYesBearer YOUR_API_KEY
Content-TypeFor POST/PATCHapplication/json
AcceptOptionalapplication/json

Error Responses​

If authentication fails, you will receive:

401 Unauthorized
{
"detail": "Invalid or missing API key"
}
403 Forbidden
{
"detail": "Insufficient permissions for this operation"
}