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

# Add logic to Account Numbers

> Restrict which inbound transfers a Fintoc Account Number accepts by setting per-account rules such as expected amount, sender name, or acceptance status.

In Mexico, a Fintoc Account Number uses the standardized Mexican bank account number (CLABE) format. You can assign an Account Number to a user's payments or create a single-use Account Number for a payment order. Use this guide to disable an Account Number and set minimum and maximum amount limits. These controls let Fintoc reject unwanted inbound transfers.

## Disable an Account Number

When you disable an Account Number, Fintoc rejects every inbound transfer to that Account Number and returns the transfer to the sender. Disable an Account Number when it should no longer receive payments.

### Example use cases

* Your company assigns one Account Number per user. When a user completes offboarding from your app, disable the user's Account Number. Fintoc then returns payments sent to that Account Number.
* Your company assigns one Account Number per order. After a customer pays, disable the order's Account Number to avoid accepting a duplicate payment. If the customer pays twice, Fintoc returns the second payment.

### Disable an Account Number with the API

```bash theme={null}
curl --request PATCH \
     --url https://api.fintoc.com/v2/account_numbers/acno_test_a1b2c3d4e5f6 \
     --header 'Authorization: sk_test_jKaHdEa3mfmP0D105H' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "status": "disabled"
}
'
```

```javascript theme={null}
const accountNumber = await fintoc.v2.accountNumbers.update(
  "acno_test_a1b2c3d4e5f6",
  { status: "disabled" }
);
```

```python theme={null}
account_number = client.v2.account_numbers.update(
  "acno_test_a1b2c3d4e5f6",
  status="disabled"
)
```

The API returns the updated Account Number with its `status` set to `disabled`:

```json theme={null}
{
  "id": "acno_test_a1b2c3d4e5f6",
  "object": "account_number",
  "account_id": "acc_test_b2c3d4e5f6g7",
  "created_at": "2026-06-22T12:00:00.000Z",
  "deleted_at": null,
  "description": "My payins",
  "is_root": false,
  "last_transfer_at": null,
  "metadata": {},
  "mode": "test",
  "number": "000000000000000000",
  "options": null,
  "status": "disabled",
  "updated_at": "2026-06-22T12:00:00.000Z"
}
```

## Set inbound transfer amount limits

You can restrict which inbound transfers an Account Number accepts. If a transfer does not meet your criteria, Fintoc rejects the transfer. Rejected transfers do not appear on your account statements or incur fees. Set `min_amount` and `max_amount` in the smallest currency unit. For example, `30000` represents 300.00 MXN. Fintoc supports three kinds of amount limits:

| Limit          | Description                                                                                                               |
| :------------- | :------------------------------------------------------------------------------------------------------------------------ |
| Minimum amount | Set `min_amount` to reject any transfer with an amount lower than this value.                                             |
| Maximum amount | Set `max_amount` to reject any transfer with an amount higher than this value.                                            |
| Exact amount   | Set both `min_amount` and `max_amount` to the same value to reject any transfer that does not match that specific amount. |

### Set limits with the API

```bash theme={null}
curl --request POST \
     --url https://api.fintoc.com/v2/account_numbers \
     --header 'Authorization: sk_test_jKaHdEa3mfmP0D105H' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "account_id": "acc_test_b2c3d4e5f6g7",
  "options": {
    "min_amount": 30000,
    "max_amount": 40000
  }
}
'
```

```javascript theme={null}
const accountNumber = await fintoc.v2.accountNumbers.create({
  account_id: "acc_test_b2c3d4e5f6g7",
  options: {
    min_amount: 30000,
    max_amount: 40000,
  },
});
```

```python theme={null}
account_number = client.v2.account_numbers.create(
  account_id="acc_test_b2c3d4e5f6g7",
  options={
    "min_amount": 30000,
    "max_amount": 40000,
  },
)
```

The API returns the new Account Number with the amount limits under `options`:

```json theme={null}
{
  "id": "acno_test_a1b2c3d4e5f6",
  "object": "account_number",
  "account_id": "acc_test_b2c3d4e5f6g7",
  "created_at": "2026-06-22T12:00:00.000Z",
  "deleted_at": null,
  "description": "My payins",
  "is_root": false,
  "last_transfer_at": null,
  "metadata": {},
  "mode": "test",
  "number": "000000000000000000",
  "options": {
    "max_amount": 40000,
    "min_amount": 30000
  },
  "status": "enabled",
  "updated_at": "2026-06-22T12:00:00.000Z"
}
```

## Test the integration

Confirm the disabled status and amount-limit behavior in `test` mode before going live. Use a `test` secret API key (`sk_test_...`) and a test Account Number.

To test a disabled Account Number, disable the Account Number with the request above. Then simulate an inbound transfer to the disabled Account Number's `number`. Fintoc rejects the transfer and returns it to the sender. The transfer does not appear on your account statement or incur a fee.

To test amount limits, create an Account Number with `min_amount` set to `30000` and `max_amount` set to `40000`. Then simulate two inbound transfers:

* A transfer of `35000` (350.00 MXN) falls within the limits, so Fintoc accepts the transfer.
* A transfer of `20000` (200.00 MXN) falls below `min_amount`, so Fintoc rejects the transfer and returns it to the sender.

Use the [Simulate receiving a transfer](/api/transfers-api/simulation/transfers-simulate-receive) endpoint to simulate inbound transfers in `test` mode.
