SYNTAQ lets you collect money by credit card when a user submits a Form or assembles a document.
You can set a fixed price for a Form under the Settings menu in the Form Designer, using the Stripe Payments sub-menu item. By using this option, every user is charged the same amount.
(You can also use this to set a ‘base’ price for the Form that will apply unless it is overridden by another value using the function explained below.)
However, you can also dynamically set the Stripe payment amount using the built-in system function setFormPrice().
The syntax for this function is as follows:
If you want to set it to a fixed dollar and cents amount, then:
If you want to set it to the value of a particular number Field (in this case to the value of Price_num), then:
The user can enter a value in Price_num and this is what will appear when the Stripe dialog pops-up to collect payment when the user clicks the Submit or Assemble button.
You can also use the Rules Wizard or other Script to dynamically change the value of the relevant field (in this case Price_num). When the user clicks Submit/Assemble, the Stripe payment dialog will pop-up and indicate the dynamically set price. You may want to use this function to increase or decrease the price, depending on the complexity of the form or the type of document (or documents) to be assembled for the user.
You need to include this function in the Field Script of the field that you want to use to set the price, i.e. in this case, Price_num. In this case the price will be re-set each time the user changes the value of the field Price_num.
Alternatively, you can include this system function in one of your own functions in Form Script. You then need to ensure that your own function is triggered whenever you want to update the price, e.g. beforeAssembly().