Skip to navigation

List Refunds By Attempt

Deprecated
View as Markdown

List refunds for a processor attempt. Deprecated: Use /by_charge/{charge_id} instead.

Authentication

AuthorizationBearer

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

Path parameters

processor_attempt_external_idstringRequired
account_idstringRequired

Response

Successful Response
idstring
ID of the refund
account_idstring
ID of the account
amount_atominteger

Cash refunded in atoms — what was reversed at the payment processor. For an invoice settled partly from customer credit this is the cash leg only; see credit_restored_atom for the rest. 0 for a refund that returned credit only.

credit_restored_atominteger

Customer credit returned to the balance by this refund, in atoms. Non-zero only when the invoice was settled partly from credit and the refund asked for more than its cash leg: refunds draw the cash down first, and the excess comes back as credit. Sum this with amount_atom for the total value returned to the customer. Always 0 until the refund has succeeded — a pending refund has returned nothing yet.

currencyenum

Currency code (e.g., USD)

statusenum
Status of a refund throughout its lifecycle.
Allowed values:
created_atdatetime
updated_atdatetime
charge_idstring or nullOptional

ID of the original charge. Null for a refund that returned credit only — an invoice settled entirely from the customer’s balance, or one whose cash had already been fully refunded — because no processor charge was reversed. Such a refund carries invoice_id instead; one of the two is always set.

invoice_idstring or nullOptional

ID of the invoice the refund was requested against, when it was created with invoice_id. Null for a refund requested by payment_intent_id, which may have settled several invoices. When the payment behind this invoice settled several invoices, the credit leg is restored across all of them oldest invoice (lowest id) first, so the credit may have come back on a sibling invoice rather than this one.

reasonenum or nullOptional
Reason for initiating a refund.
processor_refund_idstring or nullOptional

Processor’s refund ID (e.g., Stripe’s re_xxx)

failure_codestring or nullOptional
failure_messagestring or nullOptional
acquirer_reference_numberstring or nullOptional

The refund’s Acquirer Reference Number (ARN): the number the cardholder’s bank traces the refund with. Not the charge’s ARN. Null until the processor publishes it, often days after the refund succeeds, and always null for processors that do not report one.

processed_atdatetime or nullOptional
metadatamap from strings to any or nullOptional
issued_bystring or nullOptional

Who issued the refund, as a display label, not an identifier: the dashboard user’s current email (else their name, or their user id if the user was deleted), ‘API key “<description>”’ (‘API key’ when it has none), or, for one made in the customer portal, the customer’s email (else their name, or their customer id). The refund’s issuer even after the processor settles it, which PaymentKit records on its own. Null for a refund PaymentKit created itself (one found already refunded at the processor, a migrated one) and for a refund created before this was recorded. Do not parse it.

Errors

422
Unprocessable Entity Error