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.
accounting:writeGrant 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
amountis 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
amountis 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
- 200
- 401
- 403
- 404
- 409
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Conflict
Response Headers
Unprocessable Content
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.