curl -X GET "https://api.chipipay.com/v1/exchanges/usd-amount?currencyAmount=250¤cy=MXN" \
-H "Authorization: Bearer sk_prod_xxxx" \
-H "x-api-key: pk_xxxx"
const params = new URLSearchParams({
currencyAmount: "250",
currency: "MXN"
});
const response = await fetch(
`https://api.chipipay.com/v1/exchanges/usd-amount?${params}`,
{
headers: {
"Authorization": "Bearer sk_prod_xxxx",
"x-api-key": "pk_xxxx",
}
}
);
const usdAmount = await response.json(); // e.g., 13.42
import requests
response = requests.get(
"https://api.chipipay.com/v1/exchanges/usd-amount",
params={"currencyAmount": 250, "currency": "MXN"},
headers={
"Authorization": "Bearer sk_prod_xxxx",
"x-api-key": "pk_xxxx",
}
)
usd_amount = response.json() # e.g., 13.42
13.42
Exchanges
Get USD Amount
Convert an amount from MXN or other currency to USD
GET
/
exchanges
/
usd-amount
curl -X GET "https://api.chipipay.com/v1/exchanges/usd-amount?currencyAmount=250¤cy=MXN" \
-H "Authorization: Bearer sk_prod_xxxx" \
-H "x-api-key: pk_xxxx"
const params = new URLSearchParams({
currencyAmount: "250",
currency: "MXN"
});
const response = await fetch(
`https://api.chipipay.com/v1/exchanges/usd-amount?${params}`,
{
headers: {
"Authorization": "Bearer sk_prod_xxxx",
"x-api-key": "pk_xxxx",
}
}
);
const usdAmount = await response.json(); // e.g., 13.42
import requests
response = requests.get(
"https://api.chipipay.com/v1/exchanges/usd-amount",
params={"currencyAmount": 250, "currency": "MXN"},
headers={
"Authorization": "Bearer sk_prod_xxxx",
"x-api-key": "pk_xxxx",
}
)
usd_amount = response.json() # e.g., 13.42
13.42
curl -X GET "https://api.chipipay.com/v1/exchanges/usd-amount?currencyAmount=250¤cy=MXN" \
-H "Authorization: Bearer sk_prod_xxxx" \
-H "x-api-key: pk_xxxx"
const params = new URLSearchParams({
currencyAmount: "250",
currency: "MXN"
});
const response = await fetch(
`https://api.chipipay.com/v1/exchanges/usd-amount?${params}`,
{
headers: {
"Authorization": "Bearer sk_prod_xxxx",
"x-api-key": "pk_xxxx",
}
}
);
const usdAmount = await response.json(); // e.g., 13.42
import requests
response = requests.get(
"https://api.chipipay.com/v1/exchanges/usd-amount",
params={"currencyAmount": 250, "currency": "MXN"},
headers={
"Authorization": "Bearer sk_prod_xxxx",
"x-api-key": "pk_xxxx",
}
)
usd_amount = response.json() # e.g., 13.42
13.42
Notes
- The response is a plain number, not wrapped in an object.
- Exchange rates are fetched in real-time. The rate may change between calls.
- Supported currencies:
MXN(Mexican Peso),USD(US Dollar).
Authorizations
Bearer token — use your secret key (sk_prod_xxx) for server-side calls, or the user's JWT for client-side calls
Your Chipi public API key (pk_xxx)
Query Parameters
The amount in the source currency
The source currency code Fiat currency code
Available options:
MXN, USD Response
The equivalent USD amount
The converted USD amount
Example:
13.42
Was this page helpful?
⌘I
