order

order.refund.add

Add a refund to the order.

post/order.refund.add.json

Request

  • Base URL: https://api.api2cart.com/v1.1
  • URL: https://api.api2cart.com/v1.1/order.refund.add.json
  • Auth: API key in header x-api-key and API key in header x-store-key

Request body

order_idstring

Defines the order for which the refund will be created.

total_pricenumber

Defines order refund amount.

shipping_pricenumber

Defines refund shipping amount.

fee_pricenumber

Specifies refund's fee price

messagestring

Refund reason, or some else message which assigned to refund.

item_restockboolean

Boolean, whether or not to add the line items back to the store inventory.

send_notificationsboolean

Send notifications to customer after refund was created

datestring

Specifies an order creation date in format Y-m-d H:i:s

store_idstring

Store Id

is_onlineboolean

Indicates whether refund type is online

idempotency_keystring

A unique identifier associated with a specific request. Repeated requests with the same <strong>idempotency_key</strong> return a cached response without re-executing the business logic. <strong>Please note that the cache lifetime is 15 minutes.</strong>

Example request

{
  "total_price": 23.56,
  "shipping_price": 5.5,
  "fee_price": 5.5,
  "message": "Received item is not like in the photo, get my money back.",
  "item_restock": true,
  "send_notifications": true,
  "date": "2012-09-25 19:40:00",
  "store_id": "1",
  "idempotency_key": "098f6bcd4621d373cade4e832627b4f6"
}

Response

successful operation

return_codeinteger
return_messagestring

Changes

No recorded changes to this operation across all 1 revision of this API.