Skip to main content

Refunds

The Merchant may initiate a refund to its customer after their order has been placed. The money will be returned via the same payment method as the one used by the customer in the payment process.

It needs to be noted that OA will accept a refund request from the merchant even if the requested refund value exceeds the available balance of the merchant's OA account. In that case the requested refund will await the availability of sufficient funds on the merchant's OA account.

Refund requests require a unique caseId. This caseId must be unique for the order, but the same caseId may be used for different orders. If the caseId has already been used for that order, OpenApp will reject the refund as a duplicate.

Request

A refund request is executed by a POST to the following endpoint:

POST {{OpenAppUrl}}/merchant/v1/orders/refund

The request body contains information about the order, the amount and optionally the specific products for which the refund is executed:

{
"oaOrderId": "OA12345678901234",
"shopOrderId": "WS1213ASDZXC231A",
"currency": "PLN",
"amount": 1999,
"reason": "RETURNED",
"caseId": "RET-123434",
"notes": "Returned without charger cables.",
"products": [
{
"id": "id123",
"refundedQuantity": 1,
"amount": 1999
}
]
}

Response

In response, OpenApp will confirm registration of the refund request. Execution of the refund to the customer will be visible in the settlement report.

Errors

Error nameCode
OrderNotFoundException404
MerchantOrderOwnershipException404
RefundExistsException409
RefundTooMuchException400
MerchantWalletNotFoundException404
UserNotFoundException404