Saltar al contenido principal

Overview

Five endpoints describe who you are on Compago.

Your organization

These examples call the production host. While you build, replace https://api-harmony.compago.com with https://demo-api-harmony.compago.com and use a key from the Demo dashboard. See Environments.
This is the cheapest way to confirm a key works and to discover which organization it is bound to.
Your bank account numbers and settlement details are not part of this response and are not readable through this API at all. Bank accounts lists your accounts by name only.

Members

Roles are owner, admin and member, oldest member first. The projection is deliberately narrow: name, email and role, and nothing else about the person.

Bank accounts

A business can receive its sales in more than one bank account, for example one per branch. This endpoint lists the accounts a charge can be deposited in, so your integration can choose one when it creates a payment.
  • data holds your verified accounts, in the order you gave them in the dashboard. An account that is still being verified, or that was rejected, cannot receive money and is not listed. The list is not paginated: a business has at most ten accounts.
  • isDefault marks the first account of your list.
  • routingMode is how your sales are shared between your accounts when a charge names none:
    • AUTOMATIC: each sale goes to the first account that still has room in its monthly amount, and the last account takes the rest.
    • MANUAL: each sale goes to your default account.
    • SPLIT: each sale is shared out between your accounts by the percentage the owner gave each one, and each part pays its share of the fee.
To choose the account yourself, send its id as bankAccountId when you create a one-time payment, a payment intent or a saved-card checkout, and on every charge to a saved card. The field is optional: a charge that names no account follows routingMode. To split one charge between several accounts yourself, send allocations instead (see Splitting a payment between accounts).
An account is its id and the name you gave it. Its number, its holder and its bank are never returned. Accounts are added, ordered and removed by the owner in the dashboard, at Configuraciones → Organización → Cuentas bancarias, and each of those changes is confirmed with a code sent to the owner’s email. This API cannot change where you are paid.

Salespeople

Salespeople are the operators who sign in to your card terminals. Use this list to attribute sales to a person or to reconcile terminal activity against your staff roster.
Credentials are never returned. The password hash and the device token that signs an operator out everywhere are not even read from the database by this API.

Promotions

A promotion lets one organization absorb part of the fee on another’s payments, which is how a manufacturer funds months-without-interest on a retailer’s sales. The list returns both directions, and ownedByOrganization tells them apart:
  • true: your organization created and funds this promotion. The take is a cost to you.
  • false: your organization was invited and benefits. The discount reduces your fee.