post-private-orders-ORDER_ID-refund.rst (1926B)
1 .. http:post:: [/instances/$INSTANCE]/private/orders/$ORDER_ID/refund 2 3 Increase the refund amount associated with a given order. The user should be 4 redirected to the ``taler_refund_uri`` to trigger refund processing in the wallet. 5 6 **Required permission:** ``orders-refund`` 7 8 **Request:** 9 10 The request body is a `RefundRequest` object. 11 12 **Response:** 13 14 :http:statuscode:`200 OK`: 15 The refund amount has been increased, the backend 16 responds with a `MerchantRefundResponse`. 17 :http:statuscode:`403 Forbidden`: 18 For the given order, the refund delay was zero and thus 19 refunds are categorically not allowed. 20 :http:statuscode:`404 Not found`: 21 The order is unknown to the merchant. 22 :http:statuscode:`410 Gone`: 23 It is too late for aborting, the exchange may have already wired the funds 24 to the merchant. 25 :http:statuscode:`409 Conflict`: 26 The refund amount exceeds the amount originally paid. 27 :http:statuscode:`451 Unavailable for Legal Reasons`: 28 The refund could not be awarded because of legal 29 reasons (an exchange would refuse). The merchant 30 staff needs to find another way to give a refund 31 to the customer. 32 The body is an `ErrorDetail` with an error 33 code of ``MERCHANT_POST_ORDERS_ID_REFUND_EXCHANGE_TRANSACTION_LIMIT_VIOLATION``. 34 35 **Details:** 36 37 .. ts:def:: RefundRequest 38 39 interface RefundRequest { 40 // Amount to be refunded. 41 refund: Amount; 42 43 // Human-readable refund justification. 44 reason: string; 45 } 46 47 .. ts:def:: MerchantRefundResponse 48 49 interface MerchantRefundResponse { 50 51 // URL (handled by the backend) that the wallet should access to 52 // trigger refund processing. 53 // taler://refund/... 54 taler_refund_uri: string; 55 56 // Contract hash that a client may need to authenticate an 57 // HTTP request to obtain the above URI in a wallet-friendly way. 58 h_contract: HashCode; 59 }