Refund all or part of a sale (admin only)

Record a Paddle refund or an invoice credit note (dobropis).

Writes a negative credit_grants row linked to the sale it reverses: the balance and total_credits_purchased go down, revenue reporting nets the money off, and total_credits_used is untouched because nothing was consumed. An admin clawback cannot do this — it books as consumption.

Idempotent on (provider, provider_txn_id) like /v1/billing/credits: a retry returns the original refund with credited: false.

Rejections: 404 original_grant_not_found; 422 refund_mismatch (other tenant or currency), refund_exceeds_original (cumulative refunds would pass the sale's credits or money), idempotency_key_reused; 409 insufficient_balance when the tenant has already burned the credits — resend with fewer credits and refund the rest as money only.

post/v1/billing/refunds

Request

  • Base URL: https://api.clichefactory.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.clichefactory.com/v1/billing/refunds
  • Auth: none declared

Headers

X-API-KEYstring nullable

Request body

tenant_idstring required
creditsinteger required

Credits taken back from the balance.

currencystring required

Must match the sale's currency.

gross_amount_minorinteger

Money refunded, incl. tax.

tax_amount_minorinteger
providerstring required

Same provider as the sale: 'invoice' | 'paddle'.

provider_txn_idstring required

The refund's own id (dobropis number); the idempotency key.

reverses_provider_txn_idstring required

provider_txn_id of the sale being refunded (the invoice number).

reasonstring

Response

Successful Response

tenant_idstring required
grant_idinteger required
reverses_grant_idinteger required
credits_refundedinteger required
currencystring required
gross_amount_minorinteger required
new_balance_creditsinteger required
creditedboolean required

Changes

No recorded changes to this operation across all 1 revision of this API.