Refund a recorded payment
Sets the refunded total of a payment recorded through this API (not a synced provider's): the whole amount by default (the body may be left out), or refunded_amount (the total so far, so sending it again changes nothing). 404 when no such payment was recorded. 300 requests a minute per API key.
Requires an API key holding revenue:write on the site. Session cookies and share links: 401.
x-api-key<token>An organization API key (ak_…), with the permissions and the sites it was created with. For servers and scripts: no cookie and no Origin check. Also accepted as Authorization: Bearer ak_… (apiKeyBearer). A request carries one credential: a key sent with a share token or a live session cookie is 400 (details.reason: ambiguous_credentials).
Scope: revenue:write
siteId*stringpaymentId*stringYour billing system's id of the payment (order, transaction or invoice id), unique within the site
^[!-~]{1,255}$application/json- body
refunded_amount?|The total refunded so far (not this refund's part), 0 to amount; default: the whole amount
OK
application/json- response
data*curl -X POST 'https://pilotfox.app/api/v1/sites/string/payments/string/refund' \ -H 'Content-Type: application/json' \ -d '{}'{ "data": { "payment_id": "string", "provider": "custom", "ts": "string", "amount": 0, "currency": "string", "refunded_amount": 0, "status": "paid", "attribution": "checkout_ref" }}