Compago provides a full set of endpoints for managing your saved payment methods and their associated payments. You can list all payment methods, retrieve details for a specific one, revoke cards you no longer need, and view the payment history for any saved card.Documentation Index
Fetch the complete documentation index at: https://docs.compago.com/llms.txt
Use this file to discover all available pages before exploring further.
List Payment Methods
Retrieve a paginated list of all payment methods in your organization.Endpoint
GET /payment-method
Query Parameters
Filter by payment method status:
PENDING, ACTIVE, EXPIRED, or REVOKED.Page number for pagination.
Number of items per page (max 500).
Response
Code Examples
Get Payment Method Details
Retrieve the full details of a specific payment method.Endpoint
GET /payment-method/{id}
Path Parameters
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
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
The unique identifier of the payment method (UUID).
Query Parameters
Filter by payment status:
NOT_INITIALIZED, PENDING, CONFIRMED, CANCELLED, or REFUNDED.Page number for pagination.
Number of items per page (max 500).
Response
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
The unique identifier of the payment method (UUID).
The unique identifier of the payment (UUID).
Response
Code Examples
Error Responses
| Status Code | Error | Solution |
|---|---|---|
| 400 | Cannot revoke payment method (not ACTIVE) | Only ACTIVE payment methods can be revoked. |
| 401 | Unauthorized | Check your API key is valid and included in headers. |
| 404 | Payment method not found | Verify the payment method ID is correct. |
| 404 | Payment not found | Verify the payment ID is correct. |
Next Steps
Charge a Saved Card
Charge a customer’s saved card on demand.
Process Refunds
Issue full refunds for charges.