> For the complete documentation index, see [llms.txt](https://www.notbank.com/learn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.notbank.com/learn/tutorial/en/crypto-as-a-service.md).

# Crypto as a Service

NotBank offers a "Crypto as a Service" (CaaS) solution that provides a robust, documented technical infrastructure (API) so third parties (fintechs, banks, or wallets) can quickly integrate complete cryptocurrency and digital asset features under their own brand. This solution allows institutions to offer their customers services such as secure custody, wallet management, instant fiat-to-crypto conversion, and send/receive transactions, without having to develop the complexity of the *blockchain*, *backend*, security, or regulatory compliance layer from scratch. Essentially, NotBank manages the technical side, risks, and infrastructure, acting as a bridge between the traditional financial world and the crypto ecosystem. This allows its clients to focus solely on the user experience and their business strategy.

Notbank's **Crypto as a Service (CaaS)** service is designed for institutions that already have an established compliance framework and a verifiable reputation, making it possible to build a high level of trust between the parties. Thanks to this level of trust—underpinned by shared-responsibility agreements and mutual validation—the onboarding process is significantly streamlined, reducing time and operational friction without compromising the required regulatory standards.\
To begin using **Crypto as a Service (CaaS)**, interested parties must formalize their request by signing a service agreement. This agreement clearly sets out the terms of use, responsibilities, and commercial arrangements. To start the process, contact our support team by clicking the link provided. This link will take you to a dedicated contact form, which you must complete. Once we receive your request through the form, our team will promptly send you the agreement for review and signature.

## 1. Authentication with Notbank

Authentication to access the Notbank API is performed securely by combining confidential API credentials with a specific user identifier. These credentials, obtained in the previous step, serve as proof of identity for the client application. By including the user identifier along with these credentials in the request, the API can verify the caller's identity and, crucially, authorize operations at the level of the specific user account within the Notbank ecosystem, ensuring that only relevant data and actions are available.

{% tabs %}
{% tab title="cURL" %}

```bash
GET /ap/AuthenticateUser HTTP/1.1
Host: https://api.notbank.com
Content-Type: application/json
APIKey: "<public-key>",
Signature: "<signature>",
UserId: "<user-uuid>",
Nonce: "2247733562"

---

{
  "Authenticated": true,
  "SessionToken": "02de4e6d-43f2-4e89-7213-49a9935d5607",  // token, aptoken
  // ...
}
```

***

`Nonce` any arbitrary number or random string used with the API private key to generate a signature.

`Signature` is a long alphanumeric string generated using the API private key and the nonce. To generate your own signature with a `nonce` that is different, you must use `HMAC-SHA256` to encode your `Nonce`, `UserId` (user ID) and API public key (`<public-key>`), in the format `NonceUserIdAPIPublicKey` using the API secret key (`<secret-key>`) as the key.
{% endtab %}

{% tab title="Node" %}

```js
import { NotbankClient } from 'notbank';

// create HTTP REST client
const restClient = NotbankClient.Factory.createRestClient();

// authentication
await restClient.authenticateUser({
  ApiPublicKey: "public-key",
  ApiSecretKey: "secret-key",
  UserId: "user-uuid"
});
```

{% endtab %}
{% endtabs %}

## 2. Register a client with Notbank

If you want to **expand your own business** and offer cryptocurrency services to your users, our registration through **Crypto as a Service (CaaS)** is the right choice. This powerful integration lets you onboard and manage your own customers within the Notbank ecosystem, acting as a bridge between your users and all the features of our platform.

### 2.1 Basic-level registration

{% tabs %}
{% tab title="cURL" %}

```bash
POST /api/nb/account/register HTTP/1.1
Host: https://api.notbank.com
Content-Type: application/json
aptoken: <token>

{ 
  "first_name": "Juan",
  "last_name": "Perez",
  "phone_number": "+56911111111",
  "profession": "trader",
  "gender": "1",
  "birthdate": "01/01/1990",
  "citizenship": "BR",
  "identity_type": "1",
  "identity_number": "55330450314",
  "identity_country": "BR",
  "address_country": "BR",
  "address_city": "São Paulo",
  "address_street": "Calle 1",
  "address_postal_code": "123456",
  // Argentina only (address_country=AR)
  "address_province": "1",
  "subject_comply": false,  // is a regulated entity
  // Brazil only (address_country=BR)
  "address_district": "Distrito 1",
  "address_number": "1234",
  "address_state": "SP",
  "address_complement": "Bloque 3" // optional
  // Chile only (address_country=CL)
  "address_comune": "Arica",
  // Peru only (address_country=PE)
  "civil_status": "casado",
  "spouse_name": "María Soto",
  "pep": true,
  // Peru only and for PEPs (pep=true)  
  "pep_position": "Alcalde",
  "pep_institution": "Municipalidad de Santiago",
  "pep_links_description": "Rodrigo Pérez (Padre)",
  "is_pep_family_member": true,
  // Peru only and if the family member is a PEP (is_pep_family_member=true)
  "pep_family_member_name": "Luis Pérez",
  "pep_family_member_relation": "Abuelo"
}

---

{
  "status": "success",
  "data": {
    "userId": "<client-user-id>",
    "token": "<client-jwt>"
  }
}
```

{% endtab %}
{% endtabs %}

#### 2.1.1 Glossary

{% tabs %}
{% tab title="Profession" %}

| Value                      | Description          |
| -------------------------- | -------------------- |
| trader                     | Trader               |
| investor                   | Investor             |
| student                    | Student              |
| housewife                  | Housewife            |
| accountant                 | Accountant           |
| actor\_actress             | Actor/Actress        |
| air\_hostess               | Flight attendant     |
| archaeologist              | Archaeologist        |
| architect                  | Architect            |
| astronaut                  | Astronaut            |
| baker                      | Baker                |
| biologist                  | Biologist            |
| bricklayer                 | Bricklayer           |
| driver                     | Driver               |
| businessman                | Businessperson       |
| butcher                    | Butcher              |
| caretaker\_janitor\_porter | Caretaker/Doorman    |
| carpenter                  | Carpenter            |
| cashier                    | Cashier              |
| cleaner                    | Cleaner              |
| clown                      | Clown                |
| cobbler                    | Shoemaker            |
| cook\_chef                 | Cook/Chef            |
| chemist                    | Chemist              |
| dancer                     | Dancer               |
| decorator                  | Decorator            |
| dentist                    | Dentist              |
| designer                   | Designer             |
| physician                  | Physician            |
| dressmaker                 | Dressmaker           |
| dustman                    | Garbage collector    |
| economist                  | Economist            |
| electrician                | Electrician          |
| engineer                   | Engineer             |
| farmer                     | Farmer               |
| fireman                    | Firefighter          |
| fisherman                  | Fisherman            |
| florist                    | Florist              |
| fruiterer                  | Fruit seller         |
| gardener                   | Gardener             |
| geologist                  | Geologist            |
| hairdresser                | Hairdresser          |
| jeweller                   | Jeweller             |
| journalist                 | Journalist           |
| judge                      | Judge                |
| lawyer                     | Lawyer               |
| librarian                  | Librarian            |
| life\_guard                | Lifeguard            |
| mailman\_postman           | Mail carrier         |
| mechanic                   | Mechanic             |
| meteorologist              | Meteorologist        |
| cryptocurrency\_miner      | Cryptocurrency miner |
| mineral\_miner             | Miner                |
| model                      | Model                |
| nanny\_nursemaid           | Nanny                |
| nun                        | Nun                  |
| nurse                      | Nurse                |
| painter                    | Painter              |
| pastry\_cook               | Pastry chef          |
| pharmacist                 | Pharmacist           |
| photographer               | Photographer         |
| physicist                  | Physicist            |
| plumber                    | Plumber              |
| policeman\_policewoman     | Police officer       |
| politician                 | Politician           |
| priest                     | Priest               |
| professor\_teacher         | Teacher              |
| programmer                 | Programmer           |
| psychiatrist               | Psychiatrist         |
| psychologist               | Psychologist         |
| receptionist               | Receptionist         |
| researcher\_scientist      | Research scientist   |
| sailor                     | Sailor               |
| salesman                   | Salesperson          |
| secretary                  | Secretary            |
| shop\_assistant            | Shop assistant       |
| singer                     | Singer               |
| social\_worker             | Social worker        |
| sportsman                  | Athlete              |
| surgeon                    | Surgeon              |
| taxi\_driver               | Taxi driver          |
| telephone\_operator        | Telephone operator   |
| travel\_agent              | Travel agent         |
| veterinarian               | Veterinarian         |
| waiter\_waitress           | Waiter/Waitress      |
| writer                     | Writer               |
| deliveryman                | Delivery driver      |
| uber\_driver               | Uber driver          |
| pilot                      | Pilot                |
| administrative             | Administrative       |
| public\_servant            | Public servant       |
| other                      | Other                |
| customer\_care             | Customer service     |
| military                   | Military             |
| manager\_officier          | Manager/Officer      |
| {% endtab %}               |                      |

{% tab title="Gender" %}

| Value        | Description |
| ------------ | ----------- |
| 0            | Woman       |
| 1            | Man         |
| {% endtab %} |             |

{% tab title="Identity document type" %}

| Value        | Description                                 |
| ------------ | ------------------------------------------- |
| 1            | National identity card                      |
| 2            | Foreigner                                   |
| 3            | NUIP: Unique Personal Identification Number |
| 4            | NIP: Personal Identification Number         |
| 5            | PEP: Special Residency Permit               |
| 6            | CC: Citizenship ID card                     |
| 7            | CE: Foreign Resident ID Card                |
| 8            | Passport                                    |
| {% endtab %} |                                             |

{% tab title="Province (AR)" %}

| Value        | Description                                                 |
| ------------ | ----------------------------------------------------------- |
| 1            | Buenos Aires                                                |
| 10           | Catamarca                                                   |
| 14           | Chaco                                                       |
| 20           | Chubut                                                      |
| 43           | Autonomous City of Buenos Aires                             |
| 3            | Córdoba                                                     |
| 15           | Corrientes                                                  |
| 5            | Entre Ríos                                                  |
| 13           | Formosa                                                     |
| 11           | Jujuy                                                       |
| 18           | La Pampa                                                    |
| 9            | La Rioja                                                    |
| 4            | Mendoza                                                     |
| 16           | Misiones                                                    |
| 19           | Neuquén                                                     |
| 21           | Río Negro                                                   |
| 12           | Salta                                                       |
| 7            | San Juan                                                    |
| 8            | San Luis                                                    |
| 22           | Santa Cruz                                                  |
| 2            | Santa Fe                                                    |
| 6            | Santiago del Estero                                         |
| 23           | Tierra del Fuego, Antarctica and the South Atlantic Islands |
| 17           | Tucumán                                                     |
| {% endtab %} |                                                             |

{% tab title="State (BR)" %}

| Value        | Description         |
| ------------ | ------------------- |
| RO           | Rondônia            |
| AC           | Acre                |
| AM           | Amazonas            |
| RR           | Roraima             |
| PA           | Pará                |
| AP           | Amapá               |
| TO           | Tocantins           |
| MA           | Maranhão            |
| PI           | Piauí               |
| CE           | Ceará               |
| RN           | Rio Grande do Norte |
| PB           | Paraíba             |
| PE           | Pernambuco          |
| AL           | Alagoas             |
| SE           | Sergipe             |
| BA           | Bahia               |
| MG           | Minas Gerais        |
| ES           | Espírito Santo      |
| RJ           | Rio de Janeiro      |
| SP           | São Paulo           |
| PR           | Paraná              |
| SC           | Santa Catarina      |
| RS           | Rio Grande do Sul   |
| MS           | Mato Grosso do Sul  |
| MT           | Mato Grosso         |
| GO           | Goiás               |
| DF           | Federal District    |
| {% endtab %} |                     |

{% tab title="Commune (CL)" %}

| Value                        | Description                  |
| ---------------------------- | ---------------------------- |
| Arica                        | Arica                        |
| Camarones                    | Camarones                    |
| General Lagos                | General Lagos                |
| Putre                        | Putre                        |
| Alto Hospicio                | Alto Hospicio                |
| Camiña                       | Camiña                       |
| Colchane                     | Colchane                     |
| Huara                        | Huara                        |
| Iquique                      | Iquique                      |
| Pica                         | Pica                         |
| Pozo Almonte                 | Pozo Almonte                 |
| Antofagasta                  | Antofagasta                  |
| Calama                       | Calama                       |
| María Elena                  | María Elena                  |
| Mejillones                   | Mejillones                   |
| Ollagüe                      | Ollagüe                      |
| San Pedro de Atacama         | San Pedro de Atacama         |
| Sierra Gorda                 | Sierra Gorda                 |
| Taltal                       | Taltal                       |
| Tocopilla                    | Tocopilla                    |
| Alto del Carmen              | Alto del Carmen              |
| Caldera                      | Caldera                      |
| Chañaral                     | Chañaral                     |
| Copiapó                      | Copiapó                      |
| Diego de Almagro             | Diego de Almagro             |
| Freirina                     | Freirina                     |
| Huasco                       | Huasco                       |
| Tierra Amarilla              | Tierra Amarilla              |
| Vallenar                     | Vallenar                     |
| Andacollo                    | Andacollo                    |
| Canela                       | Canela                       |
| Combarbalá                   | Combarbalá                   |
| Coquimbo                     | Coquimbo                     |
| Illapel                      | Illapel                      |
| La Higuera                   | La Higuera                   |
| La Serena                    | La Serena                    |
| Los Vilos                    | Los Vilos                    |
| Monte Patria                 | Monte Patria                 |
| Ovalle                       | Ovalle                       |
| Paiguano                     | Paiguano                     |
| Punitaqui                    | Punitaqui                    |
| Río Hurtado                  | Río Hurtado                  |
| Salamanca                    | Salamanca                    |
| Vicuña                       | Vicuña                       |
| Algarrobo                    | Algarrobo                    |
| Cabildo                      | Cabildo                      |
| Calera                       | Calera                       |
| Calle Larga                  | Calle Larga                  |
| Cartagena                    | Cartagena                    |
| Casablanca                   | Casablanca                   |
| Catemu                       | Catemu                       |
| Concón                       | Concón                       |
| El Quisco                    | El Quisco                    |
| El Tabo                      | El Tabo                      |
| Hijuelas                     | Hijuelas                     |
| Isla de Pascua               | Isla de Pascua               |
| Juan Fernández               | Juan Fernández               |
| La Cruz                      | La Cruz                      |
| La Ligua                     | La Ligua                     |
| Limache                      | Limache                      |
| Llaillay                     | Llaillay                     |
| Los Andes                    | Los Andes                    |
| Nogales                      | Nogales                      |
| Olmué                        | Olmué                        |
| Panquehue                    | Panquehue                    |
| Papudo                       | Papudo                       |
| Petorca                      | Petorca                      |
| Puchuncaví                   | Puchuncaví                   |
| Putaendo                     | Putaendo                     |
| Quillota                     | Quillota                     |
| Quilpué                      | Quilpué                      |
| Quintero                     | Quintero                     |
| Rinconada                    | Rinconada                    |
| San Antonio                  | San Antonio                  |
| San Esteban                  | San Esteban                  |
| San Felipe                   | San Felipe                   |
| Santa María                  | Santa María                  |
| Santo Domingo                | Santo Domingo                |
| Valparaíso                   | Valparaíso                   |
| Villa Alemana                | Villa Alemana                |
| Viña del Mar                 | Viña del Mar                 |
| Zapallar                     | Zapallar                     |
| Alhué                        | Alhué                        |
| Buin                         | Buin                         |
| Calera de Tango              | Calera de Tango              |
| Cerrillos                    | Cerrillos                    |
| Cerro Navia                  | Cerro Navia                  |
| Colina                       | Colina                       |
| Conchalí                     | Conchalí                     |
| Curacaví                     | Curacaví                     |
| El Bosque                    | El Bosque                    |
| El Monte                     | El Monte                     |
| Estación Central             | Estación Central             |
| Huechuraba                   | Huechuraba                   |
| Independencia                | Independencia                |
| Isla de Maipo                | Isla de Maipo                |
| La Cisterna                  | La Cisterna                  |
| La Florida                   | La Florida                   |
| La Granja                    | La Granja                    |
| La Pintana                   | La Pintana                   |
| La Reina                     | La Reina                     |
| Lampa                        | Lampa                        |
| Las Condes                   | Las Condes                   |
| Lo Barnechea                 | Lo Barnechea                 |
| Lo Espejo                    | Lo Espejo                    |
| Lo Prado                     | Lo Prado                     |
| Macul                        | Macul                        |
| Maipú                        | Maipú                        |
| María Pinto                  | María Pinto                  |
| Melipilla                    | Melipilla                    |
| Ñuñoa                        | Ñuñoa                        |
| Padre Hurtado                | Padre Hurtado                |
| Paine                        | Paine                        |
| Pedro Aguirre Cerda          | Pedro Aguirre Cerda          |
| Peñaflor                     | Peñaflor                     |
| Peñalolén                    | Peñalolén                    |
| Pirque                       | Pirque                       |
| Providencia                  | Providencia                  |
| Pudahuel                     | Pudahuel                     |
| Puente Alto                  | Puente Alto                  |
| Quilicura                    | Quilicura                    |
| Quinta Normal                | Quinta Normal                |
| Recoleta                     | Recoleta                     |
| Renca                        | Renca                        |
| San Bernardo                 | San Bernardo                 |
| San Joaquín                  | San Joaquín                  |
| San José de Maipo            | San José de Maipo            |
| San Miguel                   | San Miguel                   |
| San Pedro                    | San Pedro                    |
| San Ramón                    | San Ramón                    |
| Santiago                     | Santiago                     |
| Talagante                    | Talagante                    |
| Tiltil                       | Tiltil                       |
| Vitacura                     | Vitacura                     |
| Chimbarongo                  | Chimbarongo                  |
| Chépica                      | Chépica                      |
| Codegua                      | Codegua                      |
| Coinco                       | Coinco                       |
| Coltauco                     | Coltauco                     |
| Doñihue                      | Doñihue                      |
| Graneros                     | Graneros                     |
| La Estrella                  | La Estrella                  |
| Las Cabras                   | Las Cabras                   |
| Litueche                     | Litueche                     |
| Lolol                        | Lolol                        |
| Machalí                      | Machalí                      |
| Malloa                       | Malloa                       |
| Marchihue                    | Marchihue                    |
| Nancagua                     | Nancagua                     |
| Navidad                      | Navidad                      |
| Olivar                       | Olivar                       |
| Palmilla                     | Palmilla                     |
| Paredones                    | Paredones                    |
| Peralillo                    | Peralillo                    |
| Peumo                        | Peumo                        |
| Pichidegua                   | Pichidegua                   |
| Pichilemu                    | Pichilemu                    |
| Placilla                     | Placilla                     |
| Pumanque                     | Pumanque                     |
| Quinta de Tilcoco            | Quinta de Tilcoco            |
| Rancagua                     | Rancagua                     |
| Rengo                        | Rengo                        |
| Requínoa                     | Requínoa                     |
| San Fernando                 | San Fernando                 |
| San Francisco de Mostazal    | San Francisco de Mostazal    |
| San Vicente de Tagua Tagua   | San Vicente de Tagua Tagua   |
| Santa Cruz                   | Santa Cruz                   |
| Cauquenes                    | Cauquenes                    |
| Chanco                       | Chanco                       |
| Colbún                       | Colbún                       |
| Constitución                 | Constitución                 |
| Curepto                      | Curepto                      |
| Curicó                       | Curicó                       |
| Empedrado                    | Empedrado                    |
| Hualañé                      | Hualañé                      |
| Licantén                     | Licantén                     |
| Linares                      | Linares                      |
| Longaví                      | Longaví                      |
| Maule                        | Maule                        |
| Molina                       | Molina                       |
| Parral                       | Parral                       |
| Pelarco                      | Pelarco                      |
| Pelluhue                     | Pelluhue                     |
| Pencahue                     | Pencahue                     |
| Rauco                        | Rauco                        |
| Retiro                       | Retiro                       |
| Romeral                      | Romeral                      |
| Río Claro                    | Río Claro                    |
| Sagrada Familia              | Sagrada Familia              |
| San Clemente                 | San Clemente                 |
| San Javier de Loncomilla     | San Javier de Loncomilla     |
| San Rafael                   | San Rafael                   |
| Talca                        | Talca                        |
| Teno                         | Teno                         |
| Vichuquén                    | Vichuquén                    |
| Villa Alegre                 | Villa Alegre                 |
| Yerbas Buenas                | Yerbas Buenas                |
| Bulnes                       | Bulnes                       |
| Chillán Viejo                | Chillán Viejo                |
| Chillán                      | Chillán                      |
| Cobquecura                   | Cobquecura                   |
| Coelemu                      | Coelemu                      |
| Coihueco                     | Coihueco                     |
| El Carmen                    | El Carmen                    |
| Ninhue                       | Ninhue                       |
| Ñiquén                       | Ñiquén                       |
| Pemuco                       | Pemuco                       |
| Pinto                        | Pinto                        |
| Portezuelo                   | Portezuelo                   |
| Quillón                      | Quillón                      |
| Quirihue                     | Quirihue                     |
| Ránquil                      | Ránquil                      |
| San Carlos                   | San Carlos                   |
| San Fabián                   | San Fabián                   |
| San Ignacio                  | San Ignacio                  |
| San Nicolás                  | San Nicolás                  |
| Treguaco                     | Treguaco                     |
| Yungay                       | Yungay                       |
| Alto Biobío                  | Alto Biobío                  |
| Antuco                       | Antuco                       |
| Arauco                       | Arauco                       |
| Cabrero                      | Cabrero                      |
| Cañete                       | Cañete                       |
| Chiguayante                  | Chiguayante                  |
| Concepción                   | Concepción                   |
| Contulmo                     | Contulmo                     |
| Coronel                      | Coronel                      |
| Curanilahue                  | Curanilahue                  |
| Florida                      | Florida                      |
| Hualpén                      | Hualpén                      |
| Hualqui                      | Hualqui                      |
| Laja                         | Laja                         |
| Lebu                         | Lebu                         |
| Los Álamos                   | Los Álamos                   |
| Los Ángeles                  | Los Ángeles                  |
| Lota                         | Lota                         |
| Mulchén                      | Mulchén                      |
| Nacimiento                   | Nacimiento                   |
| Negrete                      | Negrete                      |
| Penco                        | Penco                        |
| Quilaco                      | Quilaco                      |
| Quilleco                     | Quilleco                     |
| San Pedro de la Paz          | San Pedro de la Paz          |
| San Rosendo                  | San Rosendo                  |
| Santa Bárbara                | Santa Bárbara                |
| Santa Juana                  | Santa Juana                  |
| Talcahuano                   | Talcahuano                   |
| Tirúa                        | Tirúa                        |
| Tomé                         | Tomé                         |
| Tucapel                      | Tucapel                      |
| Yumbel                       | Yumbel                       |
| Angol                        | Angol                        |
| Carahue                      | Carahue                      |
| Cholchol                     | Cholchol                     |
| Collipulli                   | Collipulli                   |
| Cunco                        | Cunco                        |
| Curacautín                   | Curacautín                   |
| Curarrehue                   | Curarrehue                   |
| Ercilla                      | Ercilla                      |
| Freire                       | Freire                       |
| Galvarino                    | Galvarino                    |
| Gorbea                       | Gorbea                       |
| Lautaro                      | Lautaro                      |
| Loncoche                     | Loncoche                     |
| Lonquimay                    | Lonquimay                    |
| Los Sauces                   | Los Sauces                   |
| Lumaco                       | Lumaco                       |
| Melipeuco                    | Melipeuco                    |
| Nueva Imperial               | Nueva Imperial               |
| Padre Las Casas              | Padre Las Casas              |
| Perquenco                    | Perquenco                    |
| Pitrufquén                   | Pitrufquén                   |
| Pucón                        | Pucón                        |
| Purén                        | Purén                        |
| Renaico                      | Renaico                      |
| Saavedra                     | Saavedra                     |
| Temuco                       | Temuco                       |
| Teodoro Schmidt              | Teodoro Schmidt              |
| Toltén                       | Toltén                       |
| Traiguén                     | Traiguén                     |
| Victoria                     | Victoria                     |
| Vilcún                       | Vilcún                       |
| Villarrica                   | Villarrica                   |
| Corral                       | Corral                       |
| Futrono                      | Futrono                      |
| La Unión                     | La Unión                     |
| Lago Ranco                   | Lago Ranco                   |
| Lanco                        | Lanco                        |
| Los Lagos                    | Los Lagos                    |
| Mariquina                    | Mariquina                    |
| Máfil                        | Máfil                        |
| Paillaco                     | Paillaco                     |
| Panguipulli                  | Panguipulli                  |
| Río Bueno                    | Río Bueno                    |
| Valdivia                     | Valdivia                     |
| Ancud                        | Ancud                        |
| Calbuco                      | Calbuco                      |
| Castro                       | Castro                       |
| Chaitén                      | Chaitén                      |
| Chonchi                      | Chonchi                      |
| Cochamó                      | Cochamó                      |
| Curaco de Vélez              | Curaco de Vélez              |
| Dalcahue                     | Dalcahue                     |
| Fresia                       | Fresia                       |
| Frutillar                    | Frutillar                    |
| Futaleufú                    | Futaleufú                    |
| Hualaihué                    | Hualaihué                    |
| Llanquihue                   | Llanquihue                   |
| Los Muermos                  | Los Muermos                  |
| Maullín                      | Maullín                      |
| Osorno                       | Osorno                       |
| Palena                       | Palena                       |
| Puerto Montt                 | Puerto Montt                 |
| Puerto Octay                 | Puerto Octay                 |
| Puerto Varas                 | Puerto Varas                 |
| Puqueldón                    | Puqueldón                    |
| Purranque                    | Purranque                    |
| Puyehue                      | Puyehue                      |
| Queilén                      | Queilén                      |
| Quellón                      | Quellón                      |
| Quemchi                      | Quemchi                      |
| Quinchao                     | Quinchao                     |
| Río Negro                    | Río Negro                    |
| San Juan de la Costa         | San Juan de la Costa         |
| San Pablo                    | San Pablo                    |
| Aisén                        | Aisén                        |
| Chile Chico                  | Chile Chico                  |
| Cisnes                       | Cisnes                       |
| Cochrane                     | Cochrane                     |
| Coihaique                    | Coihaique                    |
| Guaitecas                    | Guaitecas                    |
| Lago Verde                   | Lago Verde                   |
| O’Higgins                    | O’Higgins                    |
| Río Ibáñez                   | Río Ibáñez                   |
| Tortel                       | Tortel                       |
| Antártica                    | Antártica                    |
| Cabo de Hornos (Ex Navarino) | Cabo de Hornos (Ex Navarino) |
| Laguna Blanca                | Laguna Blanca                |
| Natales                      | Natales                      |
| Porvenir                     | Porvenir                     |
| Primavera                    | Primavera                    |
| Punta Arenas                 | Punta Arenas                 |
| Río Verde                    | Río Verde                    |
| San Gregorio                 | San Gregorio                 |
| Timaukel                     | Timaukel                     |
| Torres del Paine             | Torres del Paine             |
| {% endtab %}                 |                              |

{% tab title="Marital status (PE)" %}

| Value         | Description |
| ------------- | ----------- |
| single        | Single      |
| married       | Married     |
| cohabiting    | Cohabiting  |
| divorced      | Divorced    |
| widowed       | Widowed     |
| {% endtab %}  |             |
| {% endtabs %} |             |

### 2.2. Advanced-level registration

{% tabs %}
{% tab title="cURL" %}

```bash
POST /api/nb/account/register HTTP/1.1
Host: https://api.notbank.com
Content-Type: application/json
aptoken: <token>

{
  // include all basic registration parameters plus the following parameters:
  "pep": false,  // is a politically exposed person
  "is_public_servant": true,  // is a public servant
  "subject_comply": false,  // is a regulated entity
}

---

{
  "status": "success",
  "data": {
    "userId": "<client-user-id>",
    "token": "<client-jwt>"
  }
}
```

{% endtab %}
{% endtabs %}

## 3. Verify a customer's identity (KYC and KYB)

Once your customer is registered, you can request an identity verification link for them to complete the verification process directly with Notbank. If your customer is an individual, the link is for KYC (Know Your Customer) verification. If it is a company, the link is for KYB (Know Your Business) verification. Notbank determines the type of verification based on the customer, so the same endpoint is used in both cases.

The link must be provided to your customer, who must open it and complete the requested steps (for example, an identity document and liveness check for individuals, or company information and details about its representatives for companies). The `clientUserId` parameter corresponds to the `user_id` returned during registration.

### 3.1 Check the verification status

Before requesting a link, you can check the status of your client's verification. If a valid link already exists, it will be returned in the link field.

{% tabs %}
{% tab title="HTTP" %}

```bash
GET /api/nb/caas/<clientUserId>/identity-verification HTTP/1.1
Host: https://api.notbank.com
aptoken: <ap-token>

---

{
  "status": "success",
  "data": {
    "verification_type": "person",  // person (KYC) or company (KYB)
    "status": "available",
    "link": null,
    "retry_available_at": null
  }
}
```

{% endtab %}
{% endtabs %}

### 3.2 Request a verification link

If the verification status is available, you can request a new link. For any other status, the request will return an error with the code `identity_verification_<estado>` and the current status in the data field.

{% tabs %}
{% tab title="HTTP" %}

```bash
POST /api/nb/caas/<clientUserId>/identity-verification HTTP/1.1
Host: https://api.notbank.com
aptoken: <ap-token>

---

// Example response for a person (KYC):

{
  "status": "success",
  "data": {
    "verification_type": "person",
    "status": "link_created",
    "link": "<link-de-verificacion-kyc>",
    "retry_available_at": null
  }
}

// Example response for a company (KYB):

{
  "status": "success",
  "data": {
    "verification_type": "company",
    "status": "link_created",
    "link": "<link-de-verificacion-kyb>",
    "retry_available_at": null
  }
}
```

{% endtab %}
{% endtabs %}

### 3.3 Glossary

`verification_type`: verification type. person for individuals (KYC) and company for businesses (KYB).&#x20;

`link`: URL that your client must open to complete verification. It is `null` when there is no valid link.&#x20;

`retry_available_at`: date and time (UTC, ISO 8601 format) from which a new link can be requested when verification is in progress. It is `null` in all other cases.&#x20;

`status`: verification status. Possible values are:

* `available`: a verification link can be requested.
* `link_created`: a valid link already exists and is returned in the link field. Your client must complete it.
* `in_progress`: your client has started verification but has not completed it. You can request a new link starting at retry\_available\_at.
* `in_review`: verification has been submitted and is under review.
* `verified`: the client's identity is verified.
* `rejected`: verification was rejected.
* `max_attempts_reached`: the client has reached the maximum number of verification attempts.
* `phone_required`: the client must have a phone number on file before requesting the link (businesses only).
* `not_eligible`: the client cannot start verification yet (for example, because they have not completed registration). Possible errors when requesting a link:
* `identity_verification_<estado>`: a link cannot be generated in the current verification status.
* `identity_verification_link_unavailable`: it was not possible to generate a link at this time. Please try again later.
* `child_not_under_reliance`: the specified client is not associated with your Crypto as a Service (CaaS) service.

## 4. Get accounts

**Notbank** offers you different types of accounts: the **primary account**, designed for your day-to-day transactions, the **yield account**, designed to put your money to work and earn returns. You can also create **multiple subaccounts**, allowing you to keep your balances perfectly organized—for example, by separating your operating funds from your savings.

{% hint style="warning" %}
If you need to perform the operation on your client's account, you must include the parameters `user_id` returned during registration, and the value of the  `account_id`  parameter must be your client's account. Otherwise, only your `account_id` and the operation will be performed on the authenticated user.
{% endhint %}

{% tabs %}
{% tab title="cURL" %}

```bash
GET /api/nb/account?user_id=<clientUserId>&account_id=<clientAccountId> HTTP/1.1
Host: https://api.notbank.com
aptoken: <token>

----

{
  "status": "success",
  "data": [
    {
      "id": 12345,  // account_id
      "type": 1,
    }, ...
  ]
}
```

{% endtab %}
{% endtabs %}

### 4.1 Glossary

{% tabs %}
{% tab title="Account type" %}

| Value         | Description              |
| ------------- | ------------------------ |
| 1             | Primary account. Single. |
| 3             | Yield account. Single.   |
| 5             | Subaccount. Multiple.    |
| {% endtab %}  |                          |
| {% endtabs %} |                          |

## 5. Receive and send cryptocurrency

Notbank's cryptocurrency wallets **Notbank** offer a secure and accessible gateway to the dynamic world of digital assets. Designed to meet the needs of both newcomers and experienced investors, they stand out for their broad compatibility, supporting a wide **variety of leading market currencies and networks** , allowing users to manage their portfolios in one convenient place. A key feature of Notbank is its commitment to user profitability, offering **low fees** that optimize every transaction. Security is also a top priority; backed by Notbank, these wallets incorporate state-of-the-art protection protocols and advanced security measures to ensure that users' funds and privacy are safeguarded at all times.

### 5.1. Create a wallet to receive cryptocurrency

#### 5.1.1 Get available networks

Given the large number of currencies and networks supported by Notbank, you must first get the available networks for a cryptocurrency.

{% tabs %}
{% tab title="cURL" %}

```bash
GET /api/nb/wallet/crypto/withdrawal/templates?currency=USDT HTTP/1.1
Host: https://api.notbank.com
aptoken: <token>

----

{
  "status": "success",
  "data": [
    {
      "currency": "USDT",
      "network": "USDT_ETH",
      "network_name": "Ethereum",
      "network_protocol": "ERC-20",
      "template": [...]
    }, ...
  ]
}
```

{% endtab %}

{% tab title="Node" %}

```js
// ...
const networks = await restClient.getWalletService().getNetworksTemplates({
  currency: "USDT"
});

console.log(networks);
// [
//   {
//     currency: 'USDT',
//     network: 'USDT_BSC',
//     network_name: 'BNB Smart Chain',
//     network_protocol: 'BEP-20',
//     template: [
//       [Object],
//       [Object]
//     ]
//   }
// ]
```

{% endtab %}
{% endtabs %}

#### 5.1.2 Get a wallet

Using the network code ( `network` ) obtained in the previous step, along with the currency code (`currency`), you can request your wallet address.&#x20;

{% hint style="warning" %}
If you need to perform the operation on your client's account, you must include the parameters `user_id` returned during registration, and the value of the  `account_id`  parameter must be your client's account. Otherwise, only your `account_id` and the operation will be performed on the authenticated user.
{% endhint %}

{% tabs %}
{% tab title="cURL" %}

```bash
GET /api/nb/wallet/crypto?user_id=clientUserId&account_id=clientAccountId&currency=USDT&network=USDT_ETH HTTP/1.1
Host: https://api.notbank.com
aptoken: <token>

----

{
  "status": "success",
  "data": [
    "2N3r9roRrHy7p6C5pGE8NQP9ZNT81H7ZKyU"
  ]
}
```

{% endtab %}

{% tab title="Node" %}

```js
// ...
const addresses = await restClient.getWalletService().getDepositAddresses({
  user_id: clientUserId
  account_id: clientAccountId,
  currency: "USDT",
  network: "USDT_ETH",
});

console.log(addresses)
// ["2N3r9roRrHy7p6C5pGE8NQP9ZNT81H7ZKyU"]
```

{% endtab %}
{% endtabs %}

### 5.2 Add an address to the whitelist

To ensure the maximum security of your assets, Notbank requires you to register destination addresses on a whitelist before making any cryptocurrency transfers. This additional security measure helps prevent unauthorized withdrawals and ensures that your funds are sent only to trusted wallets that you have verified.

#### 5.2.1 Add an address

{% hint style="warning" %}
If you need to perform the operation on your client's account, you must include the parameters `user_id` returned during registration, and the value of the  `account_id`  parameter must be your client's account. Otherwise, only your `account_id` and the operation will be performed on the authenticated user.
{% endhint %}

{% tabs %}
{% tab title="Node" %}

```js
// ...
const whitelistAddressId = await restClient.getWalletService().addWhitelistedAddress({
  user_id: clientUserId
  account_id: clientAccountId,
  currency: "USDT",
  network: "USDT_ETH",
  address: "2N3r9roRrHy7p6C5pGE8NQP9ZNT81H7ZKyU",
  label: "test-address-name",
  otp: "123456"
});

console.log(whitelistAddressId);
// f3d1ddc3-2767-4b99-8763-a0990361009d
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
The value of the `otp` parameter is the two-factor authentication code provided by your external app when you request your transfer.
{% endhint %}

{% hint style="info" %}
Notbank will send a **confirmation code** to your phone number, which you will need to use to confirm the new address you are adding to the whitelist.
{% endhint %}

#### 5.2.2 Confirm an address

{% hint style="warning" %}
If you need to perform the operation on your client's account, you must include the parameters `user_id` returned during registration, and the value of the  `account_id`  parameter must be your client's account. Otherwise, only your `account_id` and the operation will be performed on the authenticated user.
{% endhint %}

{% tabs %}
{% tab title="Node" %}

<pre class="language-js"><code class="lang-js">// ...
await restClient.getWalletService().confirmWhitelistedAddress({
<strong>  user_id: clientUserId
</strong>  account_id: clientAccountId,
  whitelistedAddressId: "f3d1ddc3-2767-4b99-8763-a0990361009d",
  sms_code: "1234567",
});
</code></pre>

{% endtab %}
{% endtabs %}

### 5.3 Send your cryptocurrency to another wallet

{% hint style="warning" %}
If you need to perform the operation on your client's account, you must include the parameters `user_id` returned during registration, and the value of the  `account_id`  parameter must be your client's account. Otherwise, only your `account_id` and the operation will be performed on the authenticated user.
{% endhint %}

{% tabs %}
{% tab title="cURL" %}

```bash
POST /api/nb/wallet/crypto/withdrawal HTTP/1.1
Host: https://api.notbank.com
aptoken: <token>
Content-Type: application/json

{
  "user_id": clientUserId,
  "account_id": clientAccountId,
  "currency": "USDT",
  "network": "USDT_BSC",
  "address": "2N3r9roRrHy7p6C5pGE8NQP9ZNT81H7ZKyU",
  "amount": 12.3,
  "otp": "123456"
}

----

{
  "status": "success",
  "data": "0ea47288-76dd-4dd5-a544-e8af547ed3c7"
}
```

{% endtab %}

{% tab title="Node" %}

```js
// ...
const withdraw = await restClient.getWalletService().createCryptoWithdraw({
  user_id: clientUserId
  account_id: clientAccountId,
  currency: "USDT",
  network: "USDT_BSC",
  address: "2N3r9roRrHy7p6C5pGE8NQP9ZNT81H7ZKyU",
  amount: 12.3,
  otp: "123456"
});

console.log(withdraw);
// 0ea47288-76dd-4dd5-a544-e8af547ed3c7
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
The value of the `otp` parameter is the two-factor authentication code provided by your external app when you request your transfer.
{% endhint %}

## 6. Transfer Funds

### 6.1 Transfer Funds Using Account IDs

In this example, we’ll request a transfer of `1000` `USDT` from your `accountId` account to your client's `clientAccountId` .

{% tabs %}
{% tab title="cURL" %}

```bash
POST /api/nb/wallet/transfer-funds HTTP/1.1
Host: https://api.notbank.com
aptoken: <token>
Content-Type: application/json

{
  "sender_account_id": accountId,
  "receiver_account_id": clientAccountId,
  "currency_name": "USDT",
  "amount": "1000",
  "notes": "Test note",  // optional
  "otp": "123456"
}

----

{
  "status": "success",
  "data": 12345 // transfer identifier
}
```

{% endtab %}

{% tab title="Node" %}

```js
import Notbank from 'notbank'

const transferId = await restClient.getWalletService().transferFunds({
  "sender_account_id": accountId,
  "receiver_account_id": clientAccountId,
  "currency_name": "USDT",
  "amount": 1000,
  "notes": "Test note",
  "otp": "123456"
});

console.log(transferId)
// 12345
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
The value of the `otp` parameter is the two-factor authentication code provided by your external app when you request your transfer.
{% endhint %}

## 7. Buy, Sell, and Convert Cryptocurrencies

Discover **Simple**, the feature designed to make buying, selling, and converting cryptocurrencies a simple, fast, and secure experience for everyone. Forget complex interfaces and order types; with Simple, you can execute transactions intuitively in just a few steps. This tool is perfect both for people new to crypto and for advanced users looking for speed. In addition to being easy to use, Simple stands out for offering low transaction fees, helping you optimize your trades and making your foray into the crypto market not only efficient but also accessible.

### 7.1 Buy Cryptocurrencies with Fiat Currency

In this example, we’ll request the amount of Tether (USDT) we would receive for 100,000 Brazilian reais (BRL). Then we’ll check the quoted amount, which is valid for 20 seconds, and finally execute the purchase.

{% hint style="info" %}
The amounts shown in the examples are for educational purposes and do not represent current market conditions.
{% endhint %}

#### 7.1.1 Request a Quote

{% hint style="warning" %}
If you need to perform the operation on your client's account, you must include the parameters `user_id` returned during registration, and the value of the  `account_id`  parameter must be your client's account. Otherwise, only your `account_id` and the operation will be performed on the authenticated user.
{% endhint %}

{% tabs %}
{% tab title="Node" %}

```js
const quoteId = await restClient.getQuoteService().createDirectQuote({
  from_currency: "BRL",
  from_amount: 100000,
  to_currency: "USDT",
  operation: 1, // BUY
  user_id: clientUserId
  account_id: clientAccountId,
});

console.log(quoteId)
// c1c56ca3-75c3-4bb6-97e3-702448382cd3
```

{% endtab %}
{% endtabs %}

#### 7.1.2 Check the Quote

{% hint style="warning" %}
If you need to perform the operation on your client's account, you must include the parameters `user_id` returned during registration, and the value of the  `account_id`  parameter must be your client's account. Otherwise, only your `account_id` and the operation will be performed on the authenticated user.
{% endhint %}

{% tabs %}
{% tab title="Node" %}

```js
// ...
const quote = await restClient.getQuoteService().getQuote({
  quote_id: "c1c56ca3-75c3-4bb6-97e3-702448382cd3",
  user_id: clientUserId
  account_id: clientAccountId,
});

console.log(quote.status)
// 0 // pending
console.log(quote.amount_out)
// 0.0013 // USDT
```

{% endtab %}
{% endtabs %}

#### 7.1.3 Execute the Quote

{% hint style="warning" %}
If you need to perform the operation on your client's account, you must include the parameters `user_id` returned during registration, and the value of the  `account_id`  parameter must be your client's account. Otherwise, only your `account_id` and the operation will be performed on the authenticated user.
{% endhint %}

{% tabs %}
{% tab title="Node" %}

```js
// ...
const quote = await client.getQuoteService().executeQuote({
  quote_id: "c1c56ca3-75c3-4bb6-97e3-702448382cd3",
  user_id: clientUserId
  account_id: clientAccountId,
});

console.log(quote.status)
// 0 // pending
console.log(quote.amount_out)
// 0.0013 // USDT

// After a few moments, check the request status again
const quote = await restClient.getQuoteService().getQuote({
  quote_id: "c1c56ca3-75c3-4bb6-97e3-702448382cd3",
  user_id: clientUserId
  account_id: clientAccountId,
});

console.log(quote.status)
// 1 // executed
console.log(quote.amount_out)
// 0.0013 // USDT
```

{% endtab %}
{% endtabs %}

### 7.2 Selling cryptocurrencies for fiat currency

In this example, we'll request the amount of Brazilian reals (BRL) we would receive for 0.0013 Tether (USDT). Then we'll check the quoted amount, which is valid for 20 seconds, and finally execute the purchase.

{% hint style="info" %}
The amounts shown in the examples are for educational purposes and do not represent current market conditions.
{% endhint %}

#### 7.2.1 Request a quote

{% hint style="warning" %}
If you need to perform the operation on your client's account, you must include the parameters `user_id` returned during registration, and the value of the  `account_id`  parameter must be your client's account. Otherwise, only your `account_id` and the operation will be performed on the authenticated user.
{% endhint %}

{% tabs %}
{% tab title="Node" %}

```js
const quoteId = await restClient.getQuoteService().createDirectQuote({
  from_currency: "USDT",
  from_amount: 0.0013,
  to_currency: "BRL",
  operation: 2, // SELL
  user_id: clientUserId
  account_id: clientAccountId,
});

console.log(quoteId)
// 1b09948d-2169-4f93-84ec-a55fb1741663
```

{% endtab %}
{% endtabs %}

#### 7.2.2 Retrieve a quote

{% hint style="warning" %}
If you need to perform the operation on your client's account, you must include the parameters `user_id` returned during registration, and the value of the  `account_id`  parameter must be your client's account. Otherwise, only your `account_id` and the operation will be performed on the authenticated user.
{% endhint %}

{% tabs %}
{% tab title="Node" %}

```js
// ...
const quote = await restClient.getQuoteService().getQuote({
  quote_id: "c1c56ca3-75c3-4bb6-97e3-702448382cd3",
  user_id: clientUserId
  account_id: clientAccountId,
});

console.log(quote.status)
// 0 // pending
console.log(quote.amount_out)
// 100000 // BRL
```

{% endtab %}
{% endtabs %}

#### 7.2.3 Execute a quote

{% hint style="warning" %}
If you need to perform the operation on your client's account, you must include the parameters `user_id` returned during registration, and the value of the  `account_id`  parameter must be your client's account. Otherwise, only your `account_id` and the operation will be performed on the authenticated user.
{% endhint %}

{% tabs %}
{% tab title="Node" %}

```js
// ...
const quote = await client.getQuoteService().executeQuote({
  quote_id: "1b09948d-2169-4f93-84ec-a55fb1741663",
  user_id: clientUserId
  account_id: clientAccountId,
});

console.log(quote.status)
// 0 // pending
console.log(quote.amount_out)
// 100000 // BRL

// After a few moments, check the request status again
const quote = await restClient.getQuoteService().getQuote({
  quote_id: "1b09948d-2169-4f93-84ec-a55fb1741663",
  user_id: clientUserId
  account_id: clientAccountId,
});

console.log(quote.status)
// 1 // executed
console.log(quote.amount_out)
// 100000 // BRL
```

{% endtab %}
{% endtabs %}

### 7.3 Convert cryptocurrencies

**Notbank offers you two quote types for currency conversion.** With a direct quote, simply enter the amount you want to convert and select the source and destination currencies; the system will immediately show you how much you will receive in the final currency. An inverse quote works the other way around: you specify the amount you need to receive in the destination currency and select the source currency, and the system automatically calculates how much you need in the original currency to get exactly that amount. This lets you choose the option that best suits your needs: calculate the result of a conversion or determine how much you need to have in the starting currency.

{% hint style="success" %}
Conversions are not limited to cryptocurrency-to-cryptocurrency transactions; any combination is possible: cryptocurrency to cryptocurrency, fiat currency to cryptocurrency, cryptocurrency to fiat currency, and fiat currency to fiat currency.
{% endhint %}

{% hint style="info" %}
The amounts shown in the examples are for educational purposes and do not represent current market conditions.
{% endhint %}

#### 7.3.1 Request a quote

{% hint style="warning" %}
If you need to perform the operation on your client's account, you must include the parameters `user_id` returned during registration, and the value of the  `account_id`  parameter must be your client's account. Otherwise, only your `account_id` and the operation will be performed on the authenticated user.
{% endhint %}

In this example, we'll request the amount of Tether (USDT) we would receive for 1 Bitcoin (BTC). Then we'll check the quoted amount, which is valid for 20 seconds, and finally execute the purchase.

{% tabs %}
{% tab title="Node" %}

```js
// direct quote
const quoteId = await restClient.getQuoteService().createDirectQuote({
  from_currency: "BTC",
  from_amount: 1,
  to_currency: "USDT",
  operation: 3, // CONVERSION
  user_id: clientUserId
  account_id: clientAccountId,
});

console.log(quoteId)
// fc4ffe0e-b87a-4e1f-a727-f6ddae7dc1e0
```

{% endtab %}
{% endtabs %}

In this example, we'll request the amount of Bitcoin (BTC) we would need to get 100 Tether (USDT). Then we'll check the quoted amount, which is valid for 20 seconds, and finally execute the purchase.

{% tabs %}
{% tab title="Node" %}

```js
// inverse quote
const quoteId = await restClient.getQuoteService().createInverseQuote({
  from_currency: "BTC",
  to_amount: 100,
  to_currency: "USDT",
  operation: 3, // CONVERSION
  user_id: clientUserId
  account_id: clientAccountId,
});

console.log(quoteId)
// fc4ffe0e-b87a-4e1f-a727-f6ddae7dc1e0
```

{% endtab %}
{% endtabs %}

#### 7.3.2 Retrieve a quote

{% hint style="warning" %}
If you need to perform the operation on your client's account, you must include the parameters `user_id` returned during registration, and the value of the  `account_id`  parameter must be your client's account. Otherwise, only your `account_id` and the operation will be performed on the authenticated user.
{% endhint %}

{% tabs %}
{% tab title="Node" %}

```js
// ...
const quote = await restClient.getQuoteService().getQuote({
  quote_id: "fc4ffe0e-b87a-4e1f-a727-f6ddae7dc1e0",
  user_id: clientUserId
  account_id: clientAccountId,
});

console.log(quote.status)
// 0 // pending
console.log(quote.amount_out)
// 30 // USDT
```

{% endtab %}
{% endtabs %}

#### 7.3.3 Execute a quote

{% hint style="warning" %}
If you need to perform the operation on your client's account, you must include the parameters `user_id` returned during registration, and the value of the  `account_id`  parameter must be your client's account. Otherwise, only your `account_id` and the operation will be performed on the authenticated user.
{% endhint %}

{% tabs %}
{% tab title="Node" %}

```js
// ...
const quote = await client.getQuoteService().executeQuote({
  quote_id: "fc4ffe0e-b87a-4e1f-a727-f6ddae7dc1e0",
  user_id: clientUserId
  account_id: clientAccountId,
});

console.log(quote.status)
// 0 // pending
console.log(quote.amount_out)
// 30 // USDT

// After a few moments, check the request status again
const quote = await restClient.getQuoteService().getQuote({
  quote_id: "fc4ffe0e-b87a-4e1f-a727-f6ddae7dc1e0",
  user_id: clientUserId
  account_id: clientAccountId,
});

console.log(quote.status)
// 1 // executed
console.log(quote.amount_out)
// 30 // USDT
```

{% endtab %}
{% endtabs %}

## 8. Deposit and withdraw fiat currency

To make managing funds easier, Notbank offers its users a wide range of payment methods designed to suit their needs. Customers can quickly and securely add fiat currency to their accounts using traditional options such as bank transfers and credit cards, or by connecting to modern payment gateways. This flexibility ensures that every user can manage their funds conveniently and with the highest standards of financial security.

### 8.1 Retrieve deposit bank accounts

Notbank offers a service for retrieving Notbank bank accounts for `general`, to which customers must deposit funds to add a balance to their local currency wallets.

{% hint style="info" %}
**IMPORTANT**: Use bank accounts associated with the same identity verified with Notbank to ensure the balance is allocated correctly.
{% endhint %}

{% tabs %}
{% tab title="HTTP" %}

```bash
GET /api/nb/bank-deposits?user_id=clientUserId HTTP/1.1
Host: https://api.notbank.com
Content-Type: application/json
aptoken: <ap-token>

---

{
  "status": "success",
  "data": [
    {
      "id": "41d63634-2f2a-47b8-8dd5-55b81fe87243",
      "currency": "CLP",
      "bank": "BCI (BCO DE CREDITO E INV)",
      "identity_number": "76.590.133-2",
      "identity_type": "RUT",
      "company_name": "CryptoMKT SpA",
      "account_type": "Checking account",
      "account_number": "32782381",
      "agency": null,
      "email": "transferencias@cryptomkt.com",
      "created_at": "2026-07-31T15:57:08",
      "updated_at": "2026-07-31T15:57:08"
    },
    {
      "id": "5885ce0e-474e-4e7d-b499-28cca702c58d",
      "currency": "ARS",
      "bank": "BANCO COINAG S.A.",
      "identity_number": "30715538063",
      "identity_type": "CUIT",
      "company_name": "Cryptomkt S.A.",
      "account_type": "Virtual account",
      "account_number": "0000053600000000890630",
      "agency": null,
      "email": "transferencias@cryptomkt.com",
      "created_at": "2026-07-31T16:16:08",
      "updated_at": "2026-07-31T16:16:08"
    },
    {
      "id": "8f8877b6-2495-4ee9-81bd-100dd9089235",
      "currency": "BRL",
      "bank": "BANCO GENIAL S.A. (ex BRASIL PLURAL S.A.)",
      "identity_number": "28183128000157",
      "identity_type": "CNPJ",
      "company_name": "CRYPTOMKT SERVICOS DIGITAIS LTDA",
      "account_type": "Legal entity",
      "account_number": "4351-6",
      "agency": "0001",
      "email": "transferencias@cryptomkt.com",
      "created_at": "2026-07-31T16:18:46",
      "updated_at": "2026-07-31T16:18:46"
    },
    {
      "id": "fe85a901-0351-4f5b-8f7f-ea8439c02dfe",
      "currency": "PEN",
      "bank": "DALE",
      "identity_number": "20606503858",
      "identity_type": "RUC",
      "company_name": "CryptoMKT Peru SAC",
      "account_type": "Electronic money account",
      "account_number": "92200200000336442611",
      "agency": null,
      "email": "transferencias@cryptomkt.com",
      "created_at": "2026-07-31T16:43:53",
      "updated_at": "2026-07-31T16:43:53"
    }
  ]
}
```

{% endtab %}
{% endtabs %}

#### 8.1.1 Retrieve virtual or FBO deposit bank accounts

Virtual and FBO accounts are the customer's own bank accounts, managed by Notbank. Each customer has a unique account number that they can use to deposit local currency into their Notbank account. The following are currently available:

* Virtual account (`type=virtual`) in Colombian pesos (COP), using a Bre-B key (`account_type=bre-b`).
* FBO account (`type=fbo`) in US dollars (USD), with bank details for receiving transfers through the corresponding network (`account_type` can be `swift`, `ach` or `fedwire`).&#x20;

The same endpoint from the previous section returns the client's virtual and FBO accounts alongside Notbank's general accounts (`type=general`). You can filter the results using the optional parameters `type` (`general`, `virtual` or `fbo`) and currency. If you need to perform the operation on your client's account, you must include the `user_id` returned in the record. Otherwise, the operation will be performed on the authenticated user.

{% tabs %}
{% tab title="HTTP" %}

```bash
GET /api/nb/bank-deposits?user_id=clientUserId HTTP/1.1
Host: https://api.notbank.com
Content-Type: application/json
aptoken: <ap-token>

---

{
  "status": "success",
  "data": [
    {
      "id": "41d63634-2f2a-47b8-8dd5-55b81fe87243",
      "type": "general",
      "currency": "CLP",
      "bank": "BCI (BCO DE CREDITO E INV)",
      "identity_number": "76.590.133-2",
      "identity_type": "RUT",
      "company_name": "CryptoMKT SpA",
      "account_type": "Checking account",
      "account_number": "32782381",
      "agency": null,
      "email": "transferencias@cryptomkt.com",
      "created_at": "2026-07-31T15:57:08",
      "updated_at": "2026-07-31T15:57:08"
    },
    {
      "id": "41d63634-2f2a-47b8-8dd5-55b81fe87243",
      "type": "virtual",
      "currency": "COP",
      "account_type": "bre-b",
      "account_number": "JUANPEREZ01",
      "created_at": "2026-07-31T15:57:08",
      "updated_at": "2026-07-31T15:57:08"
    },
    {
      "id": "41d63634-2f2a-47b8-8dd5-55b81fe87243",
      "type": "fbo",
      "currency": "USD",
      "account_type": "swift",
      "account_number": "40000010851",
      "created_at": "2026-07-31T15:57:08",
      "updated_at": "2026-07-31T15:57:08",
      "beneficiary": {
        "name": "beneficiary-name",
        "address": "beneficiary-address",
        "account_number": "40000010851",
        "bank": {
          "name": "bank-name",
          "swift": "XXXXXXXXXXX",
          "routing_number": "123456789"
        }
      },
      "intermediary_bank": {
        "name": "bank-name",
        "routing_number": "123456789",
        "bic_code": "XXXXXXXXXXX"
      }
    }
  ]
}
```

{% endtab %}
{% endtabs %}

### 8.2 Create a virtual or FBO deposit bank account

{% hint style="warning" %}
If you need to perform the operation on your client's account, you must include the `user_id` returned in the record. Otherwise, the operation will be performed on the authenticated user.
{% endhint %}

Account creation is asynchronous: the request is received immediately, and the account will appear in the deposit accounts list (section 7.1.1) once it is enabled.

#### 8.2.1 Virtual account in COP (Bre-B)

The account\_number parameter corresponds to the Bre-B key the client wants to register. It must be alphanumeric, contain no spaces, and be between 5 and 20 characters long. Each client can have only one Bre-B key.

{% tabs %}
{% tab title="HTTP" %}

```bash
POST /api/nb/bank-deposits HTTP/1.1
Host: hostname goes here...
aptoken: 2c262ce0-aebf-4dcb-8a70-cd60506a9ac8
Content-Type: application/json

{
  "type": "virtual",
  "currency": "COP",
  "account_number": "JUANPEREZ01",
  "user_id": clientUserId
}

---

{
  "status": "success",
  "message": "Request received successfully."
}
```

{% endtab %}
{% endtabs %}

#### 8.2.2 FBO account in USD

The `sources_of_funds` parameter indicates the source of the client's funds and is required for individuals. It accepts one or more of the following values: `income`, `investments`, `sale_of_assets`, `retirement_funds`, `inheritance_gift`, `savings`, `loan_proceeds`, `legal_settlement` and `other`.

{% tabs %}
{% tab title="HTTP" %}

```bash
POST /api/nb/bank-deposits HTTP/1.1
Host: hostname goes here...
aptoken: 2c262ce0-aebf-4dcb-8a70-cd60506a9ac8
Content-Type: application/json

{
  "type": "fbo",
  "currency": "USD",
  "sources_of_funds": ["income", "savings"],
  "user_id": clientUserId
}


---

{
  "status": "success",
  "message": "Request received successfully."
}
```

{% endtab %}
{% endtabs %}

### 8.3 Add a bank account

#### 8.3.1 Get a list of supported banks

{% hint style="warning" %}
If you need to perform the operation on your client's account, you must include the parameters `user_id` returned during registration, and the value of the  `account_id`  parameter must be your client's account. Otherwise, only your `account_id` and the operation will be performed on the authenticated user.
{% endhint %}

{% tabs %}
{% tab title="Node" %}

```js
// ...
const banks = await restClient.getWalletService().getBanks({
  country: "BR"
});

console.log(banks);
// {
//   "status": "success",
//   "data": [
//     {
//       "id": "9ad5a964-f91c-4a7d-8257-119c97cf960a",
//       "name": "CAIXA ECONOMICA FEDERAL",
//       "country": "BR"
//     }, ...
//   ]
// }

```

{% endtab %}
{% endtabs %}

#### 8.3.2 Add a bank account

{% hint style="warning" %}
If you need to perform the operation on your client's account, you must include the parameters `user_id` returned during registration, and the value of the  `account_id`  parameter must be your client's account. Otherwise, only your `account_id` and the operation will be performed on the authenticated user.
{% endhint %}

**8.3.2.1 Add a bank account in dollars**

To withdraw dollars (USD), the customer must register an international bank account. The `kind` parameter indicates the transfer network: `swift` (accounts in any country), `ach` or `fedwire` (US accounts only, `country="US"`). For these accounts, the `bank`parameter is not sent: the bank is identified by `bank_name`, `bank_country` and the `swift` or `routing_number` code, depending on the network.

{% tabs %}
{% tab title="HTTP" %}

```js
// ...
POST /api/nb/bank-accounts HTTP/1.1
aptoken: <ap-token>
Content-Type: application/json

{
  "user_id": clientUserId,
  "country": "US",  // bank account country
  "kind": "swift",  // swift, ach or fedwire
  "number": "40000010851",
  "beneficiary_name": "Juan Perez",
  "person_type": "P",  // P (individual) or L (legal entity)
  "address": "123 Main St",
  "address2": "Apt 4B",  // optional
  "city": "Miami",
  "state": "FL",
  "postal_code": "33101",
  "bank_name": "Bank of America",
  "bank_country": "US",
  // SWIFT only (kind=swift)
  "swift": "BOFAUS3N",
  "intermediary_swift": "CHASUS33",  // optional
  // ACH or Fedwire only (kind=ach or kind=fedwire)
  "routing_number": "026009593",  // 9 digits
  // optional, but if one is provided, the other is required
  "id_type": "passport",  // passport, id_card, driver_license, residence_permit, or national_id
  "id_value": "AB1234567"
}

---

{
  "status": "success",
  "data": {
    "id": "6b8e2f1a-9c3d-4e7b-a2f5-1d0c8b7e6a43",
    "kind": "swift",
    "number": "40000010851",
    "country": "US",
    "currency": "USD",
    "beneficiary_name": "Juan Perez",
    "bank_name": "Bank of America",
    "bank_country": "US",
    "swift": "BOFAUS3N",
    // ...
  }
}
```

{% endtab %}
{% endtabs %}

**8.3.2.2 Add a Brazilian bank account.**

{% tabs %}
{% tab title="Node" %}

```js
// ...
const userBankAccount =  restClient.getWalletService().AddClientBankAccount({
  user_id: clientUserId,
  country: "BR",
  bank: "9ad5a964-f91c-4a7d-8257-119c97cf960a",
  number: "55330450314",
  kind: "br_pix",
  pix_type: "CPF",  // Brazil (BR) only
  // agency: "",  // Brazil (BR) only if kind != br_pix
  // dv: "", // Brazil (BR) only if kind != br_pix
  // province?: string; Peru (PE) only
});

console.log(userBankAccount.id);
// 29cd83cf-3678-4207-80c7-7caaa1d24c27
```

{% endtab %}
{% endtabs %}

#### Glossary

{% tabs %}
{% tab title="Bank account type" %}

<table data-search="false"><thead><tr><th>Country</th><th>Value</th><th>Description</th></tr></thead><tbody><tr><td>Argentina (AR), Chile (CL), Peru (PE), Colombia (CO)</td><td>checking</td><td>Checking account</td></tr><tr><td>Argentina (AR), Chile (CL)</td><td>demand deposit</td><td>Demand deposit account</td></tr><tr><td>Argentina (AR), Chile (CL), Peru (PE), Colombia (CO)</td><td>savings</td><td>Savings account</td></tr><tr><td>Argentina (AR), Chile (CL)</td><td>electronic_checkbook</td><td>Electronic checkbook</td></tr><tr><td>Argentina (AR)</td><td>ar_cbu</td><td>CBU account</td></tr><tr><td>Argentina (AR)</td><td>ar_cvu</td><td>CVU account</td></tr><tr><td>Argentina (AR)</td><td>ar_alias</td><td>Alias</td></tr><tr><td>Brazil (BR)</td><td>br_corriente_fisica</td><td>Individual checking account</td></tr><tr><td>Brazil (BR)</td><td>br_simple_fisica</td><td>Individual simple account</td></tr><tr><td>Brazil (BR)</td><td>br_corriente_juridica</td><td>Legal entity checking account</td></tr><tr><td>Brazil (BR)</td><td>br_poupanca_fisica</td><td>Individual savings account</td></tr><tr><td>Brazil (BR)</td><td>br_poupanca_juridica</td><td>Individual savings account</td></tr><tr><td>Brazil (BR)</td><td>br_caixa_facil</td><td>Caixa Fácil account</td></tr><tr><td>Brazil (BR)</td><td>br_pix</td><td>PIX account</td></tr></tbody></table>
{% endtab %}

{% tab title="PIX account type" %}

| Value         | Description   |
| ------------- | ------------- |
| CPF           | CPF number    |
| CNPJ          | CNPJ number   |
| EMAIL         | Email address |
| Phone         | Phone number  |
| Other         | Other         |
| {% endtab %}  |               |
| {% endtabs %} |               |

### 8.4 Notify a deposit

At Notbank, we have optimized the process of receiving funds to offer you a fast and secure experience when managing your assets. We currently support fiat deposit notifications via **bank transfers** across all the countries where we operate, and we also exclusively integrate **Webpay** for Chile or PIX for Brazil, enabling immediate and efficient validation for users in those regions. We are continuously working to expand our operational capabilities, so new payment methods will soon be added to our API, providing greater flexibility and reach for our global financial solutions.

#### 8.4.1 Bank notification

{% hint style="warning" %}
If you need to perform the operation on your client's account, you must include the parameters `user_id` returned during registration, and the value of the  `account_id`  parameter must be your client's account. Otherwise, only your `account_id` and the operation will be performed on the authenticated user.
{% endhint %}

{% tabs %}
{% tab title="Node" %}

<pre class="language-js"><code class="lang-js">// ...
await restClient.getWalletService().createFiatDeposit({
<strong>  user_id: clientUserId,
</strong>  account_id: clientAccountId,  
  payment_method: 1,  // bank transfer
  currency: "BRL",
  amount: 1000,
  bank_account_id: "29cd83cf-3678-4207-80c7-7caaa1d24c27",
  // voucher: File. Solo PE (Perú).
});
</code></pre>

{% endtab %}
{% endtabs %}

### 8.5 Notify a withdrawal

Notbank ensures a global financial experience by offering fiat currency withdrawal services in all countries where the platform operates, allowing users to efficiently convert their digital assets into local currency. However, it is important to note that there is a special case for Argentina: due to specific validation processes in that region, users must confirm the withdrawal notification in the app to complete the transaction successfully.

#### 8.5.1 Bank withdrawal notification

{% hint style="warning" %}
If you need to perform the operation on your client's account, you must include the parameters `user_id` returned during registration, and the value of the  `account_id`  parameter must be your client's account. Otherwise, only your `account_id` and the operation will be performed on the authenticated user.
{% endhint %}

{% tabs %}
{% tab title="Node" %}

```js
await restClient.getWalletService().createFiatWithdraw({
  user_id: clientUserId,
  account_id: clientAccountId, 
  payment_method: 1,
  currency: "BRL",
  amount: 1000,
  bank_account_id: "29cd83cf-3678-4207-80c7-7caaa1d24c27"
});
```

{% endtab %}
{% endtabs %}

#### 8.5.2 **Notify a bank withdrawal in USD**&#x20;

For USD withdrawals, the destination bank account (`bank_account_id`) must be a previously registered USD account of type `swift`, `ach` or `fedwire`, registered in advance. You may optionally include the `memo`parameter, whose maximum length depends on the account type: 20 characters for `ACH`and 35 for `Fedwire` and 120 for `Swift`.

{% tabs %}
{% tab title="HTTP" %}

```javascript
await restClient.getWalletService().createFiatWithdraw({
  user_id: clientUserId,
  account_id: clientAccountId,
  payment_method: 1,  // bank transfer
  currency: "USD",
  amount: 1000,
  bank_account_id: "6b8e2f1a-9c3d-4e7b-a2f5-1d0c8b7e6a43",
  memo: "Monthly withdrawal"  // optional
});
```

{% endtab %}
{% endtabs %}

#### 8.5.3 Bank withdrawal notification in Argentina

**8.5.3.1 Get information about a destination CBU account**

{% tabs %}
{% tab title="Node" %}

```js
// ...
const owners = await restClient.getWalletService().getOwnersFiatWithdraw({
  cbu: "6845784411100069899422"
});

console.log(owners);
// [
//   {
//     "person_type": "F",
//     "cuit": "CUIT number",
//     "name": "Person name"
//   }, ...
// ]
```

{% endtab %}
{% endtabs %}

**8.5.3.2 Notify a bank withdrawal**

{% hint style="warning" %}
If you need to perform the operation on your client's account, you must include the parameters `user_id` returned during registration, and the value of the  `account_id`  parameter must be your client's account. Otherwise, only your `account_id` and the operation will be performed on the authenticated user.
{% endhint %}

{% tabs %}
{% tab title="Node" %}

```js
// ...
const withdrawId = await restClient.getWalletService().createFiatWithdraw({
  user_id: clientUserId,
  account_id: clientAccountId, 
  payment_method: 1,
  currency: "ARS",
  amount: 1000,
  cbu: "6845784411100069899422",
  person_type: "F",
  cuit: "CUIT number",
  name: "Person name"
});

console.log(withdrawId);
// 32347216-4a4c-49ee-b0a5-1ad993fe522b
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
When you notify Notbank of a bank withdrawal, it will send a confirmation code to your email address, which you must then enter in the next step.
{% endhint %}

**8.5.3.3 Confirm a bank withdrawal**

{% hint style="warning" %}
If you need to perform the operation on your client's account, you must include the parameters `user_id` returned during registration, and the value of the  `account_id`  parameter must be your client's account. Otherwise, only your `account_id` and the operation will be performed on the authenticated user.
{% endhint %}

{% tabs %}
{% tab title="Node" %}

```js
// ...
await restClient.getWalletService().confirmFiatWithdraw({
  user_id: clientUserId,
  withdrawal_id: "32347216-4a4c-49ee-b0a5-1ad993fe522b",
  attempt_code: 123456
});
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.notbank.com/learn/tutorial/en/crypto-as-a-service.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
