Receipts
Refund a customer
https://your-business.qaydtech.com/api/v1/customers/{id}/refunds
Gives back to the customer money the business holds of theirs, such as a return they had paid or an overpayment: all of it unless an amount is named, never more (see refundable in the customer balance). Needs the receipts permission; a test key never refunds.
The user the key acts as also needs: Collect on sales invoices
Request
Path parameters
-
idinteger requiredThe record’s number.
Example:
42
Headers
-
Authorizationstring requiredBearer followed by the API key.
Example:
Bearer qayd_… -
Accept-Languagestring optionalen for English error messages. Arabic by default.
Example:
en -
Content-Typestring requiredapplication/json with every request that has a body.
Example:
application/json -
Idempotency-Keystring optionalA unique value so a request sent again creates nothing twice.
Example:
order-10045
Request body application/json
-
methodstring requiredHow it was paid: cash, bank_transfer, card or cheque.
Example:
card -
account_idinteger optionalFor payments and refunds: the cash box or bank account from GET /payment-accounts, defaulting to the method’s account. For stock documents: the offset account, defaulting to stock adjustments.
-
amountnumber optionalThe amount in riyals, up to 2 decimals.
-
datedate optionalThe date; today when not sent.
Example:
2026-11-10 -
referencestring optionalYour reference, such as your store’s order number, up to 60 characters. Searchable later.
Example:
PAY-88231 -
notesstring optionalNotes, up to 500 characters.
Responses
- 201 Created
- 422 Refused
- Errors · 401 · 403 · 429