> ## 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.

# Quickstart

> Prepare to start using the Transfers API

To start using Fintoc's Transfer API, you just need to have an account on our [Dashboard](https://dashboard.fintoc.com/) and follow these steps:

1. Get your test API Keys
2. Generate your JWS Keys and upload them to our Dashboard.
3. Get your accounts
4. Send your first transfer

# Step 1: Get your test API Keys

Every interaction with the Fintoc API must be authenticated with your Fintoc [API Keys](/v2023-11-15/docs/home/api-keys). If any interaction with the API doesn't include your API Key or uses an incorrect one, Fintoc will return an error.

Every Fintoc account has two key pairs: one is used for [test mode](/v2023-11-15/docs/resources/test-mode), while the other is used for the production environment. Every resource is stored either in [test mode or live mode](/v2023-11-15/docs/resources/test-mode), and resources from one environment cannot be manipulated by resources from the other.

Your API Keys will be available in the [Dashboard](https://dashboard.fintoc.com/), where you will have to sign up. Once your Fintoc account has been created, you will be able to get your API Keys. In this case, you must use the  **Secret Key** for test mode. We added the prefix `sk_test_` so you can easily identify it.

# Step 2: Register your JWS Keys

To make requests to Transfers **endpoints that move money**, you need to include a JSON Web Signature (JWS). JWS is a standard for digitally signing data to ensure its integrity and authenticity.

To register your JWS keys, follow [this guide](/v2023-11-15/docs/transfers/setting-up-jws-keys#generate-jws-keys).

# Step 3: Get your accounts

Using your test **Secret Key**, get your Accounts via API like this:

```Text cURL theme={null}
curl --request GET \
     --url https://api.fintoc.com/v2/accounts \
     --header 'Authorization: sk_test_9c8d8CeyBTx1VcJzuDgpm4H' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
```

The response should look like this:

```coffeescript JSON theme={null}
[
  {
    "id": "acc_23JlasHas241",
    "object": "account",
    "mode": "test",
    "description": "My root account",
    "root_account_number": "738969123456789120",
    "root_account_number_id": "acno_Kasf91034gj1AD",
    "available_balance": 0
    "currency": "MXN",
    "entity": {
          "id": "ent_4324qwkalsds",
          "holder_name": "ACME Inc.",
          "holder_id": "ND"
      }
	}
]
```

## Using our SDK

If you’re using Python or Node, you can install our [Python SDK](https://github.com/fintoc-com/fintoc-python) or [Node SDK](https://github.com/fintoc-com/fintoc-node) to make it easier to interact with our API. The SDK automatically [generates the JWS signature](/v2023-11-15/docs/transfers/setting-up-jws-keys), handles pagination, and offers many other helpful features.

First install our SDK:

```shell Install Python SDK theme={null}
pip install fintoc
```

```shell Install Node SDK theme={null}
npm install fintoc
```

Now list your accounts:

```python theme={null}
from fintoc import Fintoc

# You can provide a path to your PEM file or pass the PEM key directly as a string.
# jws_private_key = os.environ.get('JWS_PRIVATE_KEY')
jws_private_key = "./private_key.pem"

client = Fintoc("your_api_key", jws_private_key=jws_private_key)

for account in client.v2.accounts.list():
  print(account.id, account.description, account.root_account_number, account.available_balance)

```

```node Node theme={null}
const { Fintoc } = require('fintoc');

// You can provide a path to your PEM file or pass the PEM key directly as a string.
// const privateKey = process.env.JWS_PRIVATE_KEY;
const privateKey = './private_key.pem';

const fintoc = new Fintoc('your_api_key', privateKey);

const accounts = await fintoc.v2.accounts.list();
for await (const account of accounts) {
  console.log(account.id, account.description, account.root_account_number);
}
```

# Step 4: Make your first transfer

Now, we’ll create a transfer. In **live mode**, this will actually move money to your customers’ accounts. Since we’re in **test mode**, no money will be moved—but you’ll use the exact same API that you’ll use in your production environment.

## Fund your test account

Your test account will start out without funds (just like your live account). To add funds, simulate a transfer using the API or dashboard.

## Make an outbound transfer

First you will need a JWS signature to safely sign your requests. To learn how to generate a JWS Signature, follow [this guide](/v2023-11-15/docs/transfers/setting-up-jws-keys#generate-jws-signature) .

Once you’ve generated your JWS Signature, use the `account_id` you got from Step 3 to create a transfer of \$590.13 MXN:

```curl theme={null}
curl --request POST \
     --url https://api.fintoc.com/v2/transfers \
     --header 'Authorization: YOUR_API_KEY' \
     --header 'Fintoc-JWS-Signature: YOUR_JWS_SIGNATURE' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "amount": 59013,
  "currency": "mxn",
  "account_id": "acc_M8sKf230BgHjD4",
  "comment": "Pago de credito 10451",
  "reference_id": "150195",
  "counterparty": {
    "account_number": "012969123456789120"
  },
}
```

<Warning>
  **Currencies are represented as integers**

  The Fintoc API represents currencies in its smallest possible units with no decimals (as an integer). That means that an **amount of MXN \$590.13 gets represented by Fintoc as 59013.**

  If you are making a transfer in Chilean peso, because there are no decimals, if you want to transfer \$59013 you just represent that amount as `59013`.

  You can [read more about currencies here.](/v2023-11-15/docs/home/currencies).
</Warning>

## Using our SDK

If you are using one of our SDKs, you can create the transfer like this:

```python theme={null}
transfer = client.v2.transfers.create(
    amount=59013,
    currency="mxn",
    account_id="acc_M8sKf230BgHjD4",
    comment="Pago de credito 10451",
    reference_id="150195",
    counterparty={"account_number": "014180655091438298"},
)
```

```node Node theme={null}
const transfer = await fintoc.v2.transfers.create({
  amount: 59013,
  currency: 'mxn',
  account_id: 'acc_M8sKf230BgHjD4',
  comment: 'Pago de credito 10451',
  reference_id: '1234124',
  counterparty: {
      account_number: '014180655091438298',
  },
});
```

**✅ Congratulations!** You just made your first transfer! For real-world applications, there are several other features you should consider using—for example:

* Idempotency Keys to safely repeat requests without the risk of creating two objects
* [Account Numbers](/v2023-11-15/docs/transfers/transfers-overview/v2-transfers-account-number-data-model) to easily reconcile incoming transfers
* Metadata to attach custom data to your Fintoc objects

You'll learn all about these features in our guides on [receiving transfers](/v2023-11-15/docs/transfers/inbound-transfers) and [sending transfers](/v2023-11-15/docs/transfers/outbound-transfers). If you want to further understand how transfers work and high level concepts, check our [overview guide](/v2023-11-15/docs/transfers/transfers-overview).
