List Payment Methods
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.Endpoint
GET /payment-method
Query Parameters
string
Filter by payment method status:
PENDING, ACTIVE, EXPIRED, or REVOKED.integer
default:"1"
Page number for pagination.
integer
default:"100"
Number of items per page (max 500).
Response
This is not the payment
externalId. They are two different fields, one screen apart in these docs:- The payment method
externalId, sent toPOST /api/payment-methodand documented here, is your reference for the saved card or customer. - The payment
externalId, sent toPOST /api/payment-method/{id}/paymentand documented in Charge a Saved Card and Hold Funds, is your idempotency key for one charge or hold.
Code Examples
Get Payment Method Details
Retrieve the full details of a specific payment method.Endpoint
GET /payment-method/{id}
Path Parameters
string
required
The unique identifier of the payment method (UUID).
Response
Code Examples
Revoke a Payment Method
Permanently revoke a saved payment method. Once revoked, the card can no longer be charged.Endpoint
DELETE /payment-method/{id}
Path Parameters
string
required
The unique identifier of the payment method to revoke (UUID).
Response
Code Examples
List Payments for a Payment Method
Retrieve a paginated list of all payments (charges) made against a specific payment method.Endpoint
GET /payment-method/{id}/payment
Path Parameters
string
required
The unique identifier of the payment method (UUID).
Query Parameters
string
Filter by payment status:
NOT_INITIALIZED, PENDING, CONFIRMED, CANCELLED, REFUNDED, HELD, HOLD_RELEASED, or HOLD_EXPIRED. Filtering by HELD is the quickest way to list the holds that are still live on a card.integer
default:"1"
Page number for pagination.
integer
default:"100"
Number of items per page (max 500).
Response
externalId (null when you sent none), and the hold fields: heldAmount, heldAt, capturedAt, holdReleasedAt, holdExpiresAt, holdExpired, and holdDaysRemaining. They are null on regular charges (holdExpired is false) and populated on holds:
amount is the amount that was captured and heldAmount stays at the amount that was originally held, so a payment showing "amount": 200 with "heldAmount": 1200 was a 200 MXN. See Capturing a Hold.
The heldAt above is 2025-03-04 10:20 in Mexico City, so the placement day is Tuesday 4 March. Six calendar days later is Monday 10 March, and the window closes at 23:00 that day, which is 2025-03-11T05:00:00.000Z in UTC. holdExpiresAt is always 23:00 America/Mexico_City, never the clock time at which you placed the hold. holdDaysRemaining is 7 here because the hold was placed before 23:00 on its own placement day, so that day still counts.
See Hold Funds for what each field means and how to tell whether a hold is still capturable.
Code Examples
Get Payment Details
Retrieve the details of a specific payment made against a payment method.Endpoint
GET /payment-method/{id}/payment/{paymentId}
Path Parameters
string
required
The unique identifier of the payment method (UUID).
string
required
The unique identifier of the payment (UUID).
Response
externalId and hold fields as the list endpoint (heldAmount, heldAt, capturedAt, holdReleasedAt, holdExpiresAt, holdExpired, holdDaysRemaining), so it is the endpoint to poll when you need to know whether a hold is still live, and the one to read to see how much of a hold was actually captured.
Code Examples
Error Responses
Next Steps
Charge a Saved Card
Charge a customer’s saved card on demand.
Process Refunds
Issue full refunds for charges.