The subscription plugin and its associated payment gateways have to work hand in hand for a faultless recurrence payment. Our plugin, Subscriptions for WooCommerce provides an extension for Paypal which is the inbuilt WooCommerce payment gateway. PayPal handles the automatic recurring subscription payment in the following two different manners:
- PayPal Standard
- PayPal Reference Transactions
Paypal standard is a widely used payment method as its very easy to set up. You will need to have the following requirements prior to using PayPal standard as the payment method for the subscription products:
- verified PayPal business account
- IPN (Instant Payment Network) configured appropriately as mentioned below in section Configuring PayPal IPN
- valid PayPal API credentials entered into WooCommerce
Set up and Configuration
Follow the steps to configure PayPal Standard:
- Go to: WooCommerce > Settings > Payments.
- Use the toggle under Enabled to select PayPal.
- Select Set up. You will be redirected to the PayPal Standard settings.
- Enter your email address in the PayPal Email field, which is the most important thing to configure before taking payments. The email entered here must match with the email on the PayPal Business account.
- Select the Enable PayPal Sandbox checkbox if you wish to test the checkout process during your store’s development. With sandbox enabled, no payment/money is taken. Create a separate sandbox account via PayPal Sandbox to use PayPal in sandbox mode.
- Debug log may also be turned on, which can be useful during development. You may need to first create a wc-logs folder and set permissions to make it writable. These logs are available at WooCommerce > System Status > Logs and then select the PayPal log from the dropdown.
- Instant Payment Notifications (IPN) are sent from PayPal when you receive a payment, issue a refund or a chargeback or cancellation. Tick the box for Enable IPN Email Notifications (optional).
- Enter an email address for Receiver Mail if this address is different than the PayPal email address you entered above in step 4.
- PayPal Identity Token (optional). Only required if you signed up for the Data Transfer option on your PayPal account; can be used to verify payments if you have IPN issues.
- Specify an Invoice Prefix (useful if you have multiple stores). WC is defaulted to denote WooCommerce transactions.
- There are two shipping options:
- Send shipping details to PayPal: If you want WooCommerce to send the shipping details to PayPal to create shipping labels instead of billing, enable this checkbox.
- Address override option: PayPal verifies addresses if enabled, therefore, it is advised to keep it disabled, but it can be useful in preventing address information from being changed.
- Payment Action lets you choose to Capture funds immediately or only Authorize. Once an ‘authorize only’ order has been changed to Processing or Completed, funds are automatically captured as long as you have entered your PayPal API Credentials under WooCommerce > Settings > Payments > PayPal.
- In Page Style, optionally enter the name of the page style you wish to use. These are defined within your PayPal account. This affects classic PayPal checkout screens.
- Image URL optionally enter the URL to a 150x50px image displayed as your logo in the upper left corner of the PayPal checkout pages.
- There are three fields to paste API information into:
- API Username
- API Password
- API Signature
Live API Information can be obtained from:
- Log in to your PayPal account at PayPal.com.
- Go to My Selling Tools > API Access.
- Select the NVP/SOAP API integration (Classic) > View API Signature.
- View and copy API Username, API Password, and API Signature as needed.
Paypal Reference Transactions
Paypal Reference transactions are considered in cases where the PayPal standard fails to meet certain requirements or when advanced subscriptions features have to be implemented. However, PayPal Reference transactions can be availed only by privileged customers approved by PayPal. If your account is approved, Subscriptions will automatically detect that Reference Transactions are supported and switch to using that payment method. On the other hand, If your account does not have Reference Transactions enabled, WooCommerce Subscriptions continues to use PayPal Standard for subscription purchases and recurring payments.
Refer to know How do I get Reference Transactions Enabled with PayPal?
Configuring PayPal IPN
Be it PayPal Standard or Reference Transactions, both the payment gateways make use of the PayPal IPN (Instant Payment Notification) to monitor recurring payments and updates in subscription’s status.
From your PayPal Business account, navigate to Profile > Profile and settings > My selling tools. Click on Instant payment notifications to set your URL and enable Receive IPN messages as shown below: