Prices

We provide an endpoint to get real time prices

Vita Business Service

List Prices

GET api.vitawallet.io/api/businesses/prices

This method show Vita Business prices, in order to calculate transactions final amount.

{
    "withdrawal": {
        "prices": {
            "type": "business_prices",
            "attributes": {
                "valid_until": "2021-10-28T21:40:16.996Z",
                "business_days_of_payment": {
                    "cl": 1,
                    "co": 7,
                    "mx": 0,
                    "ve": 0,
                    "pe": 1
                },
                "clp_sell": {
                    "co": 4.572601,
                    "ve": 0.005482,
                    "mx": 0.024749,
                    "pe": 0.004838,
                    "cl": "1.0"
                },
                "fixed_cost": {
                    "co": "3250.0",
                    "ve": "0.0",
                    "mx": "10.0",
                    "pe": "3.0",
                    "cl": "0.0"
                }
            }
        }
    },
    "vita_sent": {
        "prices": {
            "type": "business_prices",
            "attributes": {
                "valid_until": "2021-09-21T13:59:58.241Z",
                "clp_sell": {
                    "co": 4.572601,
                    "ve": 0.001217,
                    "mx": 0.001217,
                    "pe": 0.001241,
                    "cl": "1.0"
                },
                "fixed_cost": {
                    "co": "0.0",
                    "ve": "0.0",
                    "mx": "0.0",
                    "pe": "2.0",
                    "cl": "0.0"
                }
            }
        }
    },
    "usd": {
        "withdrawal": {
            "prices": {
                "type": "business_prices",
                "attributes": {
                    "valid_until": "2021-10-28T21:40:16.996Z",
                    "business_days_of_payment": {
                        "cl": 1,
                        "co": 7,
                        "mx": 0,
                        "ve": 0,
                        "pe": 1
                    },
                    "usd_sell": {
                        "co": 3850,
                        "ve": 36.201,
                        "mx": 16.80,
                        "pe": 3.69,
                        "cl": 951.26
                    },
                    "fixed_cost": {
                        "co": "3250.0",
                        "ve": "0.0",
                        "mx": "10.0",
                        "pe": "3.0",
                        "cl": "0.0"
                     }
                }
            }
        },
        "vita_sent": {
            "prices": {
                "type": "business_prices",
                "attributes": {
                    "valid_until": "2021-09-21T13:59:58.241Z",
                    "usd_sell": {
                        "co": 3850,
                        "ve": 36.201,
                        "mx": 16.80,
                        "pe": 3.69,
                        "cl": 951.26
                    },
                    "fixed_cost": {
                        "co": "0.0",
                        "ve": "0.0",
                        "mx": "4.3",
                        "pe": "2.0",
                        "cl": "0.0"
                    }
                }
            }
        }
    },
    "clp": {
        "withdrawal": {
            "prices": {
                "type": "business_prices",
                "attributes": {
                    "valid_until": "2021-10-28T21:40:16.996Z",
                    "business_days_of_payment": {
                        "cl": 1,
                        "co": 7,
                        "mx": 0,
                        "ve": 0,
                        "pe": 1
                    },
                    "clp_sell": {
                        "co": 4.572601,
                        "ve": 0.005482,
                        "mx": 0.024749,
                        "pe": 0.004838,
                        "cl": "1.0"
                    },
                    "fixed_cost": {
                        "co": "3250.0",
                        "ve": "0.0",
                        "mx": "10.0",
                        "pe": "3.0",
                        "cl": "0.0"
                     }
                }
            }
        },
        "vita_sent": {
            "prices": {
                "type": "business_prices",
                "attributes": {
                    "valid_until": "2021-09-21T13:59:58.241Z",
                    "clp_sell": {
                        "co": 4.572601,
                        "ve": 0.001217,
                        "mx": 0.001217,
                        "pe": 0.001241,
                        "cl": "1.0"
                    },
                    "fixed_cost": {
                        "co": "0.0",
                        "ve": "0.0",
                        "mx": "0.0",
                        "pe": "2.0",
                        "cl": "0.0"
                    }
                }
            }
        }
    }
}

SDK

Notice that get method from prices module makes the request to the business services

import Business from 'vita-business-node';

try {
    const prices = await Business.prices().get();
} catch {}

Prices structure

Prices are returned in destination country local currency.

Withdrawal

Vita Wallet transactions

Withdrawal final amount

Use the following formula to calculate the final amount.

To calculate the final amount, you must multiply the amount to be sent by the CLP or the currency of origin of your account sale price in the destination country, also remember that you must subtract the fixed cost of the destination country.

const finalAmount = (amount * withdrawal.prices.attributes["clp_sell"]["co"]) - withdrawal.prices.attributes["fixed_cost"]["co"];

Vita Wallet transactions final amount

Use the following formula to calculate the final amount.

To get the data from a Vita Wallet registered user,please visit Vita Wallet section in Transactions Management.

To calculate the final amount, you must multiply the amount to be sent by the CLP or the currency of origin of your account sale price in the destination country, also remember that you must subtract the fixed cost of the destination country.

const finalAmount = (amount * vita_send.prices.attributes["clp_sell"]["co"]) - vita_send.prices.attributes["fixed_cost"]["co"];

Multicurrency

Now Vita Business allows you to use all the currencies available in your wallet, to calculate the destination amount you must use the previous formulas, but selecting the corresponding source currency, for example, if you want to use USD as the source currency, you must select the settings prices for endpoint usd /businesses/prices

To calculate the final amount, you must multiply the amount to be sent by the USD sales price of your account in the destination country, also remember to subtract the fixed cost of the destination country.

const finalAmount = (amount * usd.withdrawal.prices.attributes["usd_sell"]["co"]) - usd.withdrawal.prices.attributes["fixed_cost"]["co"];

If you want to use COP, you must use the COP key of the pricing endpoint

To calculate the final amount, you must multiply the amount to be sent by the COP sales price of your account in the destination country, also remember to subtract the fixed cost of the destination country.

const finalAmount = (amount * cop.withdrawal.prices.attributes["cop_sell"]["cl"]) - cop.withdrawal.prices.attributes["fixed_cost"]["cl"];

Última actualización