Skip to content

OR28 - Perform refunds on order lines

Request

Call Frequency
Maximum usage: At each refund request
Security
Operator-Bearer-Token or OAuth-2
Bodyapplication/json
order_tax_modestring

Please note: If the taxes are not specified, the prices with mode TAX_EXCLUDED and with mode TAX_INCLUDED will return the same amounts.
Possible values:

  • TAX_EXCLUDED: the price fields (price, unit price, shipping price and order total prices) do not include taxes.
  • TAX_INCLUDED: the price fields include the tax amounts.
  • If not specified, the default order tax mode of the platform is used.

Enum: "TAX_INCLUDED", "TAX_EXCLUDED"

refundsArray of objectsrequired

List of representations of refunds to be created

curl -i -X PUT \
  https://your-instance.mirakl.net/api/orders/refund \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "order_tax_mode": "TAX_EXCLUDED",
    "refunds": [
      {
        "amount": 1.5,
        "currency_iso_code": "USD",
        "excluded_from_shipment": false,
        "fees": [
          {
            "amount": 0.5,
            "code": "CARD_FEE"
          },
          {
            "amount": 0.25,
            "code": "EU_DRS"
          }
        ],
        "order_line_id": "Order_00010-A-1",
        "quantity": 0,
        "reason_code": "15",
        "shipping_amount": 2,
        "shipping_taxes": [
          {
            "amount": "1",
            "code": "tax1"
          },
          {
            "amount": "1",
            "code": "tax2"
          }
        ],
        "tax_legal_notice": "Tax legal notice",
        "taxes": [
          {
            "amount": "1",
            "code": "tax1"
          },
          {
            "amount": "1",
            "code": "tax2"
          }
        ]
      }
    ]
  }'

Responses

OK

Bodyapplication/json
order_tax_modestringrequired

Please note: In case there is no tax, the prices will show the same amount in TAX_EXCLUDED and TAX_INCLUDED mode. The tax mode is only useful if taxes are specified in the refund.
Possible values:

  • TAX_EXCLUDED: the price fields (amount, shipping amount) are expressed without tax (taxes should be added to these prices in order to get the full amount including taxes).
  • TAX_INCLUDED: the price fields include the tax amount.

Enum: "TAX_INCLUDED", "TAX_EXCLUDED"

refundsArray of objectsrequired

List of representations of created refunds

Response
{ "order_tax_mode": "TAX_EXCLUDED", "refunds": [ { … } ] }