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.GET /developer/v1/payment returns every payment your organization has taken, newest first, whatever channel it came through: a payment link, a one-time payment, a saved card, a terminal, or a subscription’s recurring charge.
The payment object
Fields worth explaining
operationCode is the reference your customers quote
operationCode is the reference your customers quote
id is the API’s identifier. operationCode is the number printed on receipts and shown in the dashboard, and it is what a customer or your support team will read out. Filter on it with ?operationCode=61695145722, an exact match rather than a partial one.terms and paidTerms describe an installment plan
terms and paidTerms describe an installment plan
terms is how many installments the customer agreed to, 1 for a single payment. paidTerms is how many have settled to you.On a plan where you are paid per installment, paidTerms climbs as each one settles. On every other plan you are paid up front, so a settled payment reads as fully paid and an unsettled one as nothing paid.amount is the sale, chargedAmount is what the card was charged
amount is the sale, chargedAmount is what the card was charged
amount is always the sale. When the customer left a tip on a terminal, it is reported in tipAmount and was charged together with the sale in one card charge. chargedAmount is what the card was charged in total, amount + tipAmount, and equals amount when there is no tip, so it is the figure to reconcile against your bank statements. tipPercentage is the percentage of the sale the customer picked (for example 15), and null when the tip was typed as a fixed amount or there is none.Tips only come from card-present terminal charges: a sale typed on a terminal of a merchant that turned them on in the dashboard, or a payment intent that carries one. On an installment (MSI) payment the tip is split into the installments together with the sale: amount + tipAmount is divided over terms. Payment links, one-time payments, saved cards and subscriptions always report tipAmount: 0. A refund or cancellation reverses the tip together with the sale; the tip is never refunded on its own.card.fingerprint recognizes a returning card
card.fingerprint recognizes a returning card
card.fingerprint is the same for the same card in every payment and saved card of your organization, whether it paid online or at a terminal. Compare fingerprints to spot a card that comes back: several declined attempts with one card, a customer who returns under another name, a card already saved. You never handle the card number.It is anonymous: it cannot be turned back into the card, and the same card has a different fingerprint in another organization, so it is only meaningful inside yours. A phone wallet (Apple Pay, Google Pay) pays with a number of its own, so a card paid through a wallet has a different fingerprint than the plastic card. It is null for the rare card captured without a vault token.fee is your cost, not the customer's
fee is your cost, not the customer's
The gross percentage rate of this payment, before any promotion discount: when a promotion covers part of the fee on the sale, your actual cost is lower. The tip always pays the full rate. The promotion’s own economics, meaning what the funding organization absorbed, are not part of this response.
The source ids tell you where the payment came from
The source ids tell you where the payment came from
Usually exactly one of
paymentLinkId, oneTimePaymentId, paymentMethodId and paymentIntentId is set, and subscriptionId is set as well when the payment is a recurring charge. Each is filterable.bankAccountId is where the money is deposited
bankAccountId is where the money is deposited
The bank account this payment is deposited in, recorded when the payment is approved. Match it against
GET /developer/v1/bank-account to show the account’s name.It is null on a payment that was not approved, and on payments taken before your business had more than one account. Those settle to your default account.allocations are the parts of a payment deposited in several accounts
allocations are the parts of a payment deposited in several accounts
A payment shared out between several of your bank accounts, by your percentage rule or by the
allocations you sent when you created the charge, lists each part here, in order: its bankAccountId, its amount and whether it paid its share of the fee (absorbsFee). bankAccountId is then the account of the largest part. The list is empty when the payment went whole to one account.Compare it with what you asked for: when less was captured than the parts add up to, or an account stopped being verified before the payment was approved, the payment is deposited according to your deposit rule instead, and this list says so.Statuses
These are the statuses a merchant sees, and the only ones this API returns. Compago tracks finer internal states while a payment is in flight; they are a detail of how settlement works and are collapsed into the list above before the response leaves the API. A payment that is still settling reports
CONFIRMED, which is what the dashboard shows you.Reconciliation
The common job is “everything that happened yesterday”. Bound the window, then follow the cursor.Filters
Related views
Two endpoints return the same payment object, already scoped:GET /developer/v1/subscription/{id}/paymentfor one subscription’s billing historyGET /developer/v1/payment-method/{id}/paymentfor everything charged to one saved card