Money Sending to Vita

This is the way to send money to a Vita registered user

Use case

Consider the case in which the merchant's client wants to transfer money to a Vita Wallet user, or the merchant wants to do it from the master wallet to a Vita wallet account. For this, Vita Business provides the sending to Vita Wallet service.

Create Vita Sent Transaction

POST api.vitawallet.io/api/businesses/transactions

This method allows you to create a sent type transaction from a wallet to a Vita Wallet user, the amount will be reflected negatively in the wallet's balance from which the money comes out and reflected positively in the Vita Wallet user balance that receives the money.

Request Body

NameTypeDescription

email*

string

Vita Wallet user email

currency*

string

origin currency

[clp, usd]

order*

string

Unique order id

amount*

number

Sending amount

transactions_type*

string

vita_sent

wallet*

string

Sender wallet UUID

{
    "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"
        }
    }
}

SDK

In order to send money to a Vita Wallet user, the wallets module receives the uuid of the wallet with which you want to send the money using the vitaSend method.

import Business from 'vita-business-code';

try {
    // Before sending money to a Vita Wallet user
    // whose country is not Chile,
    // you must update prices, remember 
    // prices must be updated every certain time,
    // depending on the valid_until value
    // so you can know the final amount on the recipient account
    
    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 {}

Última actualización