About E-Commerce

E-commerce allows you to perform financial transactions online. With E-commerce, you can accept payments in your Knack app for transactions such as invoices, registrations fees, and more.

This article covers the following topics:

 

There are several requirements a page must meet to be able to add a payment view, such as access to a numeric field in a record to calculate the total amount. 

All payments are made through a payment provider like Stripe or PayPal, and although you can store a user’s payment method through Stripe, no actual credit card numbers are stored in your Knack database for security reasons.

Note: E-commerce is available on Pro plans or higher. Lower plans only have test mode available to test out the functionality.

 

What can I do with E-commerce?

Accepting a Payment

Using a payment view or a payment method view in your app, users can use their credit card to send you a payment, and they can also store that payment method to make future payments. Payment views can be added to any page with a single record (such as an edit form or a details view).

Common use cases include:

  • Making donations

  • Paying invoices

  • Subscribing to your app

  • Purchasing tickets for events

  • Submitting and paying orders

 

Storing Credit Card Information

Users can also store their payment information using payment method views. They can update their payment information at any time or remove it altogether.

Payment method views simply require they be connected to a specific user record; meaning, it’s also possible for you to update the user’s information on their behalf. Payment methods are stored in a special "Payment Methods" table.

This table is automatically added when you add your first payment method view. It stores specific information about each payment method, such as the expiration date and which user it belongs to:

e-commcerce1

Note: User payment methods are stored as a tokenized string that translates a credit card number into a unique, encrypted string only usable by the app that created it. For security purposes and to meet PCI regulations, actual credit card information is never stored in your Knack database.

Tip: You can learn more about payment methods here.

 

Activating E-Commerce

Before you can accept payments, you must first activate E-Commerce features for your application.

From the Knack Builder, navigate to the App Settings section and select the "E-Commerce Settings" tab. Then, select the “Enable E-Commerce” button:

e-commerce2

You will then be prompted to confirm E-Commerce activation. Click "Enable" to officially activate the feature for your app:

e-commerce3

 

Managing E-Commerce

Adding a Payment Processor

Before you can accept your first payment, you must connect a payment processor account to your Knack app. The user will submit their payment method using one of these processors, which will charge the user and transfer the money to your account.

Note: Knack does not store any credit card information.

 

To add your first processor, select the "Add Processor" button in your app’s e-commerce settings:

e-commerce4

Regardless of the processor you choose, you must enter your live and test credentials:

e-commerce5

Note: You can learn more about locating the necessary credentials and other general payment processor information here.

 

Editing a Payment Processor

You can edit your payment processor credentials at any time. Locate your payment processor in your app’s E-commerce settings and click on the edit icon to do so:

e-commerce6

Adding a Payment View

With E-Commerce enabled in your app and payment processors added, the final step is to add a payment view. To add a payment view, find the "E-Commerce" tab in the view menu and click the “Payment” option:

e-commerce7

You will then be guided to choose a series of options to customize the view. The payment view includes options for calculating the total payment amount, displaying the payment summary, sending email receipts, and rules for updating other database records.

Note: There are several requirements a page must meet to be able to add a payment view, such as access to a numeric field in a record to calculate the total amount. You can learn more about payment views here.

 

Adding a Payment Method View

Payment Method views can store, update, or remove a specific user record’s payment information. These views will only work with Stripe payment processors, so you must have your Stripe credentials added to your first payment method view.

To add a payment method view, find the "E-Commerce" option in the view menu and click the “Payment Method” view:

e-commerce8

Tip: To learn more about payment method views, see our article here.

 

Editing a Payment or Payment Method View

Payment and payment method views behave like any other view types you may have interacted with. When you click on the edit icon for either view type, you can access all of its options/settings:

e-commerce9

If you wish to change anything you selected when first adding the payment view (such as storing the user’s payment information), click the "Change Action" button in the view Settings section:

e-commerce10

 

Disabling E-Commerce

If you’d like to disable all e-commerce features in your app, navigate to your app’s e-commerce settings and click on the "Disable E-Commerce" button:

e-commerce11

Note: Disabling e-commerce will delete any existing charge or payment method views in your app. It will not delete the payment/payment method records stored in the database.

 

Using E-Commerce in Your App

Accepting Payments

To accept your first payment, you’ll first need to configure a payment processor. Then, add your payment view to an existing page or form view within your app.

See the articles below to learn more:

How To Guide:

How To Save a User's Payment Method