1. Home
  2. Getting Started
  3. How to Create Your First Payment Form

How to Create Your First Payment Form

Now that you’ve installed WP Simple Pay, activated your license (if you purchased the Pro version), and connected your Stripe account, it’s time to create your first payment form.

Login to your WordPress admin, then go to WP Simple Pay → Add New. This will launch the payment form template explorer. For this example we will use the Payment Form template.

Click on Use Template and the payment form editor will open with sensible defaults chosen.

Customizing General Options

In the General tab you can change the payment form’s title, description, display type, and payment confirmation settings.

Our selected “Payment Form” template creates an on-site embedded payment form and redirects users to the global confirmation page.

Customizing Payment Options

Select the Payment tab. Here you can enter an optional Label that will be used as the item description by Stripe.

Enter the payment Amount and select One-Time or Subscription for the payment type.

In this example, we will use a One-Time $10.00 amount.

Subscription payment options are available with the Plus license or higher.

Customizing Form Fields

Next, select the Form Fields tab. This is where you can add as many custom fields as you’d like to go in the payment forms themselves.

If you haven’t already, go ahead and click the Save Draft button on the right-hand side of the screen to save the form before moving on.

When you selected the Payment Form template, these four fields were added to your form automatically:

  • Email Address
  • Price Selector
  • Payment Method
  • Checkout Button

Let’s go ahead and add one more custom field: a field to collect the customer’s name. Click Choose a field and select Name, then click Add Field to add it to the form.

If you click the down arrow on the far right of the Name field, you’ll see a panel open up for configuring this individual field.

Go ahead and set the Label text and check the Required box as well

Now drag the entire field up, so it resides under the email address field, then click Update to save your progress. See docs for Custom Form Fields for more details.

If you preview the payment form at this point, it should look something like the form below. Of course, your form title and description will be different if you changed them previously.

Once you like how your payment form looks, make sure it’s published, so you can add it to a page.

Adding Your Payment Form to a Page

While editing an existing page or after creating a new page, click on the plus (+) sign at the top, find the WP Simple Pay block, then select it to add this block to the WordPress block editor.

Add WP Simple Pay block to page

Alternatively, you can type “/” to search, then type “pay” to search and add the block.

After the block is selected, you’ll need to select which payment form you want to add to the page from a dropdown.

Once you select a payment form, a visual representation of the form will be displayed.

Now you can continue editing the page as needed.

Add a form with the Classic Editor or non-block theme

If you’d like to add a payment form using the classic editor or if you are using a theme that doesn’t support using blocks, you can copy the shortcode in the payment form editing screen, as shown below. You can then paste the shortcode in the appropriate place in your payment page or use your theme’s “shortcode” element, etc.

Making A Test Payment

At this point you should still be in Test Mode unless you specifically disabled it. Read more about using Test Mode.

Now you are ready to view your form and make a test payment. While in Test Mode you can use any number of test card numbers provided by Stripe.

NOTE: Stripe provides international test card numbers that should be used to properly reflect the appropriate ZIP/Postal code configuration for your country or locale. For example, the 4242-4242-4242-4242 test card number is considered a US-based number and will display a 5-digit ZIP Code field.

Once you’ve submitted the payment form, Stripe will process the test payment, and you will see the default payment confirmation page, as show below

More information about configuring the payment confirmation display can be seen here: https://docs.wpsimplepay.com/articles/configuring-payment-confirmation-display/

You've created & tested your first form! Now what?

See our list of “What Happens After A Payment” articles to learn what you can explore next.

If you are satisfied with the results of testing your form, you can take your form live so that it can begin processing live payments.

Was this article helpful?

Still stuck? How can we help?
Updated on May 26, 2022