Saltar al contenido principal

Overview

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.
A payout is one SPEI transfer Compago sent to one of your bank accounts. It pays one or more settlements: a day’s sales usually, or several days when they were held back until they reached the minimum transfer amount. GET /developer/v1/payout lists them, newest first, and GET /developer/v1/payout/{id}/line itemizes one, so you can match each deposit on your bank statement to the sales it paid.

The payout object

amount is what the settlements in this payout owe you. feeAmount is what Compago charged for sending the money early, when you asked for it from the dashboard before your balance reached the minimum transfer amount; it is 0 on every transfer sent on schedule. netAmount is amount - feeAmount: the figure that lands in your bank account.
The tracking key your bank statement shows for the deposit, and the one Banxico’s CEP is looked up with. It is null until the bank assigns it, and on a transfer Compago settled by hand.
Match it against GET /developer/v1/bank-account to show the account’s name. It is null on payouts from before your business could have more than one account. The account number, its holder and its bank are never returned.
When the transfer happened, by the bank’s clock when it gave one. Only set on PAID.
On FAILED and RETURNED, the reason and SPEI code the bank gave, for example a closed account. null on every other status.

Statuses

A transfer that failed is not edited into a success: the retry is a new payout with its own id. Filtering by paymentId returns both, so you can see the whole history of a sale’s deposit.

Lines

GET /developer/v1/payout/{id}/line returns what a payout is made of, oldest first, paginated like every other list. Every line has the same fields, and for every line net = amount - refundedAmount - fee - tax - promotionShare.
The net of every line, over every page, adds up to the payout’s netAmount to the centavo. paymentId links a PAYMENT or REFUND line to the payment; the other lines have none.
A payment’s own status and installment plan are not part of a line: read them from GET /developer/v1/payment/{id}.

Reconciliation

The common job is matching yesterday’s deposits to your sales.
To find when one sale was deposited, filter by it:

Filters

What this endpoint does not include

  • Money not sent yet. Sales that are settled but held back until they reach the minimum transfer amount have no payout until they are sent. The dashboard’s Liquidaciones shows how close they are.
  • Bank account numbers and the CEP. The CEP names your full account number, so it is not returned; look it up on Banxico’s site with the trackingKey.