Saltar al contenido principal
GET
Quote a one-time payment refund

Autorizaciones

x-api-key
string
header
requerido

Parámetros de ruta

id
string<uuid>
requerido

The unique identifier of the one-time payment

Respuesta

The refund quote

What refunding this sale now would cost the business, and whether it would be accepted. Read only: nothing is reserved, so the answer can change if other sales settle or are refunded before you call the refund endpoint.

enabled
boolean
requerido

Whether Compago keeps its fee on this business's refunds. When false the fee fields are 0 and the refund is never refused for the fee.

Ejemplo:

true

refundAmount
number<decimal>
requerido

What would go back to the customer: the full charge.

Ejemplo:

100

saleTake
number<decimal> | null
requerido

What the sale was going to deposit before the refund. Always null through an API key: a net amount is shown only in the dashboard, to users who can see fees.

Ejemplo:

null

fee
number<decimal>
requerido

The fee Compago would keep, before IVA.

Ejemplo:

3

iva
number<decimal>
requerido

IVA on the fee.

Ejemplo:

0.48

feeTotal
number<decimal>
requerido

fee + iva.

Ejemplo:

3.48

pendingSettlement
number<decimal> | null
requerido

What the business has pending to settle from its other sales right now. Always null through an API key: it is shown only in the dashboard, to users who can see settlements.

Ejemplo:

null

pendingAfter
number<decimal> | null
requerido

What would remain pending to settle after deducting the fee. Always null through an API key: it is shown only in the dashboard, to users who can see settlements.

Ejemplo:

null

balance
number<decimal> | null
requerido

The business's outstanding balance with Compago: 0, or negative for what it owes. Always null through an API key: it is shown only in the dashboard, to users who can see settlements.

Ejemplo:

null

allowance
number<decimal> | null
requerido

The refund allowance Compago granted the business: the most it may owe. 0 when it has none. Always null through an API key: it is shown only in the dashboard, to users who can see settlements.

Ejemplo:

null

allowanceAvailable
number<decimal> | null
requerido

The part of the allowance not yet used. Always null through an API key: it is shown only in the dashboard, to users who can see settlements.

Ejemplo:

null

allowed
boolean
requerido

Whether the refund would be accepted. When false, the refund endpoint answers 409 REFUND_FEE_NOT_COVERED.

Ejemplo:

true

missing
number<decimal>
requerido

How much of deducted exceeds what can cover it. 0 when allowed is true.

Ejemplo:

0

kind
enum<string>
requerido

SAME_DAY: the sale was not settled yet, so only the fee is deducted from the business's pending settlement. LATE: the sale was already deposited, so the whole refund is deducted from its next settlements. Through an API key a refund is always same-day, so the quote answers SAME_DAY for any sale the API can still refund.

Opciones disponibles:
SAME_DAY,
LATE
Ejemplo:

"SAME_DAY"

deducted
number<decimal>
requerido

What the refund takes out of the business's next settlements: feeTotal for a SAME_DAY refund (0 when no fee is kept), the whole refundAmount for a LATE one. It is what the refund is refused for when nothing covers it.

Ejemplo:

3.48

chargedFrom
enum<string> | null
requerido

Where the fee would come from, as in the refund's response. Null when no fee would be kept or the refund would be refused.

Opciones disponibles:
PENDING_SETTLEMENT,
REFUND_ALLOWANCE,
null
balanceAfter
number<decimal> | null
requerido

The outstanding balance after the refund: 0, or negative for what the business would owe. Always null through an API key: it is shown only in the dashboard, to users who can see settlements.

Ejemplo:

null