Table of Contents

About E-Commerce

Lesley Updated by Lesley

What is E-Commerce?

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

Knack integrates e-commerce by accepting payments through a special payment view and stores those payments as records in your database.

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.

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?

Accept a payment

Using a payment 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 that works 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
You can learn more about payment views here.

Store credit card information

Users can also store their payment information using payment method views. They can update their payment information at any time or choose to 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:

User payment methods are stored as a tokenized string that translates a credit card number into a unique, encrypted string that is only usable by the app that created it. Actual credit card information is never stored in your Knack database in order to meet PCI regulations.
You can learn more about payment methods here.

Activate E-Commerce

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

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

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

Manage E-Commerce

Add 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 then charge the user and transfer the money to your account. This means that Knack does not store any credit card information.

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

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

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

Edit 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:

Delete a payment processor

You can delete a payment processor at any time from your app’s E-commerce settings. Locate the processor you wish to remove and click the delete icon:

Add 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:

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.

There are several requirements a page must meet in order 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.

Add 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 one added in order to add your first payment method view.

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

You can learn more about payment method views here.

Edit a payment view

Payment and payment method views behave just 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:

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:

Disable 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:

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.

Use E-Commerce in your App

Accepting Payments

In order 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.

How To Guides

How did we do?

Payment Method Views