Skip to main content

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

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 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.
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.
A payment created with holdFunds reserves money without capturing it. heldAmount is what the bank authorized and amount is what actually moved, so they differ after a partial capture. holdExpiresAt is when the authorization lapses and is reported even after the hold ends, because it stays a fact about the payment. holdExpired and holdDaysRemaining only answer while the payment is still HELD.See Hold and capture.
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.
Bound the window rather than crawling the whole history each night. It is faster, it costs a fraction of your rate-limit budget, and it gives a stable result: a completed day does not gain new rows underneath you.

Filters

Two endpoints return the same payment object, already scoped:
  • GET /developer/v1/subscription/{id}/payment for one subscription’s billing history
  • GET /developer/v1/payment-method/{id}/payment for everything charged to one saved card

What this endpoint does not include

Payments funded by one of your promotions but taken by another merchant are not listed here. “Your payments” means the ones you took. A promotion-funded payment belongs to another merchant and carries that merchant’s customer details.