# Cancel Settlement

**Method:** `PATCH`

**Path:** `/api/pay/v1/orders/{orderId}/settlementId/{settlementId}/cancel`

**Category:** Split Settlements

**Authentication:** Required

## Description

Cancels a held split settlement for a specific order.


## Path Parameters

- `orderId` (`string`) **required** — The unique order identifier.
- `settlementId` (`string`) **required** — The unique split settlement identifier.

## Responses

- `200` — Settlement cancelled successfully.
- `401` — 
- `404` — 
- `422` — Unprocessable Entity — invalid cancel request.

### Response Schema

- `data` (`object`)
  - `order_id` (`string`)
  - `merchant_order_reference` (`string`)
  - `type` (`CHARGE | REFUND`)
  - `status` (`CREATED | PENDING | PROCESSED | AUTHORIZED | CANCELLED | ATTEMPTED | FAILED | FULLY_REFUNDED | PARTIALLY_REFUNDED`)
  - `merchant_id` (`string`)
  - `order_amount` (`object`)
    - `value` (`integer`)
    - `currency` (`string`)

  - `pre_auth` (`boolean`)
  - `allowed_payment_methods` (`string[]`)
  - `notes` (`string`)
  - `purchase_details` (`object`)
    - `customer` (`object`)
      - `email_id` (`string`)
      - `first_name` (`string`)
      - `last_name` (`string`)
      - `customer_id` (`string`)
      - `country_code` (`string`)
      - `mobile_number` (`string`)
      - `billing_address` (`object`) — Physical address.
        - `address1` (`string`) — Address line 1.
        - `address2` (`string`) — Address line 2.
        - `address3` (`string`) — Address line 3.
        - `pincode` (`string`) — Postal/ZIP code.
        - `city` (`string`) — City name.
        - `state` (`string`) — State or province.
        - `country` (`string`) — Country name.
        - `full_name` (`string`) — Full name of the address holder.
        - `adddress_type` (`string`) — Type of address (e.g., Home, Office).
        - `address_category` (`billing | shipping`) — Category of the address.

      - `shipping_address` (`object`) — Physical address.
        - `address1` (`string`) — Address line 1.
        - `address2` (`string`) — Address line 2.
        - `address3` (`string`) — Address line 3.
        - `pincode` (`string`) — Postal/ZIP code.
        - `city` (`string`) — City name.
        - `state` (`string`) — State or province.
        - `country` (`string`) — Country name.
        - `full_name` (`string`) — Full name of the address holder.
        - `adddress_type` (`string`) — Type of address (e.g., Home, Office).
        - `address_category` (`billing | shipping`) — Category of the address.

      - `is_edit_customer_details_allowed` (`boolean`)

    - `merchant_metadata` (`object`) — Arbitrary key-value pairs for merchant use. Maximum 10 pairs, 256 characters each.
    - `split_info` (`object`)
      - `split_type` (`string`)
      - `split_details` (`SplitSettlementDetail[]`)
        - `split_merchant_id` (`string`) — Unique identifier of the partner merchant.
        - `split_settlement_id` (`string`) — Unique identifier of the split settlement.
        - `amount` (`object`)
          - `value` (`integer`)
          - `currency` (`string`)

        - `on_hold` (`boolean`) — Whether the settlement is on hold.
        - `status` (`RELEASED | HOLD`) — Split settlement status.
        - `updated_at` (`string`)
        - `release_amount` (`object`) — Release amount (present only when status is RELEASED).
          - `value` (`integer`)
          - `currency` (`string`)




  - `payments` (`SplitPaymentObject[]`)
    - `id` (`string`)
    - `merchant_payment_reference` (`string`)
    - `status` (`PENDING | AUTHORIZED | CANCELLED | PROCESSED | FAILED`)
    - `payment_amount` (`object`)
      - `value` (`integer`)
      - `currency` (`string`)

    - `payment_method` (`CARD | UPI | POINTS | NETBANKING | WALLET`)
    - `payment_option` (`object`)
      - `card_details` (`object`)
        - `card_type` (`DEBIT | CREDIT`)
        - `network_name` (`string`)
        - `issuer_name` (`string`)
        - `product_name` (`string`) — Card product name.
        - `card_category` (`string`)
        - `country_code` (`string`)
        - `token_txn_type` (`ALT_TOKEN | NETWORK_TOKEN | ISSUER_TOKEN`)
        - `last4_digit` (`string`)
        - `save` (`boolean`)
        - `is_native_otp_eligible` (`boolean`)


    - `acquirer_data` (`object`)
      - `approval_code` (`string`)
      - `acquirer_reference` (`string`)
      - `rrn` (`string`)
      - `is_aggregator` (`boolean`)

    - `capture_data` (`object[]`) — Capture details. Present only for pre-authorized orders.
      - `merchant_capture_reference` (`string`)
      - `capture_amount` (`object`)
        - `value` (`integer`)
        - `currency` (`string`)

      - `created_at` (`string`)

    - `additional_detail` (`object`) — Additional details related to the payment.
      - `source_ip` (`string`) — IP address of the merchant.

    - `created_at` (`string`)
    - `updated_at` (`string`)

  - `created_at` (`string`)
  - `updated_at` (`string`)
  - `integration_mode` (`SEAMLESS | REDIRECT`)
  - `payment_retries_remaining` (`integer`)


### Example Response

```json
{
  "data": {
    "order_id": "v1-250513055632-aa-rjIIWX",
    "merchant_order_reference": "bc2ddc75-eebb-452c-a034-ba9a836ddf17",
    "type": "CHARGE",
    "status": "PROCESSED",
    "merchant_id": "111370",
    "order_amount": {
      "value": 21000,
      "currency": "INR"
    },
    "pre_auth": false,
    "allowed_payment_methods": [
      "CARD",
      "UPI",
      "NETBANKING",
      "POINTS",
      "WALLET"
    ],
    "notes": "order1",
    "purchase_details": {
      "customer": {
        "email_id": "[email protected]",
        "first_name": "Kevin",
        "last_name": "Bob",
        "customer_id": "192212",
        "country_code": "91",
        "mobile_number": "9876543210",
        "billing_address": {
          "address1": "10 Downing Street Westminster London",
          "address2": "Oxford Street Westminster London",
          "address3": "Baker Street Westminster London",
          "pincode": "51524036",
          "city": "Westminster",
          "state": "Westminster",
          "country": "London",
          "full_name": "Kevin Bob",
          "adddress_type": "Home",
          "address_category": "billing"
        },
        "shipping_address": {
          "address1": "10 Downing Street Westminster London",
          "address2": "Oxford Street Westminster London",
          "address3": "Baker Street Westminster London",
          "pincode": "51524036",
          "city": "Westminster",
          "state": "Westminster",
          "country": "London",
          "full_name": "Kevin Bob",
          "adddress_type": "Home",
          "address_category": "billing"
        },
        "is_edit_customer_details_allowed": false
      },
      "merchant_metadata": {
        "clientId": "DD",
        "transactionReferenceNo": "pine-1223",
        "merchantId": "1234",
        "tid": "9000990",
        "acquirerName": "HDFC_FSS",
        "isOfferDisplayRequired": "true",
        "OfferData": "UHJvZHVjdF9Db2RlPSIgIiZQcm9kdWN0X05hbWU9IiImUGF5bWVudF9Nb2RlPUJhbmsgRU1JJkNhcmRfVHlwZT1EZWJpdCBDYXJkJkJhbmtfTmFtZT1IREZDIERlYml0JkVNSV9UZW51cmU9NiZJbnRlcmVzdF9SYXRlPTkuMCZJbnRlcmVzdF9BbW91bnQ9MTM4MTQwJk1vbnRobHlfSW5zdGFsbG1lbnQ9ODk0NjkwJkF1dGhvcml6YXRpb25fQW1vdW50PTEwMCZMb2FuX2Jvb2tpbmdfQW1vdW50PTUyMzAwMDAmSW50ZXJlc3RfQ2FzaGJhY2tfQW1vdW50PTAmSW50ZXJlc3RfQ2FzaGJhY2tfVHlwZT1EZWZlcnJlZCZBZGRpdGlvbmFsX0Nhc2hiYWNrPSIiJkFkZGl0aW9uYWxfQ2FzaGJhY2tfVHlwZT0iIiZEZXNjcmlwdGlvbj1CYW5rIEVNSSZQcm9kdWN0X1ZhbHVlPTUyMzAwMDA",
        "tenant_id": "PGATPOS",
        "is_offer_validation_required": "true"
      },
      "split_info": {
        "split_type": "AMOUNT",
        "split_details": [
          {
            "split_merchant_id": "111370",
            "split_settlement_id": "v1-250513055632-aa-rjIIWX-ss-f",
            "amount": {
              "value": 10000,
              "currency": "INR"
            },
            "on_hold": false,
            "status": "RELEASED",
            "updated_at": "2025-05-13T05:58:15.960Z",
            "release_amount": {
              "value": 10000,
              "currency": "INR"
            }
          }
        ]
      }
    },
    "payments": [
      {
        "id": "v1-250513055632-aa-rjIIWX-cc-a",
        "merchant_payment_reference": "d1ec1a52-45fb-47be-bd7a-0e0d930f26b8",
        "status": "PROCESSED",
        "payment_amount": {
          "value": 21000,
          "currency": "INR"
        },
        "payment_method": "CARD",
        "payment_option": {
          "card_details": {
            "card_type": "CREDIT",
            "network_name": "VISA",
            "issuer_name": "HDFC",
            "product_name": "Visa Platinum",
            "card_category": "",
            "country_code": "IND",
            "token_txn_type": "ALT_TOKEN",
            "last4_digit": "1091",
            "save": false,
            "is_native_otp_eligible": true
          }
        },
        "acquirer_data": {
          "approval_code": "831000",
          "acquirer_reference": "7471158294616880303814",
          "rrn": "513205569234",
          "is_aggregator": true
        },
        "capture_data": [
          {
            "merchant_capture_reference": "5742ef1e-4606-4c11-5757-705f4d415b6d",
            "capture_amount": {
              "value": 21000,
              "currency": "INR"
            },
            "created_at": "2024-07-11T11:52:12.484105Z"
          }
        ],
        "additional_detail": {
          "source_ip": "52.66.76.63"
        },
        "created_at": "2025-05-13T05:56:56.703Z",
        "updated_at": "2025-05-13T05:57:10.422Z"
      }
    ],
    "created_at": "2025-05-13T05:56:32.655Z",
    "updated_at": "2025-05-13T05:58:15.963Z",
    "integration_mode": "SEAMLESS",
    "payment_retries_remaining": 9
  }
}
```

---

Reference: https://localhost:3000/api/split-settlements/cancel-settlement
