How to Accept Payments with Stripe in WordPress - ProfilePress

Setting Up Stripe Payment Method

The Stripe payment method allows you to use your Stripe.com account with ProfilePress to accept credit cards directly on your WordPress sites.

Configuring Stripe is simple and only takes a few moments.

First, go to ProfilePress > Settings > Payments >> Payment Methods and click the Configure button for Stripe.

If you want to test the setup before going live, ensure you activate “test mode” before going through the Stripe setup


Next, click the “Connect with Stripe” button to connect ProfilePress to your Stripe account.


You’ll be taken to Stripe.com, where you’ll be prompted to either create a new Stripe account or log in to your existing one.

Once you complete the form, you’ll be taken back to your website.

Enable the Stripe integration by checking “Enable / Disable,” Don’t forget to set a title and description.

If you need to disconnect from Stripe for whatever reason (to connect to a different Stripe account, perhaps), click disconnect this account. Once you have done that, you should once again see the Connect with Stripe button and are free to connect to another Stripe Account.

Webhooks

Stripe Webhooks are how ProfilePress communicates with Stripe. ProfilePress attempts to create the webhook endpoints automatically. Therefore, as shown below, manual configuration will not be necessary in most cases.

To add the appropriate webhook endpoints in your Stripe Dashboard, go to Developers > Webhooks (direct link).

Click + Add Endpoint

Add the following URL:

https://example.com/?ppress-listener=stripe

Note: Replace “example.com” with your actual site URL.

Listen to “Events on Connected Accounts” settings should be disabled (unchecked).

Select the following events:

checkout.session.completed
customer.subscription.created
customer.subscription.updated
customer.subscription.deleted
invoice.payment_succeeded
payment_intent.succeeded
charge.refunded

Example of how the Endpoint settings should be configured:

After you add the endpoint, you will see the new URL listed in the webhooks settings.


Note: Your webhooks won’t work out of the box in a local development environment like Vagrant, WAMP, MAMP, Desktop Server, or Local by Flywheel. These are typically non-publicly accessible IP addresses, and Stripe can’t reach them.

Next, you must retrieve your endpoint’s secret from your Dashboard’s webhooks settings. Select an endpoint you want to obtain the secret, then click the Reveal button.

Then copy the signing secret from the Stripe Dashboard, head back to the ProfilePress Stripe Setup tab and paste it into the Endpoint Secret text box.

Your webhooks are now set up and secure.

Additional Settings / Features

Payment Collection Method

This lets you select how payment information will be collected. For example, it could be on your site with Stripe card fields displayed or off-site through Stripe hosted payment page.

Statement Descriptor

A short purchase description alongside the charge will appear on the bank/card statement. If empty, it fallbacks to the statement descriptor of your Stripe account.

Note: only 22 characters are allowed for statement descriptors. So if yours is too long, it will be truncated.

Remove Billing Address

Check this setting if you do not want to display the billing address fields on the checkout form.

Restrict Stripe Assets

This setting prevents Stripe assets from loading on every page. Most sites should not enable this setting. Stripe advises that their JavaScript library be loaded on every page to take advantage of their advanced fraud detection rules. If you are not concerned with this, enable this setting only to load the JavaScript when necessary.

Testing Stripe

You can test Stripe in Test Mode, which allows you to try out the payment process without using an actual credit card. Stripe offers test cards for this process (see below).

Firstly, enable test mode from the manage payment method page.

Stripe offers a temporary test account by clicking “Skip this form”. We do NOT recommend this option as it’s best to use an actual account, the same as your live account. This allows you to configure webhooks and apply for Live and Test Mode. Also, renewals will not work with a temporary test account if you are testing recurring payments.

Testing a Purchase

Now in test mode, add a product to your cart and proceed to checkout.

You can use the card number 4242424242424242 with any CVC and valid expiration date (any date in the future).

Testing Express Checkout (Apple Pay / Google Pay)

See Stripe Testing for more test card numbers and additional testing options.

FAQ

Q: How do I remove the additional 2% fee from my Stripe transactions?

A: You will not incur an additional 2% fee from your Stripe transactions if you purchase any ProfilePre Pro plan.

Q: Does the 2% fee apply to recurring Stripe transactions?

A: The 2% fee only applies to the initial transaction. If you have ProfilePress Pro installed and active on your WordPress site, you will not incur this additional initial transaction 2% fee.