# Withdraw an LRS remittance back to the investor

This flow is used for fund withdrawals. When an end user requests to withdraw their overseas investments, you, as the Indian broker, initiate the withdrawal by providing the user's bank account details, which are treated as the beneficiary account. The withdrawal flow involves five steps:

1. **Create a Beneficiary** — register the user's bank account details as the beneficiary account.
2. **Create a Document** — upload the user's consent to withdraw the money.
3. **Get a Payout Quote** (optional) — show the investor an estimate of the INR they will receive.
4. **Create a Payout** — initiate the transfer to the beneficiary, referencing the beneficiary and the uploaded documents.
5. **Payout Success** — once the bank has processed the payout, its status changes to `success` and the finalized `destination_amount`, `mid_market_rate`, `taxes`, and `utr` are made available.


## Create a Beneficiary (V2)

Creates a beneficiary with structured nested objects for beneficiary details, address, and bank account information.

> **Note:**
- Create the LRS withdrawal beneficiary with `category` set to `"payout"` and `bank_account.currency` set to `"INR"`.
- Pass the **IFSC code** in the `local_routing_number` field. You do **not** need to pass a `swift_code`.
- Ensure you include the `tax_identification_number` (PAN) of the beneficiary inside the `notes` object. This is an example of a `notes` field your account may require. See the `notes` description in [Create a beneficiary](/api-reference/openapi/beneficiary_v2/createbeneficiaryv2).
- Store the `id` received in the response — it is passed as `beneficiary_id` in the Create a Payout API request.



### API Endpoint

```curl
POST https://api.glomopay.com/api/v2/beneficiaries
```

### Request

```curl
curl -i -X POST \
  https://api.glomopay.com/api/v2/beneficiaries \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "category": "payout",
    "beneficiary": {
      "name": "John Doe",
      "type": "individual",
      "address": {
        "address_line1": "202 Swarna Residency",
        "city": "Bengaluru",
        "state": "Karnataka",
        "country_code": "IND",
        "postal_code": "560048"
      }
    },
    "bank_account": {
      "account_number": "XXXXXXXXXX0291",
      "name": "HDFC Bank",
      "local_routing_number": "HDFC0000123",
      "currency": "INR",
      "address": {
        "address_line1": "HDFC Bank House, Senapati Bapat Marg",
        "city": "Mumbai",
        "state": "Maharashtra",
        "country_code": "IND",
        "postal_code": "400013"
      }
    },
    "notes": {
      "tax_identification_number": "EFEXXXX68F"
    }
  }'
```

### Response

```curl
{
  "id": "bene_5JU9yv0lGSUP",
  "name": "John Doe",
  "type": "individual",
  "category": "payout",
  "status": "pending",
  "email": null,
  "phone": null,
  "nickname": null,
  "upi_account": null,
  "created_at": "2025-01-15T10:00:00Z",
  "updated_at": "2025-01-15T10:00:00Z",
  "address": {
    "address_line1": "202 Swarna Residency",
    "city": "Bengaluru",
    "state": "Karnataka",
    "country_code": "IND",
    "postal_code": "560048"
  },
  "bank_account": {
    "account_number": "XXXXXXXXXX0291",
    "name": "HDFC Bank",
    "local_routing_number": "HDFC0000123",
    "currency": "INR",
    "address": {
      "address_line1": "HDFC Bank House, Senapati Bapat Marg",
      "city": "Mumbai",
      "state": "Maharashtra",
      "country_code": "IND",
      "postal_code": "400013"
    }
  },
  "notes": {
    "tax_identification_number": "EFEXXXX68F"
  }
}
```

## Create a Document

Upload the user's consent to withdraw the money by calling this API. The consent is a withdrawal request letter on your company letterhead confirming the investor's withdrawal request — download the sample template here: **[Sample Withdrawal Request Letter](/assets/sample_withdrawal_request_letter.d62c9f456b925526973bb01915fdcd4d5ac377d45732314d48ac92b7ef8c134b.23b8e413.pdf)**. The file is sent as binary in a `multipart/form-data` request.

> **Note:** Store the `id` received in the response — it is passed in the `documents` array of the Create a Payout API request.


### API Endpoint

```curl
POST https://api.glomopay.com/api/v1/document
```

### Request

```curl
curl -i -X POST \
  https://api.glomopay.com/api/v1/document \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -F 'document_name=Letterhead' \
  -F 'file=@/path/to/Sample_Withdrawal_Request_Letter.pdf'
```

### Response

```curl
{
    "id": "doc_nYUqLpuYQ0M8",
    "document_name": "Letterhead",
    "file_name": "Letterhead_BC8tFdE.pdf",
    "preview_url": "https://glomopay-service-staging-documents.s3.ap-south-1.amazonaws.com/12345_Letterhead",
    "status": "uploaded",
    "created_at": "2021-06-01T12:00:00Z",
    "updated_at": "2021-06-01T12:00:00Z"
}
```

## Get a Payout Quote

This step is optional. Use it to show the user about how much INR they will receive before you create the payout.

The quote is an estimate only. It does not lock the rate. The bank sets the actual amount when it processes the batch.

**You cannot attach this quote to a payout.**

### API Endpoint

```curl
POST https://api.glomopay.com/api/v1/lrs/quotes
```

### Request

```curl
curl -i -X POST \
  https://api.glomopay.com/api/v1/lrs/quotes \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "resource": "payout",
    "source_amount": 1000000,
    "source_currency": "USD",
    "target_currency": "INR"
  }'
```

### Response

The API returns `201`.

```curl
{
  "id": "quote_6ab51084HiJPg",
  "from": {
    "amount": 1000000,
    "currency": "USD"
  },
  "to": {
    "amount": 93142106,
    "currency": "INR"
  },
  "fx_rate": "94.13",
  "total_tax": 46594,
  "expires_at": "2026-09-24T12:29:00.819Z",
  "created_at": "2026-09-24T11:59:00.822Z"
}
```

- `to.amount` is the estimated INR after fees, conversion and tax, in paisa.
- `total_tax` is the estimated GST, in paisa.
- `fx_rate` is the bank's USD to INR buy rate when the quote was made.


> **Note:** This quote is an estimate.


### Errors

- `400` — `Validation failed: Bank code is not supported for payout quotes`. You sent `bank_code`.
- `400` — `Validation failed: payout quotes are only supported from USD to INR`. The currency pair is not USD to INR.
- `422` — `No active exchange rate found`. No rate is available right now.


## Create a Payout

Initiate the withdrawal by creating a payout to the beneficiary, referencing the `beneficiary_id` and the uploaded document `id`.

> **Note:**
- For the LRS withdrawal flow, `source_currency` is `"USD"`, `destination_currency` is `"INR"`, and the `payment_rail` is `"neft"`.
- All amounts are expressed in the smallest unit of the currency (e.g., cents for USD, paisa for INR). For example, `100000` represents $1,000.00 in USD.
- The minimum withdrawal is $1. Set `source_amount` to `100` (USD cents) or more. A payout below this is rejected with a `400` error.
- `request_id` is a client-provided unique identifier for the payout. A payout with a duplicate `request_id` is rejected with a `409` error.



### API Endpoint

```curl
POST https://api.glomopay.com/api/v1/payouts
```

### Request

```curl
curl -i -X POST \
  https://api.glomopay.com/api/v1/payouts \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "purpose_code": "P0001",
    "beneficiary_id": "bene_a1b2c3d4e5",
    "source_currency": "USD",
    "destination_currency": "INR",
    "source_amount": 10000,
    "payment_rail": "neft",
    "invoice_number": "INV-2026-001",
    "request_id": "req-7f3a9c20",
    "documents": ["doc_11aa22bb33"],
    "notes": {
      "internal_ref": "batch-42"
    }
  }'
```

### Response

```curl
{
    "id": "payout_6a7c51772CX2A",
    "beneficiary_id": "bene_6a7061db3UDRq",
    "destination_amount": null,
    "destination_currency": "INR",
    "source_currency": "USD",
    "source_amount": 10000,
    "purpose_code": "P0001",
    "status": "in_progress",
    "fees": {
        "txn_fee": {
            "currency": "USD",
            "amount": 0
        },
        "fx_fee": {
            "currency": "USD",
            "amount": 0
        }
    },
    "mid_market_rate": {
        "currency": null,
        "rate": null
    },
    "documents": [],
    "utr": null,
    "created_at": "2026-08-11T05:27:16Z",
    "updated_at": "2026-08-11T05:27:17Z",
    "receipt_ids": [],
    "fee_collection_mode": "deferred",
    "request_id": "2026-08-11T05:27:10.995Z",
    "payment_rail": "neft",
    "invoice_number": null,
    "notes": null,
    "error_code": null,
    "error_description": null,
    "customer_error_description": null,
    "quote_id": null,
    "taxes": [],
    "estimated_credit_date": "2026-08-13"
}
```

## Payout Success

Once the bank has processed the payout, its status changes to `success`.

> **Note:** The values of `destination_amount`, `mid_market_rate`, `taxes`, and `utr` are only finalized once the payout status is `success`. Once the payout succeeds, these values are delivered via the `payout` webhook, and can also be fetched by polling [Retrieve a Payout](/api-reference/openapi/payout/getpayoutbyid).


### Response

```curl
{
  "id": "payout_6a7c51772CX2A",
  "beneficiary_id": "bene_6a7061db3UDRq",
  "destination_amount": 946700,
  "destination_currency": "INR",
  "source_currency": "USD",
  "source_amount": 10000,
  "purpose_code": "P0001",
  "status": "success",
  "fees": {
    "txn_fee": {
      "currency": "USD",
      "amount": 0
    },
    "fx_fee": {
      "currency": "USD",
      "amount": 0
    }
  },
  "mid_market_rate": {
    "currency": "INR",
    "rate": 96.67
  },
  "documents": [],
  "utr": "AXISN1234567890",
  "created_at": "2026-08-12T10:56:55Z",
  "updated_at": "2026-08-12T10:56:56Z",
  "receipt_ids": [],
  "fee_collection_mode": "immediate",
  "request_id": "Glomo6",
  "payment_rail": "neft",
  "invoice_number": null,
  "notes": null,
  "error_code": null,
  "error_description": null,
  "customer_error_description": null,
  "quote_id": null,
  "taxes": [
    {
      "name": "GST",
      "amount": 20000,
      "currency": "INR",
      "bps": 1800
    }
  ],
  "estimated_credit_date": "2026-08-17"
}
```