Saltar al contenido principal
Every API key carries its own permissions, an optional expiry date and a record of when it was last used. You choose them in the dashboard when you create the key, and you can change the permissions later without changing the secret.
Keys created before permissions existed keep working exactly as before. They hold full access: every permission except Manage keys (apiKey:write), including permissions added in the future. The dashboard shows them as Acceso total.

Creating a key with permissions

  1. In the dashboard, go to Configuraciones › Desarrollador and click Crear llave.
  2. Name the key after the system that will use it, for example Tienda en línea or ERP.
  3. Choose when it expires: never, 7, 30 or 90 days, or one year.
  4. Turn on the permissions it needs. Search by name or by endpoint (/v1/payment, refund). The panel on the right lists every endpoint the chosen permissions open, each linked to its page in this reference.
  5. Click Crear llave and copy the key. It is shown only once.
Turning on a permission also turns on what it needs: Reembolsar pagos brings Ver pagos with it.

Who can give what

  • You can give a key only the permissions your own dashboard role has. A member who cannot see fees cannot make a key that sees fees.
  • Manage keys (apiKey:write) is given only by an owner, signed in as themselves.
  • A key that manages keys can create or rotate keys only with permissions it holds itself, and never gives Manage keys.

Permissions

The same permissions apply to the payment-acceptance endpoints (/api/one-time-payment, /api/payment-intent, /api/payment-method): a key without paymentMethod:write cannot charge a saved card there either.
Ask a key what it holds with GET /developer/v1/api-key/current. Any key may call it.

Expiry and last use

A key with an expiry date stops working at that moment and answers 401 with API_KEY_EXPIRED. It stays on the dashboard list as Vencida, so you can see what stopped and rotate it. The list also shows when each key was last used, to the minute. A key nobody has used in months is a key you can revoke.

Rotating a key without downtime

Rotating creates a new secret for the same key: same name, same permissions, same lifetime counted from the rotation. The current secret keeps working for an overlap you choose (now, 1 hour, 24 hours or 7 days, 24 hours by default), so you can deploy the new one before the old one stops.
1

Rotate

In the dashboard, open the key’s ⋯ menu and choose Rotar llave, or call POST /developer/v1/api-key/{id}/roll with a key that holds apiKey:write.
2

Deploy the new secret

Store the key from the response in your secrets manager and deploy. previous.expiresAt says until when the old secret works.
3

Let the old one expire

Nothing else to do. Once the overlap ends, the old secret answers API_KEY_EXPIRED.
A key can rotate itself, which lets an integration rotate on its own schedule. A key that was already rotated cannot be rotated again (409 API_KEY_ALREADY_ROLLED): rotate its replacement instead.

Key format

Keys created from now on start with cmp_ followed by 64 letters and digits. The dashboard shows the first eight characters and the last four, enough to tell which key a system uses. Older keys keep their format and keep working. Compago stores only a hash of each key. Nobody, including Compago, can show a key again after it was created or rotated.

Owner notifications

Every owner of the organization gets an e-mail when a key is created, rotated or revoked, saying who did it. Each of these changes is also recorded in Configuraciones › Actividad.

Errors