Wallet and top-ups
Orders are paid from a prepaid wallet in US dollars. You add money by bank transfer, and the API shows what is in the wallet and where it went.
Reading the wallet
Both routes need the wallet:read scope.
# The balance
curl https://api.travixorglobal.com/v1/wallet \
-H "Authorization: Bearer $TRAVIXOR_API_KEY"
# The latest movements
curl "https://api.travixorglobal.com/v1/wallet/transactions?limit=20" \
-H "Authorization: Bearer $TRAVIXOR_API_KEY"const headers = { authorization: `Bearer ${process.env.TRAVIXOR_API_KEY}` }
const wallet = await fetch('https://api.travixorglobal.com/v1/wallet', { headers })
const { wallet: balance } = (await wallet.json()) as { wallet: { available_cents: number } }
console.log(`Available: ${(balance.available_cents / 100).toFixed(2)} USD`)
const moves = await fetch('https://api.travixorglobal.com/v1/wallet/transactions?limit=20', { headers })
console.log(await moves.json())import os
import requests
headers = {"Authorization": f"Bearer {os.environ['TRAVIXOR_API_KEY']}"}
wallet = requests.get("https://api.travixorglobal.com/v1/wallet", headers=headers, timeout=30).json()["wallet"]
print(f"Available: {wallet['available_cents'] / 100:.2f} USD")
moves = requests.get(
"https://api.travixorglobal.com/v1/wallet/transactions",
headers=headers,
params={"limit": 20},
timeout=30,
)
print(moves.json()){
"wallet": {
"currency": "USD",
"balance_cents": 50000,
"held_cents": 1023,
"available_cents": 48977
}
}| Field | Meaning |
|---|---|
balance_cents | All the money in the wallet. |
held_cents | Set aside for orders that are still processing. It leaves the wallet when the order completes, and comes back if the order fails. |
available_cents | The balance minus the held part. An order needs this much to be placed. |
History
GET /v1/wallet/transactions lists every movement, newest first, in pages. A positive amount_cents adds money to the wallet; a negative one takes it out. Each movement has a type and a description. Transaction ids are random strings, and the cursor is the id of the last transaction on the page.
Adding money
Money is added by bank transfer, never through the API. In your dashboard you ask for a top-up of between $10 and $50,000. You get a payment reference and our bank details. Put the reference on the transfer.
The money is added to your wallet once we have checked that it arrived, and you receive an email. Orders cannot use money that has not been checked yet.
Wallet money is for buying eSIMs only. It is not paid back to a bank account. A correction to a mistaken entry is made by Travixor Global and shows up in your history.