Refund payment

POSThttps://app.speybooks.com/api/v1/admin/orgs/{id}/refund

Refund an organisation's most recent charge, in full or in part. Provide amount (in pence) for a partial refund; omit it for a full refund of the latest charge.

The refund is created at the payment provider. The audit record captures the charge, the refund, the amount and the currency.

Request Body

  • amount: optional, pence. Omit for a full refund
  • reason: minimum 5 characters, required for the audit record

Records a PAYMENT_REFUNDED action in the audit log.

Error responses:

  • 400 { code: "NO_CUSTOMER" }: organisation has no billing customer
  • 400 { code: "NO_CHARGES" }: no charges found to refund
  • 404 { code: "NOT_FOUND" }: organisation not found

Path parameters

idstringrequired
Organisation ID.

Body parameters

reasonstringrequired
Reason for refund (audit trail). Min 5 characters.
min length: 5
amountintegeroptional
Refund amount in pence. Omit for full refund.

Response

200Refund created. Returns Stripe refund ID, amount, and status.
Show response fields
amountinteger
currencystring
refundIdstring
statusstring

Error codes

400No Stripe customer or no charges found.
404Organisation not found.