Skip to main content
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.

List Payment Methods

Retrieve a paginated list of all payment methods in your organization.

Endpoint

API reference: 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

Code Examples

Get Payment Method Details

Retrieve the full details of a specific payment method.

Endpoint

API reference: 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

API reference: DELETE /payment-method/{id}

Path Parameters

string
required
The unique identifier of the payment method to revoke (UUID).
This action is permanent. Once a payment method is revoked, it cannot be reactivated. You will need to create a new payment method and have the customer save their card again.

Response

Code Examples

List Payments for a Payment Method

Retrieve a paginated list of all payments (charges) made against a specific payment method.

Endpoint

API reference: 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, or REFUNDED.
integer
default:"1"
Page number for pagination.
integer
default:"100"
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

API reference: 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

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.