Replace a refund reason
Authorizations
A secret API key. Publishable keys cannot reach this API. A key may carry an expiry, and an expired key is refused exactly like an unknown one, with a 401 that names no reason; check the key's expires_at in the dashboard rather than inferring it from a response. When a merchant rolls a key's secret they choose a grace window of up to 3 days, and for its duration BOTH the new secret and the one it replaced authenticate, so an integration moves over on its own deploy schedule instead of at the instant the button is pressed. Move before the window closes: after it, the old secret is refused. Nothing else about this contract moves with a roll. The key keeps its id and its scopes, so the only thing an integration updates is the credential itself.
Headers
A unique key per logical write. Replaying a request with the same key returns the first response byte for byte instead of applying the write twice.
Path Parameters
Body
REPLACES the reason, so an omitted description is CLEARED rather than kept. Read the reason first and send every field back. is_active IS REQUIRED FOR THAT REASON. Omitted it would decode to false and retire a reason the merchant is still using, with a 200 and nothing to say it happened: the reason disappears from their staff's picker on the next refund and their dashboard shows a shorter list rather than a fault. THIS IS ALSO THE ONLY WAY TO WITHDRAW A REASON. There is no DELETE on this family and there will not be one: a refund's reason link is ON DELETE SET NULL, so removing a reason silently strips the categorisation off every historical refund citing it, with no restore path. Send is_active false instead; the reason stops being selectable on new refunds and every refund that already cites it keeps its label.
What the merchant's staff see. Required; blank is a 400.
The reason's stable handle, unique per store. Required. Changing it to one another reason already holds is 409 refund_reason_exists.
Whether the reason is offered on a new refund. Required. false retires it, which is reversible: send true to offer it again.
The longer note. OMITTED OR NULL CLEARS IT, because this is a replace. Send the note back to keep it.
Response
Success
