INFO: This guide is for forms with Credit Card and ACH payment option.
Step 1
For payment forms with two payment options, first, get the API name of the Payment System component. This can also be renamed.
Step 2
Go to the Data tab of the selected component.
Step 3
*Replace texts in RED. SF/UC = Service Fee/Upcharge.
Under Calculated Value, type the following script in the JavaScript field:
value = data.{PaymentSystemComponentAPIname} && data.{PaymentSystemComponentAPIname}.paymentType === '{Payment method to charge SF/UC}'? {Enter selected SF/UC script} * {SF/UC Rate in decimal form} : 0;
❖ For payment method, input: credit_card OR ach depending on your selected payment method where you want to charge the Service Fee/Upcharge.
❖ To enter selected Service Fee/Upcharge script, follow the guide here.
➔ For example, heartlandpayment is the API name of the Payment System component, 10% is the service fee/upcharge rate for merchant to charge on CREDIT CARD payments and the component used is multiple Price/Currency component. Calculated value script would be:
value = data.heartlandpayment && data.heartlandpayment.paymentType === 'credit_card'? (data.price + data.price1 + data.price2) * 0.10 : 0;
(Change credit_card to ach if you prefer to charge a service fee/upcharge ONLY for ACH payments.)
Step 4
Select Save.
Step 5
Finish up building your Payment Form, update the status and embed your form to an HTML page.