Contents

POST [/instances/$INSTANCE]/private/orders/$ORDER_ID/refund#

Increase the refund amount associated with a given order. The user should be redirected to the taler_refund_uri to trigger refund processing in the wallet.

Required permission: orders-refund

Request:

The request body is a RefundRequest object.

Response:

200 OK:

The refund amount has been increased, the backend responds with a MerchantRefundResponse.

403 Forbidden:

For the given order, the refund delay was zero and thus refunds are categorically not allowed.

404 Not found:

The order is unknown to the merchant.

410 Gone:

It is too late for aborting, the exchange may have already wired the funds to the merchant.

409 Conflict:

The refund amount exceeds the amount originally paid.

451 Unavailable for Legal Reasons:

The refund could not be awarded because of legal reasons (an exchange would refuse). The merchant staff needs to find another way to give a refund to the customer. The body is an ErrorDetail with an error code of MERCHANT_POST_ORDERS_ID_REFUND_EXCHANGE_TRANSACTION_LIMIT_VIOLATION.

Details:

interface RefundRequest {
  // Amount to be refunded.
  refund: Amount;

  // Human-readable refund justification.
  reason: string;
}
interface MerchantRefundResponse {

  // URL (handled by the backend) that the wallet should access to
  // trigger refund processing.
  // taler://refund/...
  taler_refund_uri: string;

  // Contract hash that a client may need to authenticate an
  // HTTP request to obtain the above URI in a wallet-friendly way.
  h_contract: HashCode;
}