> 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/english/gestion-de-transacciones/precios.md).

# Prices

We provide an endpoint to get real time prices

#### Vita Business Service

## List Prices

<mark style="color:blue;">`GET`</mark> `api.vitawallet.io/api/businesses/prices`

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

{% tabs %}
{% tab title="200: OK OK Request" %}

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

{% endtab %}
{% endtabs %}

### SDK

{% tabs %}
{% tab title="Node" %}
Notice that **get** method from **prices** module makes the request to the business services

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

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

{% endtab %}
{% endtabs %}

## Prices structure

Prices are returned in destination country local currency.

## Withdrawal

| Field                           | Description                                                                                         |
| ------------------------------- | --------------------------------------------------------------------------------------------------- |
| **valid\_until**                | Price deadline                                                                                      |
| **business\_days\_of\_payment** | Number of business days Vita Wallet Business needs to complete payment on destination bank account. |
| **clp\_sell**                   | CLP Sell price                                                                                      |
| **fixed\_cost**                 | Fixed cost in destination country local.                                                            |

## Vita Wallet transactions

| Field            | Description                              |
| ---------------- | ---------------------------------------- |
| **valid\_until** | Price deadline                           |
| **clp\_sell**    | CLP Sell price                           |
| **fixed\_cost**  | Fixed cost in destination country local. |

### Withdrawal final amount

Use the following formula to calculate the final amount.

{% tabs %}
{% tab title="Javascript" %}
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.

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

{% endtab %}
{% endtabs %}

### Vita Wallet transactions final amount

Use the following formula to calculate the final amount.

{% hint style="info" %}
To get the data from a Vita Wallet registered user,please visit [Vita Wallet](/vita-business-documentation/english/gestion-de-transacciones/vita-wallet.md) section in Transactions Management.
{% endhint %}

{% tabs %}
{% tab title="Javascript" %}
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.

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

{% endtab %}
{% endtabs %}

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

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.

```javascript
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.

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