A valid request URL is required to generate request examples{
"invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment": "live",
"charge_ref": "<string>",
"currency": "BRL",
"amount_minor": 123,
"refunded_minor": 123,
"remaining_minor": 123
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}What an invoice can still refund
Requires billing:read. What the gateway says about the payment behind one invoice: what it collected, what has already been handed back, and what remains.
This is a live read, every time
The invoice mirror stores no refunded amount, and that is deliberate rather than a gap: the mirror is keyed on the invoice and a refund lives on the payment, so a column here would be a partial copy of an object this system does not track — with no way to tell a stale zero from a real one.
So the numbers come from the gateway on every call. They include refunds issued in the gateway’s own dashboard, which is exactly the case the arithmetic you might do instead would miss.
Money is in the payment’s currency and minor units, which is normally the invoice’s own. Where the two differ, the payment is the one that counts — a refund is denominated in what was actually taken.
An invoice the gateway has no payment for answers 409 rather than a zero: nothing to refund and we could not find the payment are different answers, and only one of them should stop somebody looking.
A valid request URL is required to generate request examples{
"invoice_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"environment": "live",
"charge_ref": "<string>",
"currency": "BRL",
"amount_minor": 123,
"refunded_minor": 123,
"remaining_minor": 123
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}{
"error": {
"code": "forbidden",
"message": "your role does not allow this action"
}
}Autorizações
Cabeçalhos
The organization the caller is acting on — the org_… code that appears in the panel URL. It identifies; the membership JOIN is what authorizes, so a forged code reads nothing: the answer is not_a_member (403), which does not mean the session is over. Absent, the session's default organization answers, or — if that membership was revoked while the session was open — any other one the caller still holds.
Parâmetros de caminho
Parâmetros de consulta
Resposta
The payment behind this invoice, as the gateway currently holds it.
The payment behind one invoice, read from the gateway at the moment of asking. Nothing here is stored: the mirror is keyed on the invoice and a refund lives on the payment, so every figure below comes back over the wire — which is what makes a refund issued in the gateway's own dashboard visible here.