Skip to content

Authentication

Every API request is authenticated with a Bearer API key in the Authorization header. There is no separate login step and no OAuth flow.

Authorization: Bearer DEV-xxxxxxxxxxxxxxxxxxxxxxxx

Each merchant has two key pairs — one for the sandbox, one for production:

Credential Prefix Secret? Role
Sandbox API key DEV- Semi — sent as a Bearer token Authenticates sandbox requests.
Sandbox private key devsk- Yes — never sent Signs sandbox requests & callbacks.
Production API key PROD- Semi — sent as a Bearer token Authenticates production requests.
Production private key prodsk- Yes — never sent Signs production requests & callbacks.

Your merchant code (e.g. M0001) is not secret — it is part of the request signature and identifies your account.

There is a single base URL: https://payment.incognito.asia/api/v1. You do not switch hosts between sandbox and production. Instead:

  • Authenticate with your DEV- key → the request runs in the sandbox. Transactions get a DEV- reference prefix and can only be settled with simulate-pay.
  • Authenticate with your PROD- key → the request runs in production against the real BCA account.
Terminal window
curl -s https://payment.incognito.asia/api/v1/payment-channels \
-H "Authorization: Bearer $INCOGNITO_PAYMENTS_API_KEY"
Situation HTTP Body
No/malformed Authorization header 401 {"success": false, "message": "Invalid or inactive API key."}
Unknown key, or merchant deactivated 401 {"success": false, "message": "Invalid or inactive API key."}
Sandbox-only action with a PROD- key 403 {"success": false, "message": "Use your sandbox API key to simulate a payment."}

Keys can be regenerated from the merchant dashboard, one environment at a time or both at once. Regenerating invalidates the old keys immediately, so update your server’s environment variables in the same deploy.