Zuora supports electronic payment processing using a variety of different payment methods such as credit cards, PayPal, debit cards, and direct debit (including ACH). Merchants planning to support the PayPal Billing Agreement ID (BAID) payment method via PayPal's Express Checkout must utilize the PayPal's APIs to create the PayPal BAID, which gets passed to Zuora to create the PayPal payment method. Such payment method can be used for processing payments in Zuora and payments can be one time or recurring.
This article provides you information on PayPal BAIDs and directs you to the PayPal documentation for instructions on obtaining a BAID via the PayPal APIs and sending that BAID to Zuora when creating a payment method.
A billing agreement ID (BAID) is specific to the PayPal payment method and BAID is a contract that allows a merchant to withdraw funds from a customer's PayPal account without the customer having to log into PayPal to approve each and every payment transaction. Billing agreements are typically used for recurring payments, but can be used to pay for one time charges as well. BAIDs do not expire and are good until the BAID is canceled by the customer. The funding source for a BAID is either a credit card or a bank account. The BAID information stored in Zuora is the BAID number and the PayPal email address for the customer. Therefore, no secure information related to the funding source (such as credit card numbers or bank account numbers) are stored in Zuora.
Using the Express Checkout APIs, you can create a BAID that gets passed to Zuora to create the payment method. The Express Checkout documentation for each of the PayPal products is available on the PayPal website.
Here is a sample workflow for how a PayPal BAID gets created and stored in Zuora:
If you would like to test our reference transactions and with obtaining the billing agreement ID using your PayPal Sandbox, you can request reference transaction for your PayPal Sandbox by posting a request to the PayPal x.commerce forum.
Testing your integration using a PayPal live account is recommended prior to fully going live with this BAID integration. If reference transactions is enabled in your PayPal Sandbox but is not enabled in your PayPal live account, your integration will not work. Reference transactions must be enabled for the account you want to use for creating BAIDs.
There are two primary ways to obtain a BAID, listed below. Zuora uses method #2, obtaining a BAID without making a purchase through PayPal.
Below are the steps from an API integration perspective. We provide you a second method so you can see an alternative way of doing this. Please note that these instructions are from PayPal and PayPal should be your first line of support if you encounter any issues.
These steps follow the PayPal Express Checkout Advanced Features Guide.
As a response to the above request, you receive a
Example redirect URL containing the
token from Step 1.
TOKEN to this URL and redirect the Customer to PayPal's site to accept the Billing Agreement. The customer will be asked to enter their PayPal credentials and once they successfully accept the billing agreement, the customer is redirected to the
RETURNURL value from Step 1.
From the page that you specified in
RETURNURL, now call
GetExpressCheckoutDetails to get the
PAYERID of the buyer.
Token in this request and get back the billing agreement details such as the
Create Billing Agreement Request Token and Action = X.
PARTNER=partner &VENDOR=vendor &PWD=password
This will return a BAID that you will use to store in Zuora as a PayPal payment method.
Make a call to Zuora to add the BAID as a payment method.
If you would like to migrate BAIDs for existing customers in PayPal over to Zuora, so that Zuora can handle the recurring billing for such customer, simply follow the instructions for creating a payment method. You can use the billing agreement information such as the Billing Agreement ID number and the PayPal Email address to create the PayPal payment method in Zuora.
When creating a Payment Method in the Zuora API, use the
create() call. For more information about the call, see create().
The PayPal BAID payment method you create must have an account ID; the payment method account cannot be anonymous. You can also use the Zuora API to create a subscription with a PayPal BAID payment method using the
The REST API cannot be used to create a BAID payment method.
Follow the instructions to populate all the required payment method information and be sure to populate all the PayPal fields and payment method
PaypalBaid: This is the billing agreement number.
PaypalEmail: This is the PayPal email address associated with the billing agreement number.
PaypalType: Use ExpressCheckout (for Payflow Pro gateway) and use AdaptivePayments(for the PayPal Adaptive Payments gateway) when creating PayPal payment methods.
Type: For the type of payment method, choose PayPal.
When creating a Payment Method in the Zuora UI, follow the instructions to create a payment method in the customer account.
PayPal payment methods can only be created if the customer account (under Billing and Payment Term) is set up to use PayPal as the gateway.
Once PayPal is set up as the Payment Gateway and attempt to create a new electronic payment method, you will see PayPal as an option with fields to enter a PayPal Email and the BAID.
If you have migrated any customer accounts from PayPal to Zuora which have active PayPal recurring payments profiles, you may need to disable the recurring profile in PayPal since recurring payments will now be handled in Zuora. Deactivating recurring payments profiles will avoid duplicate payments being charged to your customers (with one payment in PayPal and one payment in Zuora).
To deactivate a recurring payments profile via the PayPal API, you will need to pass the action=C to cancel an active profile and provide the profileID in the request as shown here:
For more information, view the Payflow Pro Recurring Billing Guide.
To deactivate a recurring payments profile via the PayPal UI, go to https://manager.paypal.com and follow these steps:
For more information, log into https://manager.paypal.com and use the "help" feature to search for this topic (for example: search for cancelling recurring profile."