Skip to main content

API Key Authentication

All Partner API endpoints (except hosted onboarding pages) require authentication via API key headers.

Headers

Include both headers in every request:
HeaderDescription
X-Partner-Client-IdYour client ID (UUID)
X-Partner-Client-SecretYour client secret

Example

curl -X GET https://api.acountpay.com/v1/partner/merchants \
  -H "X-Partner-Client-Id: a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
  -H "X-Partner-Client-Secret: your-64-char-hex-secret"

Generating Credentials

  1. Log in to the Partner Dashboard
  2. Navigate to API Credentials
  3. Click Generate and give the credential a name
  4. Copy the Client ID and Client Secret immediately — the secret is only shown once
Store your client secret securely. If lost, you can rotate it from the Partner Dashboard (which generates a new secret and invalidates the old one).

Code Examples

const response = await fetch('https://api.acountpay.com/v1/partner/merchants', {
  headers: {
    'X-Partner-Client-Id': process.env.ACOUNTPAY_CLIENT_ID,
    'X-Partner-Client-Secret': process.env.ACOUNTPAY_CLIENT_SECRET,
    'Content-Type': 'application/json',
  },
});

Credential Management

EndpointMethodDescription
/partner/credentialsGETList all credentials
/partner/credentialsPOSTGenerate new credential
/partner/credentials/{id}/rotatePOSTRotate secret (invalidates old)
/partner/credentials/{id}DELETERevoke credential

Best Practices

  • Use separate credentials for sandbox and production
  • Store secrets in environment variables, never in code
  • Rotate secrets periodically
  • Revoke unused credentials