In this section, we will go over creating a form with a payment field in order to collect payments from your users.
💡First, If you have not already done so:
- Setup an account with a payment processor service and collect your account details.
- Login to Salesforce, access the Formstack app and create a new form.
The Data Model
The objects on your form reflect your specific use case. Most people want to collect transaction details from the payment into Salesforce so one of your objects should contain fields to collect a transaction identifier and the amount that was actually charged - this is the audit trail that links a submission to a payment. In addition, in most cases, you will want to collect or confirm Name and Billing Address information for your payment. One of your objects should hold the information.
🔺Any object used for transaction details or billing information should be a Primary or Lookup object - for example do not use a Child/Repeatable object. Contact us if you need a little help deciding which object should store your data.
Adding a Payment Field
Under the General Fields Section, choose Payment. Drag the field on your form.
Selecting Your Payment Provider
After adding a payment field to your form, click on a supported payment provider.
You can either choose to add a new account or select from existing ones that have been set up previously.
Each payment provider offers a way to test payments using a sandbox or test account. This allows you to properly test your end-to-end process without actually charging a credit card. Make sure to enable “Sandbox” option when creating a new account if you want to test it only.
When Test Mode is enabled, we do not submit any payment information to the provider and assume that the payment was successful. This allows you to test form submissions without having to configure a payment sandbox or test account.
Next, you will want to set up the details on how you would like to accept payments. You can choose to:
- Make Payment Required
- Set a Currency
- Display the Amount Charged on the form
- Choose which Credit Cards you will accept
- Decide between Single and Recurring Payments
Choose between single and recurring payments. If collecting recurring payments, then set up your payment transaction as recurring. Each payment provider supports different payment frequencies and has several configurable options. See Compare Payment Providers for supported recurring options on each payment provider.