How to setup PayPal payment method for subscription

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

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:

  1. Go to: WooCommerce > Settings > Payments.
  2. Use the toggle under Enabled to select PayPal.
  3. Select Set up. You will be redirected to the PayPal Standard settings.
  4. 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.
    PayPal-Basic details
    PayPal-Basic details

    Advanced Options

  5. 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.
  6. 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.
  7. 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).
  8. Enter an email address for Receiver Mail if this address is different than the PayPal email address you entered above in step 4.
  9. 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.
  10. Specify an Invoice Prefix (useful if you have multiple stores). WC is defaulted to denote WooCommerce transactions.
  11. 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.
  12. 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.
  13. 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.
  14. Image URL optionally enter the URL to a 150x50px image displayed as your logo in the upper left corner of the PayPal checkout pages.
    PayPal-Advanced Options
    PayPal-Advanced Options
  15. There are three fields to paste API information into:
    • API Username
    • API Password
    • API Signature
PayPal-API Credentials
PayPal-API Credentials

Live API Information can be obtained from:

  1. Log in to your PayPal account at PayPal.com.
  2. Go to My Selling Tools > API Access.
  3. Select the NVP/SOAP API integration (Classic) > View API Signature.
  4. 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:

PayPal IPN Settings
PayPal IPN Settings

 

Leave a Reply

Your email address will not be published. Required fields are marked *