Menu

Refunding an order

Refunding an order

Copied!
curl https://api.worldpay.com/v1/orders/[your-order-code]/refund
    -H "Authorization:your-test-service-key"
    -H "Content-type: application/json"
    -X POST
$worldpay = new Worldpay('your-test-service-key');

$worldpay->refundOrder('your-order-code');
WorldpayRestClient restClient = new WorldpayRestClient("your-test-service-key");

restClient.getOrderService().refund('your-order-code');
worldpay = Worldpay.new('your-test-service-key')

worldpay.refundOrder('your-order-code')
WorldpayRestClient restClient = new WorldpayRestClient("https://api.worldpay.com/v1", "your-test-service-key");

restClient.GetOrderService().Refund('your-order-code');

Refund a order through a POST on the Order Refund API URL, without any request body. An order can be refunded once Worldpay receives capture confirmation from the Payment Provider. This typically occurs within 15 minutes, but can take significantly longer depending on the Payment Provider.

Note: You cancancelan AUTHORIZED order

Live orders are refunded using theLive Service Keyand test orders are refunded using theTest Service Key, in the Authorization http header.

When a refund is requested, the paymentStatus is changed to SENT_FOR_REFUND. Once the refund is complete, typically after several days depending on the Payment Provider, the paymentStatus changes to REFUNDED.