Build shopping cart plugins

Plugins help merchants that are using existing shopping carts or ecommerce platforms start accepting payments with WePay. To see if there’s already a plugin for a particular platform, browse our shopping cart plugins.

WePay encourages developers to build plugins. Below are some guidelines that will help you ensure the best experience for plugin users.

Describe your plugin

Explain WePay

Include the following text in your plugin description will help educate merchants about WePay:

WePay is a secure payment processor that makes it easy to start accepting payments online in under two minutes. There are no contracts, set up fees, or monthly fees. See pricing.

Explain what the plugin does

You'll want to describe your plugin in your own words, but the following text will help promote your plugin:

This plugin will allow you to accept payments on your site. It will register you on WePay and configure your API credentials automatically.

Provide instructions

Include a readme.txt file in the root directory of the download package and provide instructions for each step. Be as specific as possible, and assume that merchants have no pre-existing knowledge of WePay.

Help users obtain credentials

We allow plugins to register merchants and configure their API keys automatically. Just provide a button in the platform's admin console that allows merchants to "Automatically configure WePay".

Support manual configuration

You should also provide a way for merchants to enter their API credentials manually, in case we can't send the credentials automatically.

When the merchant clicks the “Configure WePay” button, open a new tab and send them to https://www.wepay.com/v2/plugin/create/ with the following parameters included in a query string:

Parameter Description
plugin_post_uri URI for WePay to send the merchant’s API credentials (should be their domain)
plugin_name Your plugin’s name (e.g. "WordPress Plugin")
plugin_homepage Merchant’s website (e.g. “https://example.wordpress.com” or “https://www.example.com”)
plugin_redirect_uri URI of the confirmation page, once the user has registered on WePay and configured their API credentials (should be on their domain)
user_name optional - Merchant’s full name to pre-fill the registration form
user_email optional - Merchant’s email address to pre-fill the Log In or Sign Up form
state optional - A value that is passed back to the plugin_post_uri. Can be used for security purposes.

The user will see the following screen:

Once the merchant finishes registering or logging in, we'll create an API app and prompt them to send their credentials back to the plugin automatically.

The API credentials will be sent to the plugin_post_uri in a POST request, so set up the URI to listen for the account_id and access_token.

Hide the details

You'll need to provide a way for merchants to update or change their API credentials, but you shouldn't show the merchant's access_token or client_secret by default, since it’s sensitive information. You should also inform the merchant that these credentials are confidential.

Support "Test Mode"

Plugins don't have to support "Test Mode", but since WePay allows plugins to automatically configure a merchant's API credentials, it's very easy to switch a merchant from Test Mode to Production.

To configure a merchant in Test Mode, simply send them to https://stage.wepay.com/v2/plugin/create/.

When they're ready to go live, send them to https://www.wepay.com/v2/plugin/create/.

Test Mode and Production

You'll have to inform merchants that they'll have separate log ins (and account histories) for Test Mode and Production.

If your plugin directs merchants to WePay to log in or to view their accounts, send them to stage.wepay.com in Test Mode and www.wepay.com in Production.

Storing credentials

All API credentials (for both Test Mode and Production) should persist within the plugin, so merchants can switch between the two without going through the plugin configuration flow on WePay each time (which would result in a new app being created every time).

Build a complete plugin

Almost anything you can do on WePay, you can add to a plugin, so merchants are rarely required to visit WePay. Read through our tutorials or full API call list to see everything we support.