Skip to main content

Refund Authorize.net Payment

POST 

/api/authorize-net/transactions/:id/refund

Sends money back on an Authorize.net payment and records it on the sales order.

Required scope: accounting:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

  • Settled payment: refunds amount (partial or full) to the card or bank account that paid.
  • Not settled yet and amount is the whole payment: the payment is voided instead (action: voided) — the customer is never charged and the recorded payment is reversed.
  • Not settled yet and amount is less than the payment: refused (422, reason: unsettled_partial_refund) — void the whole payment, or refund after settlement.
  • Older than 180 days: refused (422, reason: refund_window_passed) — refund the customer another way and record it as a refund.

With create_sales_credit (default true) a refund credit is created on the order and closed as paid out, so the order reads Refunded / Partially refunded. With it false only Authorize.net is refunded. Each refund is recorded once.

Only one refund or void of a payment runs at a time: a second request while one is in progress gets 409 (reason: in_progress).

Authentication: Requires Bearer token with the Refund permission.

Request body:

  • amount (number, required, > 0): at most the refundable amount.
  • reason (string, optional, ≤ 255): shown on the sales credit.
  • create_sales_credit (boolean, optional, default true).

Request​

Responses​

OK

Response Headers
    Content-Type