Issues a full or partial refund and returns points to the customer. When amount is omitted, the full captured amount is refunded. Rules (refund window, order state) are enforced by the backend RefundService.
POST
/
v1
/
orders
/
{orderUuid}
/
refund
Refund an order
curl --request POST \ --url https://api.papp.sa/api/v1/orders/{orderUuid}/refund \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data '{ "amount": 50, "reason": "Item returned by customer."}'