Skip Navigation

Charge users for submitting content in WordPress

With Toolset, you can charge visitors for submitting new content on your site. This is often required on directory, classified sites, and listings sites.

You must install Toolset Forms Commerce plugin to add payments to Toolset forms.

This is what visitors will see when you enable payments for forms.

Step

What visitors see

What happens in your site

Step 1
Fill a form

Visitor fills a form and submits it. Following the form submission, the visitor will go to payment.
Visitor fills a form and submits it. Following the form submission, the visitor will go to payment.

Once the visitor submits the form, a new post is created in the database. Toolset Forms Commerce loads the product that’s associated with this form and sends the client to buy it.

Step 2
Enter payment information

The client sees the checkout page, asking for payment for this submission.
The client sees the checkout page, asking for payment for this submission.

Visitors can login to an existing account, if they have one from before, or continue without logging in. After clicking Place order, a new order entry is created in your database, indicating that payment has started.

Step 3
Payment completes

Client goes to payment process to pay
Client goes to payment process to pay

Client completes the payment with their preferred payment method. Once payment completes, they return to your site.

Step 4
New paid content is on the site

The paid content is live
The paid content is live

When payment completes, they arrive back to your site and see the payment confirmation and instructions on what’s next. The post status updates and the client receives a confirmation email.

Below are the setup and configuration instructions from within the WordPress admin. You will learn how to can create forms that include payment, as in the example above.

Setting Up Payments with Toolset Forms Commerce

Toolset Forms Commerce uses WooCommerce for product setup and payment processing. This way, you enjoy a wide range of payment options, reporting and statistics tools for your form payments.

Using a fully featured e-commerce plugin for payment processing may seem like a big hassle, but in practice the setup is very simple. We’ll show you exactly what to do.

First thing you need to do is download and install the WooCommerce plugin.

Basic WooCommerce Configuration

When you activate WooCommerce, it offers you to create the store pages. You should accept this and let WooCommerce create its pages. This will include the store page (which we’re not going to use), the cart and checkout pages.

Then, go to WooCommerceSettings and do the basic setup.

WooCommerce Settings Page

While there are different settings for you to explore, you certainly should set the currency. Have a look and see what other settings you may find useful. For Toolset Forms Commerce, just choosing a currency will be fine.

Adding Products

Next, we need to setup WooCommerce products. When visitors submit forms, Toolset Forms Commerce will send them to „buy“ a product. For example, if you’re creating a classifieds ad site and want to charge payment for a „featured ad“, you should go to ProductsAdd product and create a new „Featured Ad“ product. The name doesn’t really matter. Pick something that makes sense to you.

Setting up a WooCommerce product
Setting up a WooCommerce product

The really critical attributes in a product would be its name and price. If it makes sense, you can enter other product attributes.

We’re all done in WooCommerce. We’ve created a product, which we can use in Toolset Forms Commerce.

Connecting Products to Forms

Now that we have the products, we can add them to our Toolset forms. We’re assuming that you have already created your forms.

If you haven’t done so already, now would be a great time to install and activate Toolset Forms Commerce.

Edit a Toolset form and scroll to the bottom. You will see a new Toolset Forms Commerce section:

Toolset Forms Commerce Is Ready
The option to enable payments for the Toolset form

Select the checkbox to charge payments with this form. The Toolset Forms Commerce section opens with the rest of the payment setting options.

Toolset Forms Commerce Settings Expanded
Payment options for a Toolset form

Product to buy

Simple forms use one product. To choose this option, select Always this product, regardless of form inputs. Then, select the product.

Forms can also require different payment amounts. For example, if you want to offer several ad options (normal, bold, super-featured), you can set this up using the The form specifies the product according to the value of this custom field option.

In this case, you should:

  1. Create a custom field for your custom post type. This can be a custom Select of Radio field created using Toolset. You can’t use a Generic Forms Field. The Custom field content you set for the field’s options must correspond with the Product IDs you want to offer as a choice. You can see an example of this in the following image.
Setting up a custom field with values that correspond to the related Product IDs
Setting up a custom field with values that correspond to the related Product IDs
  1. Use that custom field for payment in a form that creates or edits posts of your custom post type.

Checkout process

Normally, you would want to ask for payment immediately when submitting a form. For this, select the Clear the cart and include only the selected product option.

WooCommerce uses a cart to hold selected products and Toolset Forms Commerce ads the product to the cart automatically. When you choose to clear the cart, the result will be that visitors will need to pay only for the selected product, regardless of what they had in the cart before.

You can’t create multiple posts in the same order and have the status for those posts updated when the order changes status. For the post status update you must clear the cart for which you will need to use custom coding.

If you are creating a complete e-commerce site, you might want to leave the items in the cart and only add the new product for this form. For this, select Leave the cart content and add the selected product.

Remember to also select what to do after submitting forms. In most cases, it makes sense to send the client to the checkout page. If additional review of the cart is needed, you can also send them to the cart page.

What Happens when Payments Complete

Toolset monitors the status of the payment for this form. It will know when the payment completes, or if it’s been canceled.

It can update the post and send notifications to you and to the client.

Updating the post status when the payment status updates

You can choose what happens to the post’s status when the payment status updates.

Options for post status when purchase updates

By default, Toolset Forms Commerce will publish posts when payments complete and return them to draft if payments fail. You can change it to any other status.

Among the post status options is „No change“. You can select that option if the post status should remain the same for each of the purchase-status updates.

Setting the post author when payment completes

After payments complete, WooCommerce will create an account for the client (if not logged in already). The account details are taken from the payment information, so you don’t need to create new fields for that purpose.

You can tell Toolset Forms Commerce to set that user as the author of the created post. This way, users will see the posts (ads, properties, etc.) as „their“ posts. You will be able to easily list the posts that belong to each user and allow them to edit or delete them.

Notifications

Toolset Forms Commerce ads more notification options to the form.

Toolset Forms Commerce notifications
Notification options coming from Toolset Forms Commerce
  1. The notification on form submission changes to notification for going to checkout. This means that you have the customer details available to send the notification.
  2. A new option is added, to notify when payment status updates. When you select this option, you can choose on what purchase status to notify.
  3. You can send the notification to the billing address of the customer. This is the email entered in the WooCommerce checkout page, before going to payment.

You can add fields for your product and customer directly into your notification subject or body text. Just click on the Placeholder icon and select the field you want to include from the pop-up window.

Notifications fields coming from Forms commerce
Updated
Februar 2, 2021