How to add custom calculations in your payment form?

"How to get an order subtotal in Google Forms"- Quora

This is a common question from people who charge by the answer. For example, the amount might depend on the number of tickets someone chooses. Google Forms has no formulas. You can calculate the amount in Google Sheets, but only after the form is submitted, so you then write to each person. With Neartail, you can write a custom formula to calculate the amount and collect payments in your Google Form. Your users see the amount before they submit and that is the amount they pay. Even better, if your calculation is a fee or a discount, you can write it in plain English instead of a formula.

Let's start. Create your form and follow the steps below.

Setup payments

  • On the page that opens, click "Enter your form name". Type your form's name, click Generate and wait about a minute.
  • Check the outline it suggests and click Proceed.
  • Once you create the form, you will land on the form's "Edit" tab.
The tabs Edit, Preview, Share and Orders, with Edit marked
  • If it asks "Do you want to collect payment on form submit?", click Yes.
The Payment form dialog asking if you want to collect payment on form submit, with Yes marked
If you imported a Google Form, it makes a copy of your form and it will not ask. If it says "Your form is private or protected", click Next and give access or publish your form in Google Forms and paste that link. Select your currency and click Continue. When it says "Your order form is ready", click Preview your form, then Edit form. Scroll down to Payments disabled at the end of the form and click Enable. Click Enable again in the panel that opens. Your total may be called Amount Due instead of Order Amount.
Payments disabled at the end of the form, with Enable marked
PayPal is not listed in every currency. If you do not see it under Manual payments, close the Payments settings page and click on the gear icon in the After payment row, the last row above the Submit button. Select your currency in Currency and click Save. The form will reload. If it asks "Do you want to collect payment on form submit?" again, click Yes. Otherwise click Edit in the Payments row. Change the currency before you turn on a payment option, because an option you turned on stays on in the new currency.
The Button tab of the panel, with USD selected in Currency, and Currency and Save marked
  • Payments settings page will be displayed. Click on the toggle button next to PayPal under Manual payments, enter your paypal.me username and click Save.
The Payments panel with PayPal turned on under Manual payments, the paypal.me username filled in and Save marked

Configure payment amount

You can setup your form to collect a fixed amount, dynamically calculate the amount based on the answer or add custom formula to calculate the amount. In this example, we will write a custom formula to calculate the amount.
  • Your formula needs a question to read. Click on Add field in the toolbar on the right and enter the question, such as Number of tickets.
A question card titled Number of tickets, beside the toolbar with Add field marked
  • If the form has products you do not need, click on the product and click on the delete icon at the bottom of its card. If you keep a product with no title or a price of 0, change it in the card.
  • Click on the Order Amount field, click the Advanced setting icon and click Answer. Enter a custom formula to calculate the amount in Calculate. Type @ to pick a question from the list, then type the rest, such as Number of tickets * 100. Click Save.
The Answer tab of the Order Amount field, with the formula Number of tickets * 100 in Calculate, and Answer, Calculate and Save marked
If your calculation is a fee or a discount, you can write it in plain English instead. Click on the Add price field icon, select Delivery Fee or Discount and click Next. Select Custom calculation and click Next. Write the logic in the box, such as "Free delivery if the order amount is above 50, otherwise 25" and click Create. Neartail writes the formula, so check it on the Answer tab of that field. Then add Net Amount the same way, with Standard calculation, so that the amount they pay includes it.
  • Click on "Preview" tab
The tabs Edit, Preview, Share and Orders, with Preview marked
When the user enters the Number of tickets, the Order Amount will display the amount before they submit the form. This is the amount they will pay. To check each payment, read How to see who has paid in Google Forms?

Summary

If the amount depends on what people choose, a Google Form has no formulas to work it out. With Neartail, you write a custom formula in the Order Amount field and users pay that amount when they submit the form. Create your form and complete the steps above. If you have any questions, write to support.

Last updated: