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

# Through API Endpoints

> POST endpoint for merchants to add an Indian user's off-ramp bank account, covering headers and body parameters. Deletion uses a separate DELETE endpoint.

This API allows merchants to add a bank account for a user. It is primarily used for Indian users who require a bank account to perform off-ramp operations. To remove an account, use the Delete Bank Account endpoint (`DELETE /api/v2/user/bank_account`).

## Endpoint

**URL:** `https://api.saber.money/api/v2/user/bank_account`<br />**Method:** `POST`

### Headers

| Header         | Description                                                                                                      |
| -------------- | ---------------------------------------------------------------------------------------------------------------- |
| `X-Timestamp`  | A UNIX timestamp for the request. Used for generating a secure signature.                                        |
| `X-Api-Key`    | Your unique API key (client ID) provided by Saber Money.                                                         |
| `X-Signature`  | HMAC-SHA256 signature authenticating the request. [Authentication: Configuring Your Keys](/getting-started/auth) |
| `X-Request-Id` | A unique identifier for the request (optional but recommended).                                                  |
| `X-User-Id`    | The unique ID of the user whose bank account is being added.                                                     |

### Request Body Parameters

| Parameter             | Type     | Description                                                     | Mandatory       |
| --------------------- | -------- | --------------------------------------------------------------- | --------------- |
| `account_number`      | `String` | The user's bank account number.                                 | Yes (for India) |
| `account_holder_name` | `String` | Full name of the account holder.                                | Yes             |
| `bank_code`           | `String` | The IFSC code of the user's bank branch (routing code).         | Yes (for India) |
| `account_type`        | `String` | The type of bank account (`SAVINGS`, `CURRENT`, `CHECKING`).    | Optional        |
| `country`             | `String` | ISO 3166-1 alpha-3 country code. Use `IND` for Indian accounts. | Yes             |

### Sample request

```bash theme={null}
curl --location 'https://api.saber.money/api/v2/user/bank_account' \
--header 'X-Timestamp: 1705491300' \
--header 'X-Api-Key: CLIENT_ID_HERE' \
--header 'X-Signature: SIGNATURE_HERE' \
--header 'X-Request-Id: 123456789876' \
--header 'X-User-Id: USER_ID_HERE' \
--data '{
    "account_number": "1234567890",
    "account_holder_name": "John Doe",
    "bank_code": "SBIN0004855",
    "account_type": "SAVINGS",
    "country": "IND"
}'
```

## Deleting a bank account

To delete a bank account, call the Delete Bank Account endpoint:

**URL:** `https://api.saber.money/api/v2/user/bank_account`<br />**Method:** `DELETE`

```bash theme={null}
curl --location --request DELETE 'https://api.saber.money/api/v2/user/bank_account' \
--header 'X-Timestamp: 1705491300' \
--header 'X-Api-Key: CLIENT_ID_HERE' \
--header 'X-Signature: SIGNATURE_HERE' \
--header 'X-Request-Id: 123456789876' \
--header 'X-User-Id: USER_ID_HERE' \
--data '{
    "bank_id": "550e8400-e29b-41d4-a716-446655440000",
    "reason": "User requested deletion"
}'
```

## Notes

* This API is mandatory for Indian users after KYC approval to enable off-ramp transactions.
* Ensure the `bank_code` (IFSC code) is valid and corresponds to the user's bank branch.
* Use unique `Request-Id` values for tracking each request.

**API Reference:** [Add/Delete Bank](https://saber-money.readme.io/reference/adddeletebankaccount)


## Related topics

- [Overview](/user/bank-account/overview.md)
- [Through Saber Widget](/user/bank-account/widget.md)
- [Initiating Transaction](/offramp/operations/initiate-transaction.md)
- [KYC Partner URL](/user/kyc/partner-url.md)
