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.fee is your cost, not the customer's
fee is your cost, not the customer's
The percentage fee charged to you on this payment, after any promotion discount. 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.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