Saltar al contenido principal
All API requests require authentication using an API key. This key is unique to each merchant and must be included in every request to ensure secure and authorized access to our services.

What is an API Key?

An API key is a secret token that identifies your application or system when making requests to Compago’s API. It ensures that only authorized systems can initiate transactions, retrieve data, or trigger any backend logic. Keep your API key secure and never expose it in public client-side code.

How to Generate an API Key

Keys are created in the dashboard of the environment they will call: To create an API key:
  1. Sign in to the dashboard of the environment you want to call.
  2. Navigate to Configuraciones → Desarrollador.
  3. Click Crear llave.
  4. Enter a name for the key (e.g., Tienda en línea, ERP), choose when it expires, and turn on only the permissions the integration needs.
  5. Click Crear llave and copy the key immediately (it will only be visible once).
From the same section you can change a key’s permissions, rotate it without downtime, turn it off, or revoke it. See Key permissions, expiry and rotation.
Desarrollador is the dashboard section for keys, not a development account. A key created in app.compago.com is a production key. To build and test without real payments, ask your Compago contact for a Demo account and create the key in demo-app.compago.com. See Environments.

What a key is allowed to do

A key is bound to the organization it was created in and can only ever reach that organization’s data. It cannot be repointed, and an id from another organization returns 404. Within that organization, a key reaches only what its permissions allow: a key made for reconciliation can read payouts and fees and nothing else. A request outside its permissions answers 403 with INSUFFICIENT_SCOPE. Keys created before permissions existed hold full access, so existing integrations keep working. See Key permissions, expiry and rotation.
A leaked key can do everything its permissions allow, which may include reading customer names, emails and phone numbers. Give each integration its own key with only the permissions it needs, set an expiry where you can, and rotate keys you no longer recognise.

Base URLs

Keys are per environment. A demo key will not authenticate against production. The examples in these docs use the production host. While you build, call the Demo host with a Demo key.
The previous hosts, demo.api.harmony.compago.com and api.harmony.compago.com, stop working on December 15, 2026. If your integration still calls them, switch to the hosts above before then. Only the host changes: paths and API keys stay the same. See Moving to the new API hosts.

Using the API Key in Requests

Every request to a protected endpoint must include your API key in the request headers.

Header Format

Here’s an example using curl:
The same header authenticates the Developer API under /api/developer/v1:
That request is the quickest way to confirm a key works: it returns the organization the key belongs to. If the API key is missing or invalid, you will receive a 401 Unauthorized response. On the Developer API its code says why: UNAUTHORIZED (unknown key), API_KEY_EXPIRED, API_KEY_DISABLED or API_KEY_REVOKED.
🔒 Always keep your API key secret. Rotate it regularly and never commit it to version control. Keys created from now on start with cmp_, which secret scanners can match.