Authentication
All requests to Centrobill API endpoints must include an API key in the Authorization HTTP header. The key is sent as is, without a Bearer prefix. Keys are issued per merchant account by Centrobill Merchant Support.
curl -X POST https://api.centrobill.com/payment \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ ... }'Get your credentials
All credentials are issued by Centrobill Merchant Support. To request them, write to [email protected].
| Credential | Used for | Notes |
|---|---|---|
| Staging API key | Authorization header for requests to https://api-stage.centrobill.com | Works only in Staging |
| Production API key | Authorization header for requests to https://api.centrobill.com | Works only in Production |
s code | Validating the x-signature header of IPNs | See IPN validation |
Store the API keys and the s code on your server only, for example in environment variables. Never expose them in browser code or commit them to a repository.
Tokenization endpoint exception
POST /tokenize does not require an API key. Card data is posted directly from the customer's browser to the gateway, exchanged for a short-lived token, before any server-side processing occurs.
Staging vs Production keys
Staging and Production are separate environments with separate base URLs. Your API key is environment-specific. A key issued for Staging will not work against the Production endpoint and vice versa.
| Environment | Base URL |
|---|---|
| Production | https://api.centrobill.com |
| Staging | https://api-stage.centrobill.com |
Always verify you are using the correct key for the environment you are targeting. Requests sent to the wrong environment are rejected.
Rotate keys if compromised. If you suspect a key has been exposed, contact [email protected] to request a replacement immediately.
Updated 5 days ago
