Skip to navigation

Get Refundable By Invoice

View as Markdown

How much a refund of this invoice can still return, split into the cash leg (back to the card) and the credit leg (back to the customer’s balance).

Read-only. The figures are the ones POST /refunds with invoice_id validates against, so total_refundable_atom is the most amount_atom may ask for. An invoice settled entirely from credit has payment_intent_id null and a cash leg of 0; both legs at 0 means there is nothing left to refund.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

invoice_idstringRequired
account_idstringRequired

Response

Successful Response
currencyenum
Currency of every amount below
cash_refundable_atominteger

Money still on the card that a refund can reverse, in atoms: the charge’s unrefunded balance minus any refund still pending at the processor. A refund request is filled from this leg first.

credit_refundable_atominteger

Customer credit still applied to the invoices this payment settled, in atoms, net of the credit leg of any refund still pending settlement on this payment (that refund returns it itself when it settles). Only the part of a refund request that the cash leg cannot cover comes back from here, as credit on the customer’s balance. 0 unless the invoice was settled at least partly from credit. When the cash leg is 0, a refund by invoice_id returns this leg alone.

total_refundable_atominteger

The most amount_atom may ask for on POST /refunds: the two legs added together. A request above it is refused. On the by-payment preview it is 0 once cash_refundable_atom is 0 — a refund addressed by payment_intent_id must move money, so POST /refunds refuses then (RFR14) even while credit_refundable_atom is non-zero; refund by invoice_id instead, which returns that credit alone as a zero-cash refund. On the by-invoice preview of an invoice that still has cash, the credit leg counts this invoice’s credit only, while POST /refunds by invoice_id accepts up to the cash plus the credit still applied across every invoice that payment settled, so the figure can under-state what a refund may ask for when one payment settled several invoices.

payment_intent_idstring or nullOptional

Payment intent these figures are for. Null when the figures were asked for by invoice and that invoice has no succeeded charge — it was settled from customer credit — so only the credit leg can be non-zero.

invoice_idstring or nullOptional
Invoice these figures are for, when they were asked for by invoice. Null when asked for by payment intent.

Errors

422
Unprocessable Entity Error