Table of Contents

Payment Method Views

Lesley Updated by Lesley

A payment method view is a type of E-Commerce view. While payment views allow you to accept a payment from someone, payment method views allow you to store, update, or remove a specific user’s payment method.

The payment method can then be used to facilitate future payments, whether it’s the user paying themselves or an account administrator charging the user on their behalf:

Payment method views sync the payment information to your Stripe payment processor, so the credit card information cannot be seen in Knack.

Manage Payment Method Views

Add Payment Method Views

First you’ll need to enable E-Commerce features for your app. You can learn how to enable E-commerce here.

Payment method views can be added in two different places:

  1. In a login-protected "starting page". A starting page is a top level page within your app.
  2. In a child page that has access to a specific user record

To add your first payment method view, locate the "E-Commerce" option in the view menu and select the “Payment Method” view type:

You’ll then be guided through a series of options to customize the payment method view. First, select your payment processor:

Only Stripe payment processors are supported with this view type; you will not be able to choose a PayPal processor with this view type.

Next, select the user record that the payment method belongs to. Sometimes this may be the logged-in user, other times you may want to update someone’s payment information on their behalf:

The final step is to review the view’s summary to confirm everything was selected properly:

Edit Payment Method Views

To access the payment method view settings, click the "Edit" icon when hovering over the payment view. This will open the view settings in the toolbox to the left:

Delete Payment Method Views

You can delete your payment method view at any time by clicking the "Delete" trashcan icon when hovering over the payment view:

Deleting a payment method view will not delete any payment information stored in your Stripe account.

Payment Method View Settings

Payment method views have settings similar to payment views and allow you to change the behavior and looks of your view:

Settings

This section contains basic settings about how the view will behave, for example the payment action, processors, and the fields and currency being used.

  • Payment Action: The Payment Action section will display the data source of your payment view. It also allows you to update the numeric field that will be used as the form’s payment total.
  • Payment Processors: This section is where you will select the payment processor that your form will use. 
  • Test Mode: Every Payment Processor can be used in Test Mode. Stripe will store TEST customers in a separate section, so if you want to store real customer information be sure to toggle test mode OFF.
Since E-Commerce is only available on Pro plans and above, Starter plans will always have Test Mode enabled.
  • Currency: This is where you can choose a currency for your form. 
  • Submit Payment Button Text: Manually set the text used for the form's submit button.
  • Update Billing Button Text: Manually set the text used to instruct users to update their saved card information.
  • Remove Card Button Text: Manually set the text used to instruct users to remove their saved card information.

Emails

Control any emails sent after the payment information is successfully completed.

The submitted payment method details are not available to be displayed in an email. Click here to learn more about Emailing your Users.

Payment Rules

Payment rules work exactly like record rules in a form view. A great example of when to use a payment method rule is to update a field in the user’s record so you can tell who has yet to update their payment information.

To add a payment rule, click on the "Add Rule" button in either “Submit Rules” or “Record Rules” tab, then set your criteria:

Payment Rules will only trigger for successful changes to the connected payment method.
Submit Rules

Submit rules allow you to determine where to direct the user after the form is submitted:

You can learn more about using submit rules here.

Record Rules

Record rules allow you to update or insert records after the payment is successfully processed:

You can learn more about using record rules here.

Using the Payment Method View in Your App

Now that you’ve got a payment method view fully configured, it’s time to see how it all works.

Store Payment Method

If the user has not had their payment method stored before, the view will display the credit card form:

image alt text

When this form is submitted, a Stripe Customer will be created in Stripe and a Payment Method record will be added in Knack. You can find these records in your builder:

You can then use the Payment Method ID to locate the payment method in your Stripe Dashboard.

You can learn more about payment method records here.

Update payment information

If the user has stored their payment method already, they’ll see a link so they can choose to update or remove their existing payment method:

image alt text

If they choose to update the payment method, they’ll have access to a pre-filled credit card form:

image alt text

Remove payment information

Using the same link, if they click the "Remove Payment Information" button, they’ll be redirected to the original payment method view with the credit card form:

image alt text

How did we do?

Payment Views

About E-Commerce

Contact