> ## Documentation Index
> Fetch the complete documentation index at: https://razorpay.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch Instant Settlement With ID

> Fetch Instant Settlement with ID using Razorpay Curlec Payments API.

Available in
🇮🇳 India
🇲🇾 Malaysia
🇸🇬 Singapore
🇺🇸 United States

Use this endpoint to retrieve the details of a particular Instant Settlement.

```bash Curl theme={null}
curl -u <YOUR_KEY>:<YOUR_SECRET>\
- X GET \
https://api.razorpay.com/v1/settlements/ondemand/setlod_FNj7g2YS5J67Rz
```

```java Java theme={null}
RazorpayClient razorpay = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]");

String settlementId = "setlod_FNj7g2YS5J67Rz";

Settlement settlement = razorpay.settlement.fetchDemandSettlement(settlementId);
```

```python Python theme={null}
import razorpay
client = razorpay.Client(auth=("YOUR_ID", "YOUR_SECRET"))

client.settlement.fetch_ondemand_settlement_id(settlementId)
```

```ruby Ruby theme={null}
require "razorpay"
Razorpay.setup('YOUR_KEY_ID', 'YOUR_SECRET')

settlementId = "setlod_FNj7g2YS5J67Rz"

para_attr = {
  "expand[]": "ondemand_payouts"
}

Razorpay::Settlement.fetch_ondemand_settlement_by_id(settlementId, para_attr);
```

```go Go theme={null}
import ( razorpay "github.com/razorpay/razorpay-go" )
client := razorpay.NewClient("YOUR_KEY_ID", "YOUR_SECRET")

body, err := client.Settlement.FetchOnDemandSettlementById("<settlementId>", nil, nil)
```

```php PHP theme={null}
$api = new Api($key_id, $secret);

$api->settlement->fetch($settlementId)->fetchOndemandSettlementById();
```

```javascript Node.js theme={null}
var instance = new Razorpay({ key_id: 'YOUR_KEY_ID', key_secret: 'YOUR_SECRET' })

instance.settlements.fetchOndemandSettlementById(settlementId);
```

```csharp .NET theme={null}
RazorpayClient client = new RazorpayClient("[YOUR_KEY_ID]", "[YOUR_KEY_SECRET]");

string settlementId = "setl_Z6t7VFTb9xXXXX";

Settlement settlement = client.Settlement.FetchDemandSettlement(settlementId);
```

```bash CLI theme={null}
razorpay settlements instant-fetch setlod_ABC123
```

```json Success theme={null}
{
  "id": "setlod_FNj7g2YS5J67Rz",
  "entity": "settlement.ondemand",
  "amount_requested": 200000,
  "amount_settled": 199410,
  "amount_pending": 0,
  "amount_reversed": 0,
  "fees": 590,
  "tax": 90,
  "currency": "INR",
  "settle_full_balance": false,
  "status": "processed",
  "description": "Need this to make vendor payments.",
  "notes": {
    "notes_key_1": "Tea, Earl Grey, Hot",
    "notes_key_2": "Tea, Earl Grey, decaf."
  },
  "created_at": 1596771429
}
```

```json Failure theme={null}
{
    "error": {
        "code": "BAD_REQUEST_ERROR",
        "description": "The id provided does not exist",
        "source": "business",
        "step": "payment_initiation",
        "reason": "input_validation_failed",
        "metadata": {}
    }
}
```

## Path Parameters

**id** `string` *required*

The unique identifier for the instant settlement transaction. For example, `setlod_FNj7g2YS5J67Rz`.

## Response Parameters

**id** `string`

The unique identifier of the instant settlement transaction. For example, `setlod_FNj7g2YS5J67Rz`.

**entity** `string`

Indicates the type of entity. Here it is `settlement.ondemand`.

**amount\_requested** `integer`

The settlement amount, in paise, requested by you. For example, `200000`.

**amount\_settled** `integer`

Total amount (minus fees and tax), in paise, settled to the bank account. For example, `199410`.

**amount\_pending** `integer`

Portion of the requested amount, in paise, yet to be settled to you.

**amount\_reversed** `integer`

Portion of the requested amount, in paise, that was not settled to you. This amount is reversed to your PG current balance.

**fees** `integer`

Total amount (fees+tax), in paise, deducted for the instant settlement. For example, `590`.

**tax** `integer`

Total tax, in paise, charged for the fee component. For example, `90`.

**currency** `string`

The 3-letter ISO currency code for the settlement. Here it is `INR`.

**settle\_full\_balance** `boolean`

Possible values:

* `true`:  Razorpay Curlec will settle the maximum amount possible. Values passed in the `amount` parameter are ignored.
* `false` (default): Razorpay Curlec will settle the amount requested in the `amount` parameter.

**status** `string`

Indicates the state of the instant settlement. Possible values:

* `created`: The instant settlement request has been created.
* `initiated`: The instant settlement process has been initiated.
* `partially_processed`: The instant settlement is being processed.
* `processed`: The instant settlement has been processed and the amount has been transferred to your bank account.
* `reversed`: The instant settlement could not be processed for some reason and the amount has been transferred back to your PG balance.

**description** `string`

This is a custom note you can pass for the instant settlement for your reference. For example, `Need this to make vendor payments.`.

**notes** `object`

Key-value pair that can be used to store additional information about the entity. Maximum 15 key-value pairs, 256 characters (maximum) each. For example, `"note_key": "Beam me up Scotty”`.

**created\_at** `integer`

Unix timestamp at which the instant settlement was created. For example, `1596771429`.

**ondemand\_payouts** `object`

List of payouts created for the instant settlement.

**entity** `string`

Indicates the type of `ondemand_payouts` entity. Here it is `collection`.

**count** `integer`

The number of items in the array. For example, `1`.

**items** `array`

List of payouts created for the instant settlement.

**id** `string`

The unique identifier for the payout. For example, `setlodp_FNj7g2cbvw8ueO`.

**entity** `string`

Indicates the type of `items` entity. Here it is `settlement.ondemand_payout`.

**initiated\_at** `integer`

Unix timestamp at which the payout was initiated. For example, `1596771430`.

**processed\_at** `integer`

Unix timestamp at which the payout was processed. For example, `1596778752`.

**reversed\_at** `integer`

Unix timestamp at which the payout was reversed. For example, `1596778752`.

**amount** `integer`

The amount, in paise, settled through this payout. For example, `200000`.

**amount\_settled** `integer`

Amount (minus fees and tax), in paise, settled through this payout. For example, `199410`.

**fees** `integer`

Amount (fees+tax), in paise, deducted for this payout. For example, `590`.

**tax** `integer`

Tax charged, in paise, for the fee component. For example, `90`.

**utr** `string`

The unique transaction number linked to a payout.

**status** `string`

Status of the payout. Possible values:

* `created`: The payout has been created.
* `initiated`: The payout has been initiated.
* `processed`: The payout has been processed. The amount has been transferred to your bank account.
* `reversed`: The payout has been reversed. The amount has been transferred back to your PG balance.

**created\_at** `integer`

Unix timestamp at which the payout was created.

## Errors

> [accordion] The API \{key/secret} provided is invalid.
>
> **Code:** `4xx`
>
> The API credentials passed in the API call differ from the ones generated on the Dashboard.
>
> **Solution:** The API keys must be active and entered correctly with no whitespace before or after.

> [accordion] The id provided does not exist
>
> **Code:** `400`
>
> The settlement id does not belong to the requestor or does not exist.
>
> **Solution:** Use a valid settlement id that belongs to the requestor.

> [accordion] The requested URL was not found on the server.
>
> **Code:** `400`
>
> Instant Settlement is not enabled on the merchant account, so the endpoint is not routable.
>
> **Solution:** Enable Instant Settlements from the Razorpay Curlec Dashboard before calling this API.

> [accordion] Settlement not found.
>
> **Code:** `400`
>
> The settlement id was not found in the merchant's records. Distinct from `The id provided does not exist` — this fires when the id is well-formed but no matching settlement exists.
>
> **Solution:** Pass a valid Instant Settlement id (prefixed `setlod_`) returned from a previous Create Instant Settlement call, or use the fetch-all endpoint to list available ids.
