Skip to main content
You can enable your subscribers to purchase a subscription using PayPal Express Checkout for payment. To enable this functionality, you must use the Subscribe APIs.
  • Use Case Number: 2-2-03
  • Completed By: Software Developer
  • Estimated Completion Time: 1 day

Basic Scenario

A subscriber purchases a subscription at the standard rate using PayPal Express Checkout for payment.

Design Approach

  1. Call the subscriptions create endpoint with the PayPal Express Checkout payment method.
  2. Extract the redirect URL from the response.
  3. Redirect the user to PayPal Express Checkout to authorize the subscription.
  4. Upon success call the subscriptions endpoint to finalize the PayPal Express Checkout transaction.
For testing you can use a PayPal sandbox and set up a testing buyer and seller account (see https://www.sandbox.paypal.com/). For additional developer information about PayPal, see: https://developer.paypal.com. Parent topic:Adding Additional Payment Methods

Create a Subscription with Paypal Express Checkout Payment Method Using Subscribe APIs

Establish a valid PayPal business account, authorize Vindicia to be a presenter on that account, and supply the required credentials to Vindicia. For implementation details, see Using PayPal with Vindicia Subscribe. To create a Subscription with Paypal Express Checkout as the Payment Method:
  1. Capture the subscription information and begin the subscription create process by calling the subscriptions endpoint with the request JSON. For PayPal, the subscription create API call includes the PayPal payment method with the return_url (where to redirect the user after the PayPal credentials have been successfully captured), as well as a cancel_url (where to redirect the user in case of invalid PayPal credentials).
    Subscribe sends a redirection URL in the response to the API call. You then redirect the user using that URL to enable the user to login to PayPal and authorize the subscription. If the login is successful, Subscribe responds with the URL you provided for return_url and the PayPal transaction VID is returned in the URL string. If unsuccessful Subscribe responds with the cancel_url. PayPal Return URL contains the vindicia_vid: http://merchant.success.paypal.com/? **vindicia\_vid=8d3900ef6f5b899b8883576101066de4131c30d3**&vin_validate=1&token=EC-6UY81576RU8018237
  2. After the PayPal credentials have been captured successfully, call the subscriptions endpoint to capture the initial PayPal transaction and set up the subscription for recurring billing. Note: The initial transaction VID is passed to the subscriptions endpoint with the finish action. https://api.staging.us-west.vindicia.com/subscriptions/8d3900ef6f5b899b8883576101066de4131c30d3/actions/finish Sample Code:
  • A proper Subscription with Account and Payment Method objects are created in Subscribe.
  • The initial Transaction is generated if applicable, including any applicable taxation.
  • Future billings are correctly predicted.
  • The Account has been granted appropriate Entitlements.
Parent topic:Enable Subscribers to Purchase a Subscription Using a PayPal Express Checkout Account