*Replace texts in RED. SF/UC = Service Fee/Upcharge.
❖ When using a Price/Currency component, the following script should be used:
value = data.{PriceComponentAPIname} * {SF/UC rate in decimal form};
➔ For example, 5% is the rate for merchant’s service fee/upcharge and the Price/Currency component's API name is price. Calculated value script would be:
value = data.price * 0.05;
❖ When using multiple Price/Currency component, the script should be:
value = (data.{PriceComponentAPIname} + data.{PriceComponentAPIname} + data.{PriceComponentAPIname}) * {SF/UC rate in decimal form};
➔ For example, 8% is the rate for merchant’s service fee/upcharge and the Price/Currency component's API name is price, price1 and price2 respectively, calculated value script would be:
value = (data.price + data.price1 + data.price2) * 0.08;
*To learn how to get the component's API name, click here.
DOUBLE CHECK: Input of API name on the script is CASE SENSITIVE. Please double check.