Skip to main content
POST
/
order-items
/
refund
Refund Order Items
curl --request POST \
  --url https://api.nuwebgroup.com/v1/order-items/refund \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "items": [
    1,
    2,
    3
  ],
  "restock": true,
  "refundProcessingFee": true,
  "refundResellerFee": true,
  "notifyCustomer": true,
  "online": true
}
'
{
  "id": 5,
  "order_item_id": 6,
  "currencyId": 1,
  "currencySymbol": "£",
  "currencyCode": "GBP",
  "refundValue": 545
}

Authorizations

Authorization
string
header
required

The 'Bearer' token can be obtained from the token management interface or via the login endpoint using your admin user credentials.

Body

application/json

Request body for refunding order items.

items
any[]

The list of order item IDs to refund.

restock
boolean

When true, the items will be restocked. If no value is passed, this will always default to true.

subtractFromWalletBalance
boolean

When true, if this item is a wallet topup, the value will be deducted from the wallet. The default behaviour is true.

refundProcessingFee
boolean

When true, the processing fee will be refunded. If no value is passed, this will always default to true.

refundResellerFee
boolean

When true, the reseller fee will be refunded. If no value is passed, this will always default to true.

notifyCustomer
boolean

When true, the customer will be notified of their refund. If no value is passed, this will always default to true.

online
boolean

True for online refunds, false otherwise. If true is passed here but the transaction has no payment gateway or has a total of zero, it will revert this value to false.

type
enum<string>

Set the type for the refund. If set to balance or cancellation, the online flag will be ignored

Available options:
refund,
balance_refund,
cancellation
uuid
boolean

The uuid to store against the transaction, which allows the existing transaction to be returned if the refund has already been processed. This is ignored for cancellations, as they don't have a transaction

Response

Successfully refunded order item transactions.

data
object[]