Table of Contents
The Stripe payment gateway built into Restrict Content Pro allows you to use your Stripe.com account with Restrict Content Pro to accept credit cards directly on your website.
Configuring Stripe is simple and only takes a few moments.
First, go to Restrict > Settings > Payments and enable Stripe:
Next, under Stripe Settings, click the "Connect with Stripe" button to connect Restrict Content Pro to your Stripe account.
You'll be taken to Stripe.com where you'll be prompted to either create a new Stripe account or login to your existing one.
Once you complete the form you'll be taken back to your website.
With Stripe, customers will be shown a credit / debit card form directly on your registration form:
After filling in the credit / debit card details, the customer will be presented with a processing indicator. If the card is successfully charged, the customer will be redirected to the success page. If the card fails, the customer will be shown an error message.
Stripe Webhooks are how Restrict Content Pro communicates with Stripe and is the system RCP uses to detect when a subscription has been updated (payment made, account cancelled, etc).
The URL that Stripe sends webhooks to must be configured manually from your Account Webhooks settings page (on the left, under Developers > Webhooks).
Click Add Endpoint:
Enter "https://yoursite.com/?listener=stripe" for the URL and select All Events. Replace yoursite.com with the actual domain to your site.
You need to add webhooks separately in both "test" and "live" modes in Stripe.
Note: If your webhook becomes unresponsive or starts redirecting to another page, payments may be delayed, so it's important that your URL be entered correctly and remain active. You can check to see if webhooks are being successfully processed by visiting the "Webhooks" section in your Stripe dashboard.
Testing Stripe Payment Gateway
Due to Stripe.com's phenomenal testing environment, you can fully test all aspects of Restrict Content Pro before deploying to a live environment.
To test Restrict Content Pro with Stripe, follow these steps:
- Enable Test Mode in Settings.
- Connect your Stripe.com account.
- Switch your Stripe.com account to Test.
- Visit your website's registration page while logged out.
- Enter the user information. This can be anything, though a real email address that you have access to is advised.
- Choose a paid subscription level.
- Choose to auto renew (or not) the subscription.
- Choose "Credit Card" as the payment method.
- Enter "4242424242424242" for card number. (Other test card numbers are available here.)
- Enter 12 / 2020 for the expiration. Any date in the future will work.
- Click "Register".
- You should now be redirect to the success page and logged-in as your new user.
- Check your Stripe.com account history, you will see the test transaction.
- Your new user now has a fully activated account.
Stripe API version
Restrict Content Pro has been tested up to Stripe API version 2018-02-06.
If using auto renew with Stripe, membership levels cannot have a duration greater than 1 year. For example, you cannot configure a 2 year membership that auto renews.