Type | Description | Format |
---|---|---|
CustomerId required string | ID of the customer. |
Minimum length: 1
Maximum length: 100
Pattern: ^[A-Za-z0-9\-]{1,100}$
|
FundSources required object | List of source of funds. |
The allowed values are
|
Cart required object | A FX Cart. |
Type | Description |
---|---|
Cart object | A personalized FX cart.. |
curl -X POST https://api.stack.promo/v1/fx-carts/personalize \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic <credentials>'
-d '{
"customerId": "5d3659629e8c412da5eeef1b28cca0fc",
"fundSources" : ["Promotion", "Wallet"],
"cart": {
"lineItem":
{
"sourceCurrencyCode": "AUD",
"destinationCurrencyCode": "USD",
"sourceAmount": 100.0,
"destinationAmount": 71.60,
"fxRate" : 0.7160
},
"totalAmount" : 100.0
}
}'
{
"cart": {
"transactionId": "8526d88aba9f4c26867dee20179b243c",
"lineItems":
{
"sourceCurrencyCode": "AUD",
"destinationCurrencyCode": "USD",
"sourceAmount": 100.0,
"destinationAmount": 71.60,
"fxRate": 0.7160
"promotion": {
"id": "a3e68307c36b412b85fc0747e1abb6db",
"description": "Rate boost on AUD",
"memo": "Cash applied to this order.",
"promotionAmountType": "Cash",
"promotionAmount": 3.58,
"amountWithPromotion": 100.0
"rateBoost": {
"boostedFxRate": 0.7518,
"destinationAmountWithPromotion": 75.18
}
}
},
"summary": [
{
"fundSource": "Promotion",
"amountType": "Cash",
"description": "Rate boost on AUD",
"memo": "Cash applied to this order.",
"amount": 3.58
}
],
"totalAmount": 100.0,
"totalAmountDue": 100.0
}
}
Type | Description |
---|---|
Id required string | ID of the transaction. |
curl -X POST https://api.stack.promo/v1/fx-carts/8526d88aba9f4c26867dee20179b243c/finalize \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic <credentials>'
Type | Description | Format |
---|---|---|
LineItem required object | A LineItem. | |
TotalAmount required decimal | Total amount of the cart. |
Minimum amount: 0.00
|
Type | Description | Format |
---|---|---|
SourceCurrencyCode required string | Three-character ISO-4217 currency code that identifies the currency. |
Minimum length: 3
Maximum length: 3
Pattern: ^[A-Z]{3}$
|
DestinationCurrencyCode required string | Three-character ISO-4217 currency code that identifies the currency. |
Minimum length: 3
Maximum length: 3
Pattern: ^[A-Z]{3}$
|
SourceAmount required decimal | Source amount of the line item. |
Minimum amount: 0
|
DestinationAmount required decimal | Destination amount of the line item. |
Minimum amount: 0
|
FxRate required decimal | FX rate of the line item. |
Minimum amount: 0.00
|
Type | Description |
---|---|
TransactionId string | Transaction ID of the personalized customer cart. |
LineItem object | A personalized line item. |
Summary object | Array of summary line. |
TotalAmount decimal | Total amount of the cart. Same as incoming cart value. |
TotalAmountDue decimal | Total amount due after applying promotions and wallet balance. |
Type | Description |
---|---|
SourceCurrencyCode string | Source currency code of the line item. Same as incoming line item value. |
DestinationCurrencyCode string | Destination currency code of the line item. Same as incoming line item value. |
SourceAmount decimal | Source amount of the line item. Same as incoming line item value. |
DestinationAmount decimal | Destination amount of the line item. Same as incoming line item value. |
FxRate decimal | Fx rate of the line item. Same as incoming line item value. |
Promotion object | Promotion applied to line item.. |
Type | Description |
---|---|
Id string | ID of the promotion. |
Description string | Description of the promotion. |
PromotionAmountType string | Indicates whether promotion amount is cash or points. |
RateBoost object | A boosted rate. |
PromotionAmount decimal | Promotion Amount. |
AmountWithPromotion decimal | Indicates amount due after applying the promotion. |
Memo string | Notes. |
Type | Description |
---|---|
BoostedFxRate decimal | Boosted FX Rate. |
DestinationAmountWithPromotion decimal | Indicates amount due after applying the promotion. |
Type | Description |
---|---|
FundSource string | Source of funds. Possible values are promotion or wallet. |
AmountType string | Type of promotion amount. Possible values are cash or points. |
Description string | Description of the promotion. |
Memo string | Additional information on the promotion. |
Amount decimal | Total payout. |