---
title: "Create payment refund"
method: POST
path: "/v2/payments/{paymentId}/refunds"
tags: ["Refunds API"]
---

# Create payment refund

`POST /v2/payments/{paymentId}/refunds`

Creates a refund for a specific payment. The refunded amount is credited to your customer usually either via a bank
transfer or by refunding the amount to your customer's credit card.

## Headers

- `idempotency-key` string

## Request body

- RefundRequest
  - `resource` string, required — Indicates the response contains a refund object. Will always contain the string `refund` for this endpoint.
  - `id` string, required
  - `mode` 'live' | 'test', required — Whether this entity was created in live mode or in test mode.
  - `description` string, required — The description of the refund that may be shown to your customer, depending on the payment method used.
  - `amount` Amount, 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.
  - `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[]
  - `paymentId` string, required
  - `settlementId` string
  - `status` 'queued' | 'pending' | 'processing' | 'refunded' | 'failed' | 'canceled', required
  - `createdAt` string, required — The entity's date and time of creation, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
  - `externalReference` object
    - `type` 'acquirer-reference' — Specifies the reference type
    - `id` string — Unique reference from the payment provider
  - `reverseRouting` boolean, nullable — *This feature is only available to marketplace operators.* With Mollie Connect you can charge fees on payments that your app is processing on behalf of other Mollie merchants, by providing the `routing` object during [payment creation](create-payment). When creating refunds for these *routed* payments, by default the full amount is deducted from your balance. If you want to pull back the funds that were routed to the connected merchant(s), you can set this parameter to `true` when issuing a full refund. For more fine-grained control and for partial refunds, use the `routingReversals` parameter instead.
  - `routingReversals` object[], nullable — *This feature is only available to marketplace operators.* When creating refunds for *routed* payments, by default the full amount is deducted from your balance. If you want to pull back funds from the connected merchant(s), you can use this parameter to specify what amount needs to be reversed from which merchant(s). If you simply want to fully reverse the routed funds, you can also use the `reverseRouting` parameter instead.
    - `amount` Amount — 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.
    - `source` object — Where the funds will be pulled back from.
      - `type` 'organization' — The type of source. Currently only the source type `organization` is supported.
      - `organizationId` string
  - `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`.
  - `_links` object, required — An object with several relevant URLs. Every URL object will contain an `href` and a `type` field.
    - `self` Url, required — 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.
    - `payment` Url, required — 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.
    - `settlement` UrlNullable, nullable — In v2 endpoints, URLs are commonly represented as objects with an `href` and `type` field.
      - `href` string — The actual URL string.
      - `type` string — The content type of the page or endpoint the URL points to.
    - `documentation` Url, required — 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.
- `409` — Two identical refund requests were submitted on the same payment in short succession.
- `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/mollie-api.md) · [All operations](https://skmtc.net/mollie/apis/mollie-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mollie/mollie-api/revisions/d2a3bd80c1fa/schema)
