How to use PayPal as a payment method with API based integration?
Problem Statement
You want to know how to use PayPal as a payment method with API-based integration.
Solution
This article covers:
Configuring PayPal Express Checkout
PayPal configuration for API based integration with Chargebee
The PayPal Express Checkout gateway allows customers to make payments using their PayPal account.
If you're using Chargebee's checkout pages for signup, linking your PayPal account with Chargebee under the payment gateway configuration would suffice. Our checkout pages would display the PayPal payment option on the checkout pages. See setting up PayPal Express Checkout in Chargebee.
Note: Ensure that you configure the Smart Routing setting to allow PayPal to be displayed on the checkout page. For this, navigate to Settings > Configure Chargebee > Payment Gateways and click Manage Rules as in the screenshot below:
If you're using your own checkout workflow and using the API based integration to create subscriptions in Chargebee, here's the process to be followed:
-
Integrate your site with PayPal Express Checkout. See setting up PayPal Express Checkout.
-
Configure PayPal Express Checkout in Chargebee. See PayPal Express Checkout prerequisites for your live site.
-
Push information to Chargebee whenever a customer adds/updates their payment method. Push the Billing Agreement ID obtained from PayPal to Chargebee. See testing PayPal in Chargebee's test site.