Knack integrates E-Commerce by accepting payments through a special checkout view. This checkout view can be added to a form so the user can provide payment information based on the form submission. Some use cases can include:
Payment of Digital Goods
You would like to create a donation button that will send the user to a quick form for collecting donations from within your App.
Define the Donation Object
From your Data builder, create a new Donations object that will store the records collected for each Donation. Make sure to include at least one numeric field (number, currency, equation or formula field) that will be used as the charge amount for a later step. In this example, we’ve created Donation Amount for this purpose:
Create the Donation Button
In the Pages section of your Builder, create a new page with a menu linked to a form that adds a new Donation:
Edit the form on the Add Donation Page created in the previous step, to make it more user friendly and to your liking:
Enable E-Commerce in Your Form
- Edit the Donation form and navigate to the Options section on the left menu:
- Click the Enable E-Commerce button, and then confirm you would like to enable this feature. Select the Donation Amount field to use this as the total amount. If you haven’t added any Payment Processors yet, follow the prompts to do so now. Once you’ve added your processor, select it for use in this form:
Note: Knack currently supports Stripe and Paypal as Payment Processors. You can include up to one of each Processor in each Checkout. Users will have the option to choose a Processor during the Checkout process.
- Lastly, update the Submit Button Text to read something more to the point such as ‘Enter Payment Details’:
Configure your Checkout View
The Checkout View allows you to configure options for what the user sees when they check out:
The Checkout page displays during checkout
The Completion page displays after a successful charge.
You can display a Summary of charges in both of these pages. These should be the fields that are being used to calculate the charge total.
Send Emails or trigger Charge Rules to update/insert connected records.
You can configure a Checkout View to work in Test Mode. During Test Mode you will use your Processor's Test credentials, and no real charges will occur.
Managing Charge Records
Now that you have a Checkout View configured you can start accepting donations! When a Checkout View is submitted, Knack will communicate with the Payment Processor and create a Charge Record connected to the Donations object once it receives a response back.