---
title: "Create order refund"
method: POST
path: "/orders/{orderId}/refunds"
tags: ["Orders API"]
deprecated: true
---

# Create order refund

`POST /orders/{orderId}/refunds`

> **Deprecated.**

**⚠️ We no longer recommend using the Orders API. Please refer to the [Payments API](payments-api) instead.**

When using the Orders API, refunds should be made for a specific order.

If you want to refund arbitrary amounts, however, you can also use the [Create payment refund endpoint](create-refund) by creating a refund on the payment itself.

If an order line is still in the `authorized` state, it cannot be refunded. You should cancel it instead. Order lines that are `paid`, `shipping` or `completed` can be refunded.

> 🔑 Access with
>
> [API key](/reference/authentication)
>
> [Advanced access token with **refunds.write**](/reference/authentication)
>
> [OAuth access with **refunds.write**](/reference/authentication)

## Request body

- object
  - `resource` string — Indicates the response contains a refund object. Will always contain the string `refund` for this endpoint.
  - `id` string — The identifier uniquely referring to this refund. Mollie assigns this identifier at refund creation time. Mollie will always refer to the refund by this ID. Example: `re_4qqhO89gsT`.
  - `mode` string — Whether this entity was created in live mode or in test mode. Possible values: `live` `test`
  - `description` string — The description of the refund that may be shown to your customer, depending on the payment method used.
  - `amount` object — The amount refunded to your customer with this refund. The amount is allowed to be lower than the original payment amount.
    - `currency` string, required — A three-character ISO 4217 currency code.
    - `value` string, required — A string containing an exact monetary amount in the given currency.
  - `settlementAmount` object, nullable — In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
    - `currency` string, required — A three-character ISO 4217 currency code.
    - `value` string, required — A string containing an exact monetary amount in the given currency.
  - `metadata` union — Provide any data you like, for example a string or a JSON object. We will save the data alongside the entity. Whenever you fetch the entity with our API, we will also include the metadata. You can use up to approximately 1kB.
    - string
    - number
    - object
    - string[]
  - `orderId` string — The unique identifier of the order this refund was created for. For example: `ord_8wmqcHMN4U`. Not present if the refund was not created for an order.
  - `settlementId` string, nullable — The identifier referring to the settlement this refund was settled with. This field is omitted if the refund is not settled (yet).
  - `status` 'queued' | 'pending' | 'processing' | 'refunded' | 'failed' | 'canceled' — Refunds may take some time to get confirmed.
  - `createdAt` string — The entity's date and time of creation, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
  - `externalReference` object
    - `type` string — Specifies the reference type Possible values: `acquirer-reference`
    - `id` string — Unique reference from the payment provider
  - `testmode` boolean, nullable — Whether to create the entity in test mode or live mode. Most API credentials are specifically created for either live mode or test mode, in which case this parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting `testmode` to `true`.
  - `lines` object[], required — A refund can optionally be linked to specific order lines. The lines will show the `quantity`, `discountAmount`, `vatAmount`, and `totalAmount` refunded. If the line was partially refunded, these values will be different from the values in response from the [Get payment](get-payment) endpoint.
    - `resource` string, required
    - `id` string, required — The ID of the order line you wish to refund. For example: `odl_jp31y97yjz`.
    - `orderId` string, required
    - `name` string, required
    - `sku` string, nullable, required
    - `type` 'physical' | 'digital' | 'discount' | 'shipping_fee' | 'store_credit' | 'gift_card' | 'surcharge', required
    - `status` 'created' | 'authorized' | 'paid' | 'canceled' | 'shipping' | 'completed', required
    - `metadata` union, required — Provide any data you like, for example a string or a JSON object. We will save the data alongside the entity. Whenever you fetch the entity with our API, we will also include the metadata. You can use up to approximately 1kB.
      - string
      - number
      - object
      - string[]
    - `isCancelable` boolean, required
    - `quantity` integer, required — The number of items that should be refunded for this order line. When this parameter is omitted, the whole order line will be refunded. Must be less than the number of items already refunded for this order line.
    - `quantityShipped` integer
    - `amountShipped` object — In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
      - `currency` string, required — A three-character ISO 4217 currency code.
      - `value` string, required — A string containing an exact monetary amount in the given currency.
    - `quantityRefunded` integer
    - `amountRefunded` object — In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
      - `currency` string, required — A three-character ISO 4217 currency code.
      - `value` string, required — A string containing an exact monetary amount in the given currency.
    - `quantityCanceled` integer
    - `amountCanceled` object — In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
      - `currency` string, required — A three-character ISO 4217 currency code.
      - `value` string, required — A string containing an exact monetary amount in the given currency.
    - `amount` object — The amount that you want to refund. In almost all cases, Mollie can determine the amount automatically. The amount is required only if you are partially refunding an order line which has a non-zero `discountAmount`. The amount you can refund depends on various properties of the order line and the create order refund request. The maximum that can be refunded is `unit price x quantity to ship`. The minimum amount depends on the discount applied to the line, the quantity already refunded or shipped, the amounts already refunded or shipped and the quantity you want to refund. If you do not send an amount, Mollie will determine the amount automatically or respond with an error if the amount cannot be determined automatically. The error will contain the `extra.minimumAmount` and `extra.maximumAmount` properties that allow you pick the right amount.
      - `currency` string, required — A three-character ISO 4217 currency code.
      - `value` string, required — A string containing an exact monetary amount in the given currency.
    - `shippableQuantity` integer
    - `refundableQuantity` integer
    - `cancelableQuantity` integer
    - `unitPrice` object, required — In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
      - `currency` string, required — A three-character ISO 4217 currency code.
      - `value` string, required — A string containing an exact monetary amount in the given currency.
    - `totalAmount` object, required — In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
      - `currency` string, required — A three-character ISO 4217 currency code.
      - `value` string, required — A string containing an exact monetary amount in the given currency.
    - `vatRate` string, required
    - `vatAmount` object, required — In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
      - `currency` string, required — A three-character ISO 4217 currency code.
      - `value` string, required — A string containing an exact monetary amount in the given currency.
    - `createdAt` string, required
    - `discountedAmount` object — In v2 endpoints, monetary amounts are represented as objects with a `currency` and `value` field.
      - `currency` string, required — A three-character ISO 4217 currency code.
      - `value` string, required — A string containing an exact monetary amount in the given currency.
    - `_links` object, required — An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.
      - `productUr` object — In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
        - `href` string, required — The actual URL string.
        - `type` string, required — The content type of the page or endpoint the URL points to.
      - `imageUrl` object — In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
        - `href` string, required — The actual URL string.
        - `type` string, required — The content type of the page or endpoint the URL points to.
  - `_links` object — An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.
    - `self` object — In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
      - `href` string, required — The actual URL string.
      - `type` string, required — The content type of the page or endpoint the URL points to.
    - `order` object — The API resource URL of the [order](get-order) that this refund belongs to, if applicable.
      - `href` string, required — The actual URL string.
      - `type` string, required — The content type of the page or endpoint the URL points to.
    - `settlement` object, nullable — The API resource URL of the [settlement](get-settlement) this refund has been settled with. Not present if not yet settled.
      - `href` string — The actual URL string.
      - `type` string — The content type of the page or endpoint the URL points to.
    - `documentation` object — In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
      - `href` string, required — The actual URL string.
      - `type` string, required — The content type of the page or endpoint the URL points to.

## Response `201`

The newly created refund object.

## Other responses

- `404` — No entity with this ID exists.
- `422` — The request contains issues. For example, if the refund amount is missing.
- `429` — Rate Limit has been reached.

---

[API](https://skmtc.net/mollie/apis/accepting-payments.md) · [All operations](https://skmtc.net/mollie/apis/accepting-payments/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mollie/accepting-payments/revisions/4b45df3039ef/schema)
