> For the complete documentation index, see [llms.txt](https://vitawallet.gitbook.io/vita-business-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vitawallet.gitbook.io/vita-business-documentation/gestion-de-transacciones/crear-transaccion/envios-a-vita.md).

# Envíos a Vita

### Caso de uso

Considere el caso en el cual el cliente del comercio desea transferir su dinero a Vita Wallet, o el comercio desea hacerlo desde su wallet maestra a una cuenta de Vita wallet, para tal fin Vita Business provee el servicio **envíos a Vita**.

## Create Vita Sent Transaction

<mark style="color:green;">`POST`</mark> `api.vitawallet.io/api/businesses/transactions`

Este método permite crear una transacción de tipo **envió** hacia **Vita** **Wallet** con el uso de una **wallet**, el monto será reflejado de forma **negativa** en el **balance** de la **wallet** de la cual sale el dinero y reflejado de forma **positiva** en el **balance** del usuario en Vita Wallet que recibe el dinero.

#### Request Body

| Name                                                 | Type   | Description                                                      |
| ---------------------------------------------------- | ------ | ---------------------------------------------------------------- |
| email<mark style="color:red;">\*</mark>              | string | Correo electrónico del usuario registrado en Vita Wallet         |
| currency<mark style="color:red;">\*</mark>           | string | <p>Moneda de envío</p><p></p><p>\[clp, usd]</p>                  |
| order<mark style="color:red;">\*</mark>              | string | Número de orden única                                            |
| amount<mark style="color:red;">\*</mark>             | number | Monto a enviar                                                   |
| transactions\_type<mark style="color:red;">\*</mark> | string | vita\_sent                                                       |
| wallet<mark style="color:red;">\*</mark>             | string | **UUID** de la W**allet** con la cual desea hacer la transacción |

{% tabs %}
{% tab title="201: Created Request: Created" %}

```javascript
{
    "transaction": {
        "id": "573",
        "type": "business_transaction",
        "attributes": {
            "recipient_wallet": null,
            "sender_wallet": {
                "token": "5c1c2d5d662656eb3bf8efc752fd89d7879cf34a7e38f2cb55091b1aae7522c0ef8ac20924685fa57042e3931c8c2ecf355c1c80e8d984b762b5681cc3981c99",
                "uuid": "6400990a-baae-4c5d-ac82-c282c1da6a7b",
                "balances": {
                    "clp": 26968805
                },
                "created_at": "2020-07-02T03:06:05.899Z",
                "is_master": false
            },
            "status": "completed",
            "order": "order",
            "currency": "clp",
            "category": "vita_sent",
            "amount": "1000.0",
            "total": "1000.0",
            "fee_value": "0.0",
            "total_fee": "0.0",
            "created_at": "2021-10-28T21:29:09.213Z",
            "recipient_email": "example@example.com"
        }
    }
}
```

{% endtab %}
{% endtabs %}

### SDK

{% tabs %}
{% tab title="Node" %}
Para realizar un envío a un usuario en Vita Wallet, el módulo **wallets** recibe el uuid de la wallet con la cual se desea hacer el envío mediante el método **vitaSend**

```javascript
import Business from 'vita-business-code';

try {
    // Antes de ejecutar un envío a un usuario Vita
    // cuyo país no sea Chile,
    // debe actualizar precios, recuerde que 
    // los precios deben ser actualizados cada cierto
    // tiempo, dependiendo del campo valid_until
    // Para conocer el monto final en el país destino
    
    await Business.wallets(uuid).updatePrices();
} catch {}

try {
    const response = await Business.wallets(uuid).vitaSend({
        email: "example@example.com",
        currency: "clp",
        order: "order",
        amount: 1000,
    });
} catch {}
```

{% 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://vitawallet.gitbook.io/vita-business-documentation/gestion-de-transacciones/crear-transaccion/envios-a-vita.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
