> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.mangopay.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mangopay.com/_mcp/server.

# Reverse an Intent Refund

POST https://api.sandbox.mangopay.com/v3.0/{ClientId}/payins/intents/{IntentId}/refunds/{RefundId}/reverse
Content-Type: application/json

Declare the reversal of a refund processed by a third-party PSP

This endpoint allows you to reverse an Intent Refund in full or in part if the refund processed by the third-party PSP was not successful and the funds were returned to the platform.

This endpoint effectively changes the Intent Refund `Status` to `REFUND_REVERSED` and re-calculates the `RefundedAmount` of the `LineItem`.

You can only reverse the same amount that was refunded.

Reference: https://docs.mangopay.com/api-reference/intents/reverse-intent-refund

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token. If your platform is using a [proxy](/guides/sca/proxy-management) to take SCA-triggering action on behalf of users, you also need to integrate [mTLS authentication](/guides/sca/platform) and use the `api-mtls` base URL.

## Servers

- `https://api.sandbox.mangopay.com` (Sandbox, default)
- `https://api.mangopay.com` (Production)
- `https://api-mtls.sandbox.mangopay.com` (mTLS Sandbox)
- `https://api-mtls.mangopay.com` (mTLS Production)

## Request

### Path parameters

- `ClientId` (string, required) — Platform's API account identifier, associated with the API key.
- `IntentId` (string, required) — The unique identifier of the Intent.
- `RefundId` (string, required)

### Body (application/json)

This endpoint expects a CreateAnIntentRefundRequest.

- `ExternalData` (ExternalProcessingDateExternalProviderReferenceExternalMerchantReference2, optional) — Information about the transaction authorization processed by the third-party PSP.
- `Amount` (integer, optional) — The amount of the Refund, required for a partial refund. The Refund `Amount` must equal the sum of the `Amount` values refunded for all line items.
- `Currency` (string, optional) — The currency of the intent.
- `PlatformFeesAmount` (integer, optional) — The amount of fees to be diverted to the platform's Fees Wallet when the Intent is split. This value can be overridden when the Split is created. The `PlatformFeesAmount` value must the sum of all line item `Seller.FeesAmount` values.
- `LineItems` (list of CreateAnIntentRefundRequestLineItemsItems, optional) — Information about the amount refunded for each line item, required for a partial refund.
- `Tag` (string, optional) — Max. length: 255 characters Custom data that you can add to this object, such as unique identifiers in your system. To store multiple values, you can serialize them into a single string, for example a JSON object: `"{\"id_1\":AB123,\"id_2\":DE456}"`.

## Response

### 200

Success

- `Id` (string, optional) — The unique identifier of the intent.
- `Amount` (integer, optional) — The full amount authorized in the Intent, which must equal the sum of the total amounts of all `LineItems`.
- `AvailableAmountToSplit` (integer, optional) — The remaining amount of the Intent that can be split and transferred to the sellers' wallets.
- `UnfundedAmount` (integer, optional) — The amount needing to be settled to the Platform's technical wallet before the Intent Splits can be executed.
- `Currency` (string, optional) — The currency of the intent.
- `PlatformFeesAmount` (integer, optional) — The amount of fees to be diverted to the platform's Fees Wallet when the Intent is split. This value can be overridden when the Split is created. The `PlatformFeesAmount` value must the sum of all line item `Seller.FeesAmount` values.
- `Status` (string, optional) — The status of the Intent, as declared by the platform through Intent Captures, Refunds (and reversals), or Disputes (and decisions). Where partial actions occur, the top-level Intent `Status` may differ from the `Status` of Intent `LineItems`. Intent `Status` values: - `AUTHORIZED` – The Intent `Amount` was authorized for acquisition by the PSP and can be captured or canceled. - `PARTIALLY_CAPTURED` – Part of the Intent `Amount` from one or more `LineItems` was captured. The other parts are either still available for capture or cancel. - `CAPTURED` – All of the Intent `Amount` was captured. Part of it may have been subsequently refunded or disputed. - `CANCELLED` – All of the Intent `Amount` was canceled. - `REFUNDED` – All of the `CapturedAmount` of all `LineItems` was refunded. - `REFUND_REVERSED` – The refund could not be completed and the funds were returned to the platform. - `DISPUTED` – All of the `CapturedAmount` of all `LineItems` was disputed. - `DEFENDED` – The dispute is being defended by the platform. - `DISPUTED_WON` – The dispute was resolved in favor of the platform. - `DISPUTED_LOST` – The dispute was resolved against the platform.
- `NextActions` (string, optional) — The possible next actions on the intent.
- `ExternalData` (ExternalProcessingDateExternalProviderReferenceExternalMerchantReference, optional) — Information about the transaction authorization processed by the third-party PSP.
- `Buyer` (BuyerId, optional) — Information about the buyer.
- `LineItems` (list of IdTotalLineItemAmountCapturedAmount, optional) — Information about the line items included in the intent action.
- `CreationDate` (integer, optional) — Unix timestamp (UTC) of the date and time the object was created.
- `ExecutionDate` (integer, optional) — Unix timestamp (UTC) of the date and time the Intent moved to `AUTHORIZED`.
- `Refund` (Id_IntentRefund, optional) — Information about the Refund.

## Types

### ExternalProcessingDateExternalProviderReferenceExternalMerchantReference2

Information about the transaction authorization processed by the third-party PSP.

- `ExternalProcessingDate` (integer, required) — The date at which the transaction authorization was created.
- `ExternalProviderReference` (string, required) — The unique identifier of the transaction at the provider level.
- `ExternalProviderName` (string, required) — The [supported third-party PSP](/api-reference/echo/supported-providers) processing the transaction. **Note:** The uppercase value is expected. The API returns the sentence-case value.
- `ExternalMerchantReference` (string, optional) — The unique identifier of the transaction at the merchant level.
- `ExternalProviderPaymentMethod` (string, optional) — One of the [supported payment methods](/api-reference/echo/supported-payment-methods) used to process the transaction.

### CreateAnIntentRefundRequestLineItemsItems

- `Id` (string, required) — The unique identifier of the line item in Mangopay ecosystem.
- `Amount` (integer, required) — The amount of the refund. The sum of the Refund's `LineItems.Amount` values must equal the `Amount` of the Refund.

### ExternalProcessingDateExternalProviderReferenceExternalMerchantReference

Information about the transaction authorization processed by the third-party PSP.

- `ExternalProcessingDate` (integer, optional) — The date at which the transaction authorization was created.
- `ExternalProviderReference` (string, optional) — The unique identifier of the transaction at the provider level.
- `ExternalMerchantReference` (string, optional) — The unique identifier of the transaction at the merchant level.
- `ExternalProviderName` (string, optional) — The [supported third-party PSP](/api-reference/echo/supported-providers) processing the transaction. **Note:** The uppercase value is expected. The API returns the sentence-case value.
- `ExternalProviderPaymentMethod` (string, optional) — One of the [supported payment methods](/api-reference/echo/supported-payment-methods) used to process the transaction.

### BuyerId

Information about the buyer.

- `Id` (string, optional) — If it exists, the unique identifier of the Mangopay user making the payment via the third-party PSP. Must be a valid Mangopay `UserId`.

### IdTotalLineItemAmountCapturedAmount

- `Id` (string, optional) — The unique identifier of the line item in Mangopay's ecosystem.
- `TotalLineItemAmount` (integer, optional) — The total amount of the line item calculated as ((`UnitAmount` x `Quantity`) - `DiscountAmount`).
- `CapturedAmount` (integer, optional) — The item total `CAPTURED` amount
- `RefundedAmount` (integer, optional) — The item total `REFUNDED` amount
- `DisputedAmount` (integer, optional) — The item total `DISPUTED` amount.
- `SplitAmount` (integer, optional) — The item total `COMPLETED` amount.
- `UnfundedSellerAmount` (integer, optional) — The amount needing to be settled to the Platform's technical wallet before the Intent Splits can be executed for this seller.

### Id_IntentRefund

Information about the Refund.

- `Id` (string, optional) — The unique identifier of the Refund.

## Examples

### Full reversal

**Request**

```json
{
  "body": {
    "ExternalData": {
      "ExternalMerchantReference": "order-{{$guid}}",
      "ExternalProcessingDate": 1769800102,
      "ExternalProviderName": "Stripe",
      "ExternalProviderPaymentMethod": "MASTERCARD",
      "ExternalProviderReference": "reverse-stripe-{{$guid}}"
    }
  }
}
```

**Response**

```json
{
  "Id": "int_019c105a-cd37-73bf-9245-e4e7a76310d5",
  "Amount": 20000,
  "AvailableAmountToSplit": 20000,
  "UnfundedAmount": 0,
  "Currency": "EUR",
  "PlatformFeesAmount": 0,
  "Status": "REFUND_REVERSED",
  "NextActions": "REFUND, DISPUTE",
  "ExternalData": {
    "ExternalProcessingDate": 1769800920,
    "ExternalProviderReference": "refund-stripe-e9e318a2-2f5e-4dec-90a6-010854f16861",
    "ExternalMerchantReference": "order-1f895705-f0e1-4c68-9822-4cf1c62678f6",
    "ExternalProviderName": "Stripe",
    "ExternalProviderPaymentMethod": "MASTERCARD"
  },
  "Buyer": {
    "Id": "user_m_01KF3087EDXEAK8VPD9DTMZW8N"
  },
  "LineItems": [
    {
      "Id": "int_li_019c105a-cd39-7422-a8ce-cf79862a68f2",
      "TotalLineItemAmount": 10000,
      "CapturedAmount": 10000,
      "RefundedAmount": 0,
      "DisputedAmount": 0,
      "SplitAmount": 0,
      "UnfundedSellerAmount": 0,
      "CancelledAmount": 0
    },
    {
      "Id": "int_li_019c105a-cd39-7422-a8ce-cf79862a68f3",
      "TotalLineItemAmount": 10000,
      "CapturedAmount": 10000,
      "RefundedAmount": 0,
      "DisputedAmount": 0,
      "SplitAmount": 0,
      "UnfundedSellerAmount": 0,
      "CancelledAmount": 0
    },
    {
      "Id": "int_li_019c105a-cd39-7422-a8ce-cf79862a68f2",
      "TotalLineItemAmount": 10000,
      "CapturedAmount": 10000,
      "RefundedAmount": 0,
      "DisputedAmount": 0,
      "SplitAmount": 0,
      "UnfundedSellerAmount": 0,
      "CancelledAmount": 0
    },
    {
      "Id": "int_li_019c105a-cd39-7422-a8ce-cf79862a68f3",
      "TotalLineItemAmount": 10000,
      "CapturedAmount": 10000,
      "RefundedAmount": 0,
      "DisputedAmount": 0,
      "SplitAmount": 0,
      "UnfundedSellerAmount": 0,
      "CancelledAmount": 0
    }
  ],
  "CreationDate": 1769800912,
  "ExecutionDate": 1769800924,
  "Refund": {
    "Id": "int_refund_019c105a-ee2a-7422-9058-96da3cf06b94"
  }
}
```

### Partial reversal

**Request**

```json
{
  "body": {
    "Amount": 10000,
    "Currency": "EUR",
    "ExternalData": {
      "ExternalMerchantReference": "order-{{$guid}}",
      "ExternalProcessingDate": 1769800102,
      "ExternalProviderName": "Stripe",
      "ExternalProviderPaymentMethod": "MASTERCARD",
      "ExternalProviderReference": "reverse-stripe-{{$guid}}"
    },
    "LineItems": [
      {
        "Amount": 10000,
        "Id": "int_li_019c104e-6361-7f41-b3bf-189c6a305604"
      }
    ],
    "PlatformFeesAmount": 0
  }
}
```

**Response**

```json
{
  "Id": "int_019c104e-6360-7540-a303-80c6c252827c",
  "Amount": 10000,
  "AvailableAmountToSplit": 20000,
  "UnfundedAmount": 0,
  "Currency": "EUR",
  "PlatformFeesAmount": 0,
  "Status": "CAPTURED",
  "NextActions": "REFUND, DISPUTE",
  "ExternalData": {
    "ExternalProcessingDate": 1769800102,
    "ExternalProviderReference": "refund-stripe-34a4fd98-83a6-4498-b4d4-28f4e0c916fd",
    "ExternalMerchantReference": "refund-order-6e66b81d-8700-4375-956a-d7d70caef902",
    "ExternalProviderName": "Stripe",
    "ExternalProviderPaymentMethod": "MASTERCARD"
  },
  "Buyer": {
    "Id": "user_m_01KF3087EDXEAK8VPD9DTMZW8N"
  },
  "LineItems": [
    {
      "Id": "int_li_019c104e-6361-7f41-b3bf-189c6a305604",
      "TotalLineItemAmount": 10000,
      "CapturedAmount": 10000,
      "RefundedAmount": 0,
      "DisputedAmount": 0,
      "SplitAmount": 0,
      "UnfundedSellerAmount": 0,
      "CancelledAmount": 0
    },
    {
      "Id": "int_li_019c104e-6361-7f41-b3bf-189c6a305605",
      "TotalLineItemAmount": 10000,
      "CapturedAmount": 10000,
      "RefundedAmount": 0,
      "DisputedAmount": 0,
      "SplitAmount": 0,
      "UnfundedSellerAmount": 0,
      "CancelledAmount": 0
    },
    {
      "Id": "int_li_019c104e-6361-7f41-b3bf-189c6a305604",
      "TotalLineItemAmount": 10000,
      "CapturedAmount": 10000,
      "RefundedAmount": 0,
      "DisputedAmount": 0,
      "SplitAmount": 0,
      "UnfundedSellerAmount": 0,
      "CancelledAmount": 0
    },
    {
      "Id": "int_li_019c104e-6361-7f41-b3bf-189c6a305605",
      "TotalLineItemAmount": 10000,
      "CapturedAmount": 10000,
      "RefundedAmount": 0,
      "DisputedAmount": 0,
      "SplitAmount": 0,
      "UnfundedSellerAmount": 0,
      "CancelledAmount": 0
    }
  ],
  "CreationDate": 1769800098,
  "ExecutionDate": 1769800836,
  "Refund": {
    "Id": "int_refund_019c104e-7294-71af-9952-b34f2fc5cca0"
  }
}
```