---
title: REFUND Order
slug: refund-order
icon: 🟩
createdAt: 2022-03-23T02:16:26.000Z
---



To refund an order, POST with the order id, payment method, ids, and refund amounts with your private key from your server.

You have 2 options (listed below) when processing refunds:

1. &#x20;**Refund Order** - Simply provide the refund amount.  If the refund amount is less than the total order amount and there are more than 1 payment method, we'll use the Store Configurations to determine which payment method to refund first
2. **Refund Order By Individual Payment Methods** - Specify the refund amount PER payment method

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://test-api.featherpay.io/api/v1/orders/{orderId}/refundByOrder",
  "name": "Refund Order",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "hjzEsNC_MACjAWN5_NhC1",
        "code": "{\n    \"success\":true,\n    \"orderId\":\"01FYXZBEZ19YJVVHKS32HY6A3R\",\n    \"paymentRefunds\":[\n        {\n            \"orderPaymentId\":\"01FYXZRHR78ZARN6NZCZ8M7RE2\",\n            \"refundAmount\":1000\n        }\n    ],\n    \"paymentResponses\":[\n        {\n            \"message\":\"This transaction has been refunded.\",\n            \"paymentType\":\"Manual\",\n            \"paymentId\":\"01FYXZRHR78ZARN6NZCZ8M7RE2\",\n            \"statusCode\":200,\n            \"success\":true\n        }\n    ]\n}",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "hjzEsNC_MACjAWN5_NhC1"
  },
  "examples": {
    "languages": [
      {
        "id": "UeoyUiDH4DgVQc_ubFyoV",
        "code": "curl -X POST \\\n  --url 'https://test-api.featherpay.io/api/v1/orders/:orderId/refundByOrder' \\\n  --header 'content-type: application/json;charset=UTF-8' \\\n  --header 'accept: application/json' \\\n  --header 'X-Api-Key: {Secret API Key}' \\\n  --header 'X-Store-Id: {Store ULID}' \\\n  --data '{\n      \"refundAmount\":1000\n}'",
        "language": "curl",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "UeoyUiDH4DgVQc_ubFyoV"
  },
  "description": "Simple Refund of Order only specifying the amount to be refunded",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://test-api.featherpay.io/api/v1/orders/{orderId}/refund",
  "name": "Refund Order By Individual Payment Methods",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "H1OOfLV5gKL2EWmFAi-sx",
        "code": "[\n  {\n    \"message\": \"This transaction has been approved.\",\n    \"paymentType\": \"Credit / Debit Card\",\n    \"paymentId\": \"01EY8XRZZZ7JPYQWZFANX0N5CM\",\n    \"statusCode\": 200\n  },\n  {\n    \"message\": \"This transaction has been approved.\",\n    \"paymentType\": \"Credit / Debit Card\",\n    \"paymentId\": \"01EY8ZSZTV1KK7XZBKA2H0TJSN\",\n    \"statusCode\": 200\n  }\n]",
        "language": "200",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "H1OOfLV5gKL2EWmFAi-sx"
  },
  "examples": {
    "languages": [
      {
        "id": "YMorlkPhj-zWiepmW_1CA",
        "code": "curl -X POST \\\n  --url 'https://test-api.featherpay.io/api/v1/orders/:orderId/refund' \\\n  --header 'Accept: application/json' \\\n  --header 'X-Api-Key: {Secret API Key}' \\\n  --header 'X-Store-Id: {Store ULID}' \\\n  --data '[\n    {\n      \"orderPaymentId\": \"01EY8XRZZZ7JPYQWZFANX0N5CM\",\n      \"refundAmount\": 100000\n    },\n    {\n      \"orderPaymentId\": \"01EY8ZSZTV1KK7XZBKA2H0TJSN\",\n      \"refundAmount\": 400000\n    }\n  ]'",
        "language": "curl",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "YMorlkPhj-zWiepmW_1CA"
  },
  "description": "Refund an order by specifying the refund amount per order payment",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::





