Documentation > Settings > E-Commerce > PayPal Setup

PayPal Setup

In order to enable PayPal as a payment method, you need to provide authentication credentials in the form of a Client ID and Secret, both of which you can find in your PayPal Developer Dashboard.

Sandbox Setup

If you want to run some tests first – and we strongly advise you to do this – you can set picu up with a PayPal Sandbox account. Here’s how:

First you need to add the following constant in your wp-config.php:

define( 'PICU_PRO_PAYPAL_SANDBOX', true );Code language: PHP (php)

This makes sure, that picu only ever communicates with PayPal’s sandbox servers.

Then, in your PayPal Developer Dashboard navigate to “Testing Tools > Sandbox Accounts”.

Click on “Create Account” and make sure to select “Business”:

Screenshot of the "Create Sandbox Account" from with radio buttons for the "Account Type" (Personal or Business) and a dropdown for "Country/Region"

Once the account is created, click on it and then scroll down and click “Create App”.

Give your new app a name, eg. “picu” and confirm with the “Create App” button.

Screenshot of the "Create App" form, with a field for the "App Name", "Type" (which is preselected to "Merchant" and a field for the "Sandbox Email"

Now you will be able to copy the Client ID and the Secret from the REST API apps table:

Screenshot of the "REST API apps" table, with one app named "picu" listed; There are UI elements to copy the "Client ID" and the "Secret" to the clipboard

Paste those in the respective fields in your picu “E-Commerce” settings:

Screenshot of the picu PayPal options, with a checkbox to enable PayPal and two text fields for the "Client ID" and the "Client Secret"

Please note, that both keys will be encrypted before they are saved to the database.

If you rather want to save the keys in your wp-config.php file, add the following two constants:

define( 'PICU_PRO_PAYPAL_CLIENT_ID', 'ABCD…' );
define( 'PICU_PRO_PAYPAL_CLIENT_SECRET', 'ZYX…' );Code language: PHP (php)

If the credentials are working and you have checked the checkbox to enable PayPal as a payment method, your clients will be able to select PayPal as the payment method during checkout:

Screenshot of the payment method selector during checkout; Two options are visible: "Bank transfer" and "PayPal" (which is checked)

Production Setup

If you are ready to receive real payments, first make sure to either remove the PICU_PRO_PAYPAL_SANDBOX constant from your wp-config.php file or set its value to false.

To get your “live” credentials, head back to the PayPal Developer Dashboard and navigate to “Apps & Credentials”.

You can then repeat the steps mentioned above to create a new app.

With your app in place, make sure to replace the Client ID and Secret either in your picu settings or your wp-config.php file – depending on which method you chose earlier.


Making a Test Payment

To make a test payment with PayPal, you need to create another sandbox account, just like described above. This time, choose “Personal” (instead of “Business”) for the account type. It will be used to simulate a client.

When you click on the new account, you can change the email address and the password:

Screenshot of a sandbox account login info, with the email address and tow links to change the email address and the password

When you get redirected after checkout, use these credentials to log into PayPal and make the payment.

Need help?

If you couldn’t find what you were looking for and need more assistance, please get in touch with us directly and we’re happy to help.