Managing currencies
Summary
You can order rewards in any currency, and those rewards can be redeemed for products in other currencies as well.
This means that you can send someone a $10.00 USD reward, and they can redeem it for an Amazon.fr gift card (denominated in EUR). Tremendous will do a currency conversion at the time your recipient selects the Amazon.fr gift card.
You can also send someone a β¬10.00 EUR reward, and the recipient can redeem it for an Amazon.fr gift card (denominated in EUR). But in this case, the currency conversion will have been completed at the time of the order.
Okay, let's go through it in detail:
Ordering rewards in other currencies
When you order a reward, you can specify the currency that the reward is denominated in. Rewards are by default denominated in USD
, but suppose we want to order a reward that is denominated in EUR
.
This can be done by adding a currency_code
attribute to the reward object in the payload when you create an order:
# Example code setting currency to EUR
curl --url 'https://testflight.tremendous.com/api/v2/orders' \
--header 'Authorization: Bearer YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data '
{
"payment": {
"funding_source_id": "YOUR-FUNDING-SOURCE-ID"
},
"reward": {
"value": {
"denomination": 10,
"currency_code": "EUR"
},
"delivery": {
"method": "EMAIL"
},
"recipient": {
"name": "Jane Doe",
"email": "[email protected]"
},
"products": [
"OKMHM2X2OHYV"
]
}
}
'
This will return:
{
"order": {
"id": "MDNK6OCHYJ4A",
"external_id": null,
"created_at": "2021-12-13T22:28:55.952Z",
"status": "EXECUTED",
"payment": {
"subtotal": 11.68,
"total": 11.68,
"fees": 0.0
},
"rewards": [
{
"id": "ZY5SZ0TNVPM0",
"order_id": "MDNK6OCHYJ4A",
"created_at": "2021-12-13T22:28:56.103Z",
"value": {
"denomination": 10.0,
"currency_code": "EUR"
},
"delivery": {
"method": "EMAIL",
"status": "PENDING"
},
"recipient": {
"email": "[email protected]",
"name": "Kapil"
}
}
]
}
}
The reward created will indicate that it's denominated in a different currency:
Paying for rewards
As you'll notice above, the β¬10.00 order cost $11.68.
Tremendous account balances are maintained in USD. When rewards are ordered in non-USD currencies, Tremendous does a forex calculation to determine the amount to charge in USD, and deducts that from your balance.
At the time of writing this, β¬10.00 = $11.68.
Product currencies
Products have a currency_codes
attribute as well. This represents the currency code that product is denominated in.
For example, here's the Amazon.fr product in our catalog:
{
"id": "KQXGBF4HO1CN",
"name": "Amazon.fr",
"currency_codes": [
"EUR"
],
"skus": [
{
"min": 0.01,
"max": 5000
}
],
"countries": [
{
"abbr": "FR"
}
],
"category": "merchant_cards",
"description": "",
"images": [
{
"src": "https://giftrocket-s3.imgix.net/Brands/FR/AmazonFR.png",
"type": "card"
}
]
}
If a recipient chooses Amazon.fr, they receive (an Amazon.fr gift card), which is denominated in EUR. The countries
attribute refers to the countries in which this reward will work.
Some products, like the Tremendous International Visa card, are denominated in USD, but work anywhere around the world.
Recipients can redeem products in other currencies
Rewards denominated in a specific currency can be redeemed for products denominated in other currency. For example, if you send a $10.00 reward to someone in France, and they are still able to choose an Amazon.fr gift card. The amount for the Amazon.fr gift card will be computed based on a realtime currency conversion (something like β¬8.86 at current exchange rates.
Exchange rates
Tremendous maintains up-to-date exchange rates. If you'd like to obtain our latest rates, you can query this endpoint as follows:
curl --url 'https://testflight.tremendous.com/api/v2/forex' \
--header 'Authorization: Bearer YOUR-API-KEY' \
--header 'Content-Type: application/json
This will return current exchange rate data as follows:
{
"forex" : {
"AED" : 3.672979,
"AFN" : 70.516576,
"ALL" : 92.41957,
"AMD" : 387.969561,
"ANG" : 1.80347,
"AOA" : 849.00017
// ....
}
}
Updated 3 months ago