Why would you use Website Payments Pro and Payflow Pro? They're essentially the same (although Payflow Pro requires you to sign up for a merchant account, whereas Website Payments Pro doesn't).
What you need to do is:
- Sign up for PayPal Website Payments Pro (US, UK and Canada only).
- Once approved, sign up for Direct Recurring Payments
- Once approved, start integrating with PayPal via the DoDirectPayment API (one-off payments) and CreateRecurringPaymentsProfile (recurring payments).
DoDirectPayments lets you add in card details via the CREDITCARDTYPE
, ACCT
, EXPDATE
and CVV2
parameters. This lets you charge buyers for one-off payments.
If you wish to set up recurring payments, you would use the CreateRecurringPaymentsProfile API instead.
This also lets you specify card details as detailed above, but in addition will let you specify terms for a recurring term on which the payment must recur.
For example; an example API call for CreateRecurringPaymentsProfile would look as follows:
USER=Your API username
PWD=Your API password
SIGNATURE=Your API signature
VERSION=84.0
METHOD=CreateRecurringPaymentsProfile
DESC=Monthly recurring payment for MyStore Ltd
BILLINGPERIOD=Month
BILLINGFREQUENCY=12
TOTALBILLINGCYCLES=0
AMT=9.99
TRIALBILLINGPERIOD=Day
TRIALBILLINGFREQUENCY=7
TRIALTOTALBILLINGCYCLES=1
TRIALAMT=0.99
CURRENCYCODE=GBP
CREDITCARDTYPE=Visa
ACCT=4556699176680030
EXPDATE=122012
CVV2=000
[email protected]
STREET=12 Street
CITY=Beverly Hills
STATE=CA
ZIP=90210
COUNTRYCODE=US
This will set up a recurring payment profile which PayPal will bill for 9.99 GBP monthly, with a 7 day trial period of 0.99 GBP and run indefinitely. Once the API call is run, it will return a PROFILEID in response and the buyer will be charged 0.99 GBP. He will be charged 9.99 GBP after 7 days.
You must store this PROFILEID on your end, as this is the unique identifier which refers to this profile.
If you wish to test CreateRecurringPaymentsProfile, sign up at https://developer.paypal.com/ and create a preconfigured US, Website Payments Pro test account, and ask PayPal MTS over at https://www.paypal.com/mts to activate CreateRecurringPaymentsProfile for your test account (be sure to include the API username, but not any other API credentials).