Skip to main content
You can refund charges made against saved payment methods. Refunds are always for the full charge amount and are processed through Compago’s infrastructure. The funds are returned to the customer’s original payment method.

Endpoint

API reference: POST /payment-method/{id}/payment/{paymentId}/refund

Authentication

Include your API key in the request headers:

Path Parameters

string
required
The unique identifier of the payment method (UUID).
string
required
The unique identifier of the payment to refund (UUID).

Request Body

Response

Code Examples

The entire original charge amount will be refunded.

Refund Rules

Only CONFIRMED payments can be refunded. Attempting to refund a payment with any other status (NOT_INITIALIZED, PENDING, CANCELLED, REFUNDED) will result in a 400 error.
Refunds are permanent. Once a refund is processed, it cannot be reversed. The payment status changes to REFUNDED.

Error Handling

Best Practices

Always check that the payment status is CONFIRMED before attempting a refund to avoid unnecessary API errors.
Always include a reason field when processing refunds. This helps with accounting, auditing, and customer service.
Protect against duplicate refund requests by checking if the payment has already been refunded before making the API call.
Refund processing times depend on the customer’s bank. Let customers know that while the refund is processed immediately on Compago’s side, it may take a few business days to appear on their statement.

Next Steps

Manage Payment Methods

List, retrieve, and revoke saved payment methods.

Payment Methods Overview

Review payment method statuses, use cases, and how the feature works.