Refund an invoice
POST {{baseUrl}}/v4/invoices/:uid/refund
Refunds an invoice. The invoice must currently have a status
of paid
.If an invoice has a status
of created
it cannot be refunded, but can be canceled. An invoice can have multiple refunds. The total refunded amount cannot exceed the invoice's amount
.
Request Body
{"amount"=>4186, "locationUid"=>"00000000-0000-0000-0000-000000000000", "paymentUid"=>"00000000-0000-0000-0000-000000000000", "reason"=>"requested_by_customer", "note"=>"incorrect amount"}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"data":{"canceledAt":"2015-01-23T23:50:07Z","canceledNote":"The wrong amount was entered.","channel":{"identifier":"email@email.com","type":"email"},"conversationUid":"00000000-0000-0000-0000-000000000000","createdAt":"2015-01-23T23:50:07Z","currencyRef":"USD","customerName":"Joe Orange","invoiceNumber":"abc-12345-def","lineItems":[{"amount":1099,"description":"Total"},{"amount":1099,"description":"Total"}],"location":{"uid":"00000000-0000-0000-0000-000000000000"},"paidAt":"2015-01-23T23:50:07Z","paymentNet":1000,"payments":[{"bankAccountLast4":"1245","bankAccountName":"The Bank","cardBrand":"visa","cardLast4":"4242","createdAt":"2015-01-23T23:50:07Z","fee":99,"interchangeFee":50,"refunds":[{"amount":100,"createdAt":"2015-01-23T23:50:07Z","notes":["The product did not function properly.","The product did not function properly."],"reason":"requested_by_customer","settledAt":"2015-01-23T23:50:07Z","status":"failed_lost_or_stolen"},{"amount":100,"createdAt":"2015-01-23T23:50:07Z","notes":["The product did not function properly.","The product did not function properly."],"reason":"duplicate","settledAt":"2015-01-23T23:50:07Z","status":"failed_charge_for_pending_refund_disputed"}],"settledAt":"2015-01-23T23:50:07Z","status":"refund_pending","uid":"00000000-0000-0000-0000-000000000000"},{"bankAccountLast4":"1245","bankAccountName":"The Bank","cardBrand":"visa","cardLast4":"4242","createdAt":"2015-01-23T23:50:07Z","fee":99,"interchangeFee":50,"refunds":[{"amount":100,"createdAt":"2015-01-23T23:50:07Z","notes":["The product did not function properly.","The product did not function properly."],"reason":"duplicate","settledAt":"2015-01-23T23:50:07Z","status":"succeeded"},{"amount":100,"createdAt":"2015-01-23T23:50:07Z","notes":["The product did not function properly.","The product did not function properly."],"reason":"requested_by_customer","settledAt":"2015-01-23T23:50:07Z","status":"failed_lost_or_stolen"}],"settledAt":"2015-01-23T23:50:07Z","status":"refund_failed","uid":"00000000-0000-0000-0000-000000000000"}],"readerUid":"00000000-0000-0000-0000-000000000000","requester":"John Apple","status":"refund_pending","uid":"00000000-0000-0000-0000-000000000000"},"metadata":{"url":"https://www.podium.com/"}}