Create a credit note (refund)
Refunds money paid on an invoice, as a credit note against it. amount is integer minor units, at most what was paid on the invoice less what's already been refunded (400 otherwise, and 400 for an invoice with nothing paid: void an unpaid invoice instead). When Stripe collected the payment, the money goes back to the card through Stripe (refundMethod: stripe, with Stripe's stripeRefundId); if Stripe refuses, the request answers 400 INVALID_REQUEST with Stripe's message and nothing changes. Otherwise the refund is recorded (refundMethod: manual) and you return the money the way the customer paid. Refunds made in Stripe's dashboard become credit notes too, on their own. The invoice's creditNotesTotal grows by the refund, revenue drops by it on the day it's made (so does what a value receipt says the customer paid), and billing-invoice-refunded is sent. Credits the invoice granted stay granted. Send an idempotencyKey to refund once only: the same refund again with it answers 200 with the first credit note; the same key with a different invoice, amount or reason is a 409 IDEMPOTENCY_KEY_REUSED. 404 when no invoice has that ID. Responds 201 with the credit note.
Body·
- Type: integeramountmin:1required
How much to refund. A positive integer in minor units, at most what was paid less what's been refunded.
- Type: stringinvoice
Id requiredThe invoice whose payment to refund.
- Type: stringidempotency
Key Makes the refund once only. Keys don't expire and are shared across every invoice.
- Type: stringreasonmax length:500
Why, for your records and the invoice's history.
Responses
- application/json
- application/json
- application/json
- application/json
- application/json
curl https://billing.getspondo.com/api/v1/credit-notes \
--request POST \
--header "Authorization: Bearer $SPONDO_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"invoiceId": "inv_3Rk8Wq1Zp6Ty0Xm2",
"amount": 1499,
"reason": "Money-back guarantee",
"idempotencyKey": "case-4821-refund"
}'
{
"id": "cn_8Tq2Wv5Yn1Hk7Rb4",
"displayNumber": "INV-0042-CN1",
"invoiceId": "inv_3Rk8Wq1Zp6Ty0Xm2",
"customerId": "cus_Q2x9vB7mK4pT1sLw",
"amount": 1499,
"currency": "GBP",
"reason": "Money-back guarantee",
"refundMethod": "stripe",
"stripeRefundId": "re_3QmN8b2eZvKYlo2C1a9Xw0Pt",
"createdAt": "2026-11-10T15:02:44.118Z"
}