Notice of non-liability:
PayPal, Inc. is providing the information i n this document t o you “AS-IS” with all faults. PayPal, Inc. makes no warranties of any kind (whether express,
implied or statutory) with respect to the information co ntained herein. PayPal, Inc. assumes no liability for damages (whether direct or indirect), caused
by errors or omissions, or resulting from the use of this document or the information contained in this document or resulting f rom the application or use
of the product or service described herein. PayPal, Inc. reserves the right to make changes to any information herein without further notice.
Appendix AObtaining Consent to Bill Customers Using Recurring Billing
39
4December 2012Payflow Pro Recurring Billing Service User’s Guide
This Guide
This guide describes how to use the Payflow SDK to perform recurring billing transactions.
The Recurring Billing Service is a scheduled payment solution that enables you to
automatically bill your customers at regular intervals – for example, a monthly fee of $42 for
36 months with an initial fee of $129.
Audience
This guide assumes that its readers:
Are experienced web or application developers
Have a background in payments services
Are familiar with the contents of Payflow Pro Developer’s Guide
Preface
That document along with this guide are your primary sources of information on
developing payments applications.
Purpose
This guide describes in detail how you can use the Payflow SDK to perform recurring billing
transactions. For details on how to use PayPal Manager – the web-based administration tool
for processing transactions manually, issuing credits, and generating reports, see PayPal
Manager online help.
NOTE: PayPal Manager must be used to send customers email receipts and notifications of
failed transactions.
Organization of This Guide
Chapter 1, “Managing Payflow Services,” provides an overview of the Recurring Billing
functionality available in PayPal Manager and in the Payflow SDK.
Chapter 2, “Using the SDK to Perform Recurring Tasks,” describes the use of the Payflow
SDK to perform recurring transactions.
Chapter 3, “Testing Recurring Billing,” describes how to test recurring transactions.
Payflow Pro Recurring Billing Service User’s GuideDecember 20125
Preface
Where To Go For More Information
Appendix A, “Obtaining Consent to Bill Customers Using Recurring Billing,” outlines
your responsibilities in obtaining prior authorization from the customer to bill on an
automated schedule.
Where To Go For More Information
For more information, see the following:
Payflow Pro Developer’s Guide
Describes Payflow Pro, a high performance TCP/IP-based Internet payment gateway
solution. Payflow Pro is pre-integrated with leading e-commerce solutions and is also
available as a downloadable SDK. This guide contains:
– Detailed descriptions of the Payflow Pro transaction parameters
– Error code information
– Testing information
See the Payflow ACH Payment Service Guide for details on ACH payment processing.
All of the above Payflow documentation can be found on the PayPal Developer Central
website.
See PayPal Manager online help for details on how to use PayPal Manager to perform
recurring tasks.
How to Contact Customer Service
For answers to specific questions about PayPal products:
Contact Customer Service at payflow-support@paypal.com.
6December 2012Payflow Pro Recurring Billing Service User’s Guide
Revision History
TABLE P.1 Revision History
DateDescription
December 2012Updated description of RETRYNUMDAYS parameter.
January 2010Added using Inquiry to view recurring transaction and optional transaction details in a
October 2009Added support for optional transactions that are used to validate the buyer’s account
Preface
Revision History
profile. Included example.
information. No amount is passed with this option.
August 2009 Added using a Billing Agreement ID to create a PayPal profile with
December 2008Removed RETRYING CURRENT PAYMENT value from
response.
October 2008Removed incomplete and confusing list of parameters that can be modified in a profile.
Added ACH as a recurring billing profile that is supported.
June 2008Updated Preface.
Updated description of
September 2007Adapted for Australia
ACCT parameter.
STATUS parameter in Inquiry
ACTION=A.
Payflow Pro Recurring Billing Service User’s GuideDecember 20127
Preface
Revision History
8December 2012Payflow Pro Recurring Billing Service User’s Guide
1
Managing Payflow Services
This chapter provides a high-level overview of the tasks you can perform using PayPal
Manager and the Payflow SDK.
IMPORTANT: You must have prior authorization from the customer to bill on an automated
schedule. See Appendix A, “Obtaining Consent to Bill Customers Using
Recurring Billing,” for additional details.
In This Chapter
“About Payflow Services” on page 9
“Recurring Billing Terms” on page 10
“Overview of Recurring Billing Actions Using the Payflow SDK” on page 10
“Overview of the Payflow Services Interface in PayPal Manager” on page 11
About Payflow Services
NOTE: You must obtain each customer’s consent to bill them on an automated schedule.
Appendix A, “Obtaining Consent to Bill Customers Using Recurring Billing” presents
the relevant sections from PayPal’s Merchant Services Agreement.
To configure a customer to be automatically billed on a schedule, you define a recurring
billing profile for that customer . The profile specifies the account to bill, the associated contact
information, the amount to charge each time, the payment period (monthly, weekly, and so
on), and the term (the number of payments) of the agreement.
NOTE: Recurring billing supports credit card and ACH accounts. For details on ACH payment
management, see the Payflow ACH Payment Service Guide on Developer Central.
When you submit the data, PayPal generates the new profile, activates it, and automatically
performs the billing on the specified schedule. As time goes on, the profile stores both the
configuration information that you supplied and the transaction and payment history for the
account. When the term is complete, the profile is mature and no further automated
transactions occur.
When defining the profile, you have the option to perform an initial transaction that differs
from the recurring transaction, for example, to perform a no-charge transaction that validates
the account information or to charge an initial fee. In addition, you can specify how to handle
declined transactions.
You can perform most recurring billing tasks using either PayPal Manager or the Payflow
SDK.
Payflow Pro Recurring Billing Service User’s GuideDecember 20129
Managing Payflow Services
1
Recurring Billing Terms
Recurring Billing Terms
Table 1.1 describes terms you should be familiar with when using the Recurring Billing
Service.
TABLE 1.1Recurring billing terms
TermMeaning
PaymentSum that is transacted during each payment period. Payments differ
Payment PeriodOne payment is made per payment period; for example, a $42 payment
ProfileYour definition of a recurring transaction for a single customer. The
from transactions. Several transactions may be required to successfully
perform a payment for a payment period; for example, due to a lack of
funds during the first transaction attempts. Once a transaction succeeds
for a payment period, the payment is marked as successful.
on a monthly basis. In this example, the payment period is monthly.
profile includes all information required to automatically bill the right
person the right amount of money at the right time for the right period
of time.
Profile IDTwelve-character string (generated by PayPal) that uniquely identifies a
recurring profile. Test profile IDs start with the characters RT and live
profile IDs, with RP.
TermTotal number of payment periods over the duration of the agreement.
For example, a three-year, monthly payment contract has a term of 36.
Term defines the number of scheduled payment periods, not the
payments actually made.
Mature ProfileReference to a profile with a completed term (the total number of
payment periods for the profile have occurred). The fact that a profile is
mature does not necessarily mean that the customer has made all
scheduled payments.
Overview of Recurring Billing Actions Using the Payflow SDK
The Payflow SDK supports several actions that enable you to manage recurring payment
accounts. See Chapter 2, “Using the SDK to Perform Recurring Tasks,” for details on
performing the following supported actions:
Add (ACTION=A)
Add a new recurring billing profile either by submitting the required data (credit card number
or PayPal, payment amount, payment period, and so on) or by converting an existing
transaction into a profile. Upon successful creation, PayPal activates the profile, performs the
optional initial transaction if specified, initiates the payment cycle, and returns a Profile ID.
10December 2012Payflow Pro Recurring Billing Service User’s Guide
Managing Payflow Services
Overview of the Payflow Services Interface in PayPal Manager
Modify (ACTION=M)
Modify any setting in the profile. You have the option to run an Optional Transaction.
Reactivate (ACTION=R)
Reactivate the specified inactive profile. You specify a new start date and have the option to
alter any other profile parameter.
Cancel (ACTION=C)
Deactivate the recurring profile. PayPal records the cancellation date.
Inquiry (ACTION=I)
Inquire about the status of a profile and its payment and transaction history.
Payment (ACTION=P)
Perform a real-time retry on a previously failed transaction.
Overview of the Payflow Services Interface in PayPal Manager
1
PayPal Manager enables you to create and manage recurring billing tasks. See PayPal
Manager online help for details on how to perform the following supported tasks:
Adding a profile for a new recurring billing customer
Managing profiles
Configuring optional email messages
Generating reports
Payflow Pro Recurring Billing Service User’s GuideDecember 201211
Managing Payflow Services
1
Overview of the Payflow Services Interface in PayPal Manager
12December 2012Payflow Pro Recurring Billing Service User’s Guide
2
Using the SDK to Perform
Recurring Tasks
NOTE: You should be familiar with the Payflow SDK to use the information presented in this
chapter. See Payflow Pro Developer’s Guide for full documentation of the SDK. The
Payflow SDK operations described in this chapter are available only to merchants with
the Payflow services.
This chapter describes the use of the Payflow SDK to perform recurring transactions. You
have the option of performing most recurring billing tasks either from PayPal Manager or
from your code using the Payflow SDK. You must, however, configure email settings using
PayPal Manager, as described in PayPal Manager online help.
IMPORTANT: You must have prior authorization from the customer to bill on a schedule.
See Appendix A, “Obtaining Consent to Bill Customers Using Recurring
Billing,” for additional details.
In This Chapter
“About Recurring Billing Profile Actions” on page 13
“Using the Add Action” on page 14
“Using the Modify and Reactivate Actions” on page 21
“Using the Cancel Action” on page 26
“Using the Inquiry Action to View Information for a Profile” on page 27
“Using the Inquiry Action to View the Status of Payments” on page 31
“Using the Payment Action” on page 34
About Recurring Billing Profile Actions
ACTION operations in the Payflow SDK manipulate profiles (add, modify, reactivate, cancel,
and inquire about status) and submit manual retry requests for failed transactions.
Action and Parameter Definitions
Table 2.1 shows how ACTION values are defined in this document.
TABLE 2.1Action value definitions
ACTIONValueDescription
AddACreate a new profile. See“Using the Add Action” on page 14.
Payflow Pro Recurring Billing Service User’s GuideDecember 201213
Using the SDK to Perform Recurring Tasks
2
Using the Add Action
T
ABLE 2.1Action value definitions
ACTIONValueDescription
ModifyMMake changes to an existing profile. If the profile is currently
ReactivateRReactivate an inactive profile. See “Using the Modify and Reactivate
CancelCDeactivate an existin g profile. See “Using the Cancel Action” on
InquiryIEach customer’s profile stores both the configuration information
inactive, then the Modify action reactivates it. See “Using the
Modify and Reactivate Actions” on page 21.
Actions” on page 21.
page 26.
that you supplied with the Add or Modify action and the transaction
and payment history for the customer’s account. The Inquiry action
enables you to view either of the following sets of data about a
customer:
Status of a customer’s profile (described on page 28)
Details of each payment for a profile (described on page 31)
PaymentPRetry a previously failed payment. See “Using the Payment Action”
Using the Add Action
You can Add (ACTION=A) a new recurring profile either by submitting the data that defines
the profile or by converting an existing transaction into a profile.
Upon successful creation of a profile, PayPal activates the profile, performs the Optional
Transaction if specified, initiates the payment cycle, and returns a Profile ID. Upon failure,
PayPal does not generate the profile and returns an error message.
NOTE: If you change your processor information after you have created a profile, you must
create a new profile for the new processor.
Adding a New Profile
To create a new profile:
Provide all required data and specify whether to perform an Optional Transaction. The
Optional Transaction is either of the following:
A Sale transaction for an amount that you specify (typically an account start-up fee)
on page 34.
14December 2012Payflow Pro Recurring Billing Service User’s Guide
Using the SDK to Perform Recurring Tasks
Using the Add Action
An Authorization transaction to validate the customer’s account information before
creating the profile. No amount is passed with this option. (This transaction option is also
known as zero-dollar authorization.)
The recurring profile record keeps track of the total amount collected as a result of optional
Sale transactions in addition to the normal recurring transactions.
To convert an existing transaction into a profile:
Specify the PNREF of the transaction to use as a template, and optionally supply additional
payment data.
IMPORTANT: You can use only a Sale or Delayed Capture transaction as a template for a
profile.
You can specify values for the following transaction parameters in an Add action:
CITY
COMMENT1
COMPANYNAME
COUNTRY
EMAIL
FIRSTNAME
LASTNAME
MIDDLENAME
NAME
PHONENUM
SHIPTOFIRSTNAME
SHIPTOMIDDLENAME
SHIPTOLASTNAME
SHIPTOSTREET
SHIPTOCITY
SHIPTOCOUNTRY
SHIPTOSTATE
SHIPTOZIP
STREET
ZIP
2
NOTE: Values of processor-specific parameters are forwarded and stored, but do not appear in
reports.
Example Add Actions
Adding a New Profile for a Credit Card Account
The following example Payflow parameter string creates a recurring billing profile that bills a
credit card account. Parameters are described in “Required Parameters for the Add Action” on
page 16 and “Optional Parameters for the Add Action” on page 19.
Payflow Pro Recurring Billing Service User’s GuideDecember 201215
The following example Payflow parameter string creates a recurring billing profile that bills a
PayPal account. Parameters are described in “Required Parameters for the Add Action” on
page 16 and “Optional Parameters for the Add Action” on page 19.
The following example Payflow parameter string creates a profile for an original transaction
that had a PNREF value of xyz123 and specifies a payment amount of $42. You must set the
ORIGID value to the original transaction’s PNREF value. Parameters are described in
“Required Parameters for the Add Action” on page 16 and “Optional Parameters for the Add
Action” on page 19.
The following are required parameters for the Add action:
TABLE 2.2Required recurring profile parameters for the Add action
ParameterDescriptionUsage (Length)
TRXTYPESpecifies a recurring profile request.Must be “R”
TENDERTender type. Is one of the following values:
C = Credit card
P = PayPal
A = Automated Clearinghouse
Must be “C”, “P”,
or “A” (1)
16December 2012Payflow Pro Recurring Billing Service User’s Guide
Using the SDK to Perform Recurring Tasks
Required Parameters for the Add Action
T
ABLE 2.2Required recurring profile parameters for the Add action(Continued)
ParameterDescriptionUsage (Length)
2
ACTIONSpecifies Add, Modify, Cancel, Reactivate, Inquiry, or
Payment.
PROFILENAMEName for the profile (user-specified). Can be used to
search for a profile.
ACCTRequired when TENDER=C or TENDER=A. Can be
used to search for a profile.
NOTE: For a credit card profile, be sure to use a valid
credit card number. If necessary, perform an
Authorization with a zero-dollar amount to
verify the credit card.
BAIDIs the billing agreement ID returned in the Do Express
Checkout Payment or Create Customer Billing
Agreement response. See Express Checkout for Payflow Pro for details on obtaining and updating
BAIDs.
NOTE: E ither a BAID or ORIGID (PNREF) returned
from the original transaction used to create a
new profile is required when TENDER=P.
Must be “A” (1)
Non-unique
identifying text
name
Alphanumeric(128)
Alphaumeric (19)
Alphaumeric (19)
ORIGIDIs the PNREF value (length=12) returned from the
original transaction used to create a new profile.
NOTE: Either a BAID or ORIGID is required to create
a new profile when TENDER=P.
AMTDollar amount (US dollars) to be billed.
Specify the exact amount to the cent using a decimal
point—use 34.00, not 34. Do not include comma
separators—use 1199.95 not 1,199.95.
STARTBeginning date for the recurring billing cycle used to
calculate when payments should be made. Use
tomorrow’s date or a date in the future.
Format: MMDDYYYY
TERMNumber of payments to be made over the life of the
agreement.
A value of 0 means that payments should continue
until the profile is deactivated.
Alphaumeric (19)
Numeric (10 with
decimal point)
Numeric (8)
Numeric
Payflow Pro Recurring Billing Service User’s GuideDecember 201217
Using the SDK to Perform Recurring Tasks
2
Required Parameters for the Add Action
T
ABLE 2.2Required recurring profile parameters for the Add action(Continued)
ParameterDescriptionUsage (Length)
PAYPERIODSpecifies how often the payment occurs:
WEEK: Weekly - Every week on the same day of
the week as the first payment.
BIWK: Every Two Weeks - Every other week on
the same day of the week as the first payment.
SMMO: Twice Every Month - The 1st and 15th of
the month. Results in 24 payments per year.
SMMO can start on 1st to 15th of the month,
second payment 15 days later or on the last day of
the month.
FRWK: Every Four Weeks - Every 28 days from
the previous payment date beginning with the first
payment date. Results in 13 payments per year.
MONT: Monthly - Every month on the same date
as the first payment. Results in 12 payments per
year.
QTER: Quarterly - Every three months on the same
date as the first payment.
SMYR: Twice Every Year - Every six months on
the same date as the first payment.
YEAR: Yearly - Every 12 months on the same date
as the first payment.
Must be a value
shown here,
including all
uppercase letters
(4)
18December 2012Payflow Pro Recurring Billing Service User’s Guide
Using the SDK to Perform Recurring Tasks
Optional Parameters for the Add Action
Required Parameters for the Add Action
2
TABLE 2.3Optional recurring profile parameters for
ParameterDescriptionUsage (Length)
ORIGIDPNREF value (length=12) of the original
transaction used to create a new profile.
NOTE: ORIGID is optional when TENDER=C or
TENDER=A.
MAXFAILPAYMENTSThe number of payment periods (as specified by
P AYPERIOD) for which the transaction is allowed
to fail before PayPal cancels a profile. These
periods need not be consecutive (for example, if
payments fail in January, March, and June, the
profile is cancelled).
For example, if you specify 3, then PayPal allows
a maximum of three failed payment periods
(possibly with multiple retries during each
payment period, and possibly non-consecutive
periods). If the transaction is not approved for any
three periods (months in the example), then
PayPal deactivates the profile.
IMPORTANT: If you do not specify a value, the
default value of 0 (zero) specifies no limit. Retry
attempts occur until the term is complete.
Add
action
Alphaumeric (19)
Numeric
Default = 0
RETRYNUMDAYSThe number of consecutive days that PayPal
should attempt to process a failed transaction until
Approved status is received; maximum value is 4.
EMAILCustomer email address. This value is used when
sending email receipts to customers.
DESCOptional description of the goods or services
being purchased.
This parameter applies only for ACH_CCD
accounts.
COMPANYNAMECompany name associated with this profile.Alphanumeric
OPTIONALTRXDefines an optional Authorization for validating
the account information or for charging an initial
fee. If this transaction fails, then the profile is not
generated. The values are:
A: an optional Authorization transaction to
verify the account. It applies to credit card
transactions only.
S: a Sale transaction for an initial fee specified
by OPTIONALTRXAMT.
Numeric
Alphanumeric
(120)
Alphanumeric
(80)
(64)
Alphanumeric (1)
Payflow Pro Recurring Billing Service User’s GuideDecember 201219
Using the SDK to Perform Recurring Tasks
2
Required Parameters for the Add Action
T
ABLE 2.3Optional recurring profile parameters for
ParameterDescriptionUsage (Length)
OPTIONALTRXAMTAmount of the Optional Transaction. Required
STREETBilling street.Alphanumeric
ZIPBilling postal code. Alphanumeric
Response Values for the Add Action
Response values are defined in detail in the Payflow Pro Developer’s Guide.
Add
only when OPTIONALTRX=S.
NOTE: Do not specify an amount when
OPTIONALTRX=A. The amount will be
ignored.
action (Continued)
(150)
(10)
T
ABLE 2.4Response values for Add action
FieldDescription
RESULTResult value for the action.
PROFILEIDIf RESULT = 0, then this value is the Profile ID.
Profile IDs for test profiles start with the characters RT.
Profile IDs for live profiles start with RP.
RESPMSGOptional response message.
RPREFReference number to this particular action request.
Returned Values if You Specify an Optional Transaction
Table 2.5 lists values that are included in the response if the transaction involved an optional
transaction. Other payment-related fields could also be returned, depending on your
configuration (for example, verbosity level).
T
ABLE 2.5Response fields returned if OPTIONALTRX is used
FieldDescription
TRXPNREFPNREF of the optional transaction.
TRXRESULTRESULT of the optional transaction.
TRXRESPMSGRESPMSG of the optional transaction.
20December 2012Payflow Pro Recurring Billing Service User’s Guide
Using the SDK to Perform Recurring Tasks
Using the Modify and Reactivate Actions
Using the Modify and Reactivate Actions
You can Modify (ACTION=M) any profile value by sending any subset of the profile
parameters. If the profile is currently inactive (because you deactivated it), then the Modify
action reactivates it.
NOTE: The Modify action cannot reactivate a profile that PayPal canceled.
The Modify action is useful, for example, when an inactive customer wishes to restart
payments using a new valid credit card. The Modify action changes a profile’s STATUS to
active but does not change the START date. To change the START date, use the Reactivate
command. Profile STATUS is described in Table 2.13.
You can Reactivate (ACTION=R) a profile with inactive STATUS. (Profiles can be
deactivated for the following reasons: the term has completed, the profile reached maximum
allowable payment failures, or you canceled the profile.) You have the option to alter any
profile parameter, including an Optional Transaction, and you mus t specify a new start date.
NOTE: Values of processor-specific parameters are forwarded and stored, but do not appear in
reports.
2
Example Modify Action
The following example Payflow parameter string uses the Modify (ACTION=M) action to
change the amount of payment to $42.00 (AMT=42.00) for profile ID number RP0000001234.
Parameters are described in “Required Parameters for the Modify and Reactivate Actions” on
page 22.
Example Reactivate Action
IMPORTANT: Payments missed while a profile is inactive are not re-tried if you reactivate
the profile after the missed payment periods have passed. To submit the
missed payment transactions, you must reactivate the profile and increase the
value of either TERM or MAXFAILPAYMENTS. Alternatively, perform a
manual payment using PayPal Manager – the profile is activated as a side
effect of the manual payment.
The following example Payflow par ameter string performs a Reactivate ac tion. Parameters are
described in “Required Parameters for the Modify and Reactivate Actions” on page 22.
Payflow Pro Recurring Billing Service User’s GuideDecember 201221
Using the SDK to Perform Recurring Tasks
2
Required Parameters for the Modify and Reactivate Actions
Example Response to a Modify or Reactivate Action
The following is an example response to a Modify or Reactivate action. Returned values are
described in “Returned Values for the Modify or Reactivate Actions” on page 26.
Required Parameters for the Modify and Reactivate Actions
TABLE 2.6Required recurring profile fields for Modify and Reactivate action s
ParameterDescriptionUsage (Length)
TRXTYPESpecifies a recurring profil e req uest.Must be “R” (1)
ACTIONSpecifies Action type: Modify (M) or Reactivate (R).Must be “M” or
ORIGPROFILEIDRequired for Modify action. Profile ID of the profile
that gets the action.
Profile IDs for test profiles start with RT. Profile IDs for
live profiles start with RP.
“R” (1)
Optional Parameters for the Modify and Reactivate Actions
The following parameters do not need to be changed or added for a Modify or Reactivate
action.
T
ABLE 2.7Optional recurring profile fields for Modify and Reactivate actio ns
ParameterDescriptionUsage (Length)
PROFILENAMEName for the profile (you specify the name). Can be
used to search for a profile.
ACCTCan be used to search for a profile.Numeric (19)
CURRENCYOne of the following three-character currency codes
listed in the your Payflow Developer’s Guide.
NOTE: CURRENCY is applicable only to
processors that support transaction-level
currency.
Non-unique
identifying text
name
Alphanumeric
(128)
Numeric (3)
22December 2012Payflow Pro Recurring Billing Service User’s Guide
Using the SDK to Perform Recurring Tasks
Required Parameters for the Modify and Reactivate Actions
T
ABLE 2.7Optional recurring profile fields for Modify and Reactivate
ParameterDescriptionUsage (Length)
ORIGPROFILEIDRequired for Modify action. Profile ID of the profile
that gets the action.
Profile IDs for test profiles start with RT.
Profile IDs for live profiles start with RP.
2
AMTDollar amount to be billed. Can be used to search
for a profile.
Specify the exact amount to the cent using a decimal
point – use 34.00, not 34. Do not include comma
separators – use 1199.95 not 1,199.95.
STARTBeginning (or restarting) date for the recurring
billing cycle used to calculate when payments
should be made. Use tomorrow’s date or a date in
the future.
Format: MMDDYYYY
For ACTION=Modify, this is used to speed up or
delay only the next payment date. If a new
PAYPERIOD is specified, then this is also the time
that the next payment is made.
TERMNumber of payments to be made over the life of the
agreement.
A value of 0 means that payments should continue
until the profile is deactivated.
Numeric (10 with
decimal point)
Numeric (8)
Numeric
Payflow Pro Recurring Billing Service User’s GuideDecember 201223
Using the SDK to Perform Recurring Tasks
2
Required Parameters for the Modify and Reactivate Actions
T
ABLE 2.7Optional recurring profile fields for Modify and Reactivate
ParameterDescriptionUsage (Length)
PAYPERIODSpecifies how often the payment occurs.
Note: For ACTION=Modify, if START is not
specified, then the next payment is calculated based
on last payment date.
All PAYPERIOD values must use capital letters, as
shown here.
WEEK: Weekly - Every week on the same day
of the week as the first payment.
BIWK: Every T wo W eeks - Every other week on
the same day of the week as the first payment.
SMMO: Twice Every Month - The 1st and 15th
of the month. Results in 24 payments per year.
SMMO can start on 1st to 15th of the month,
second payment 15 days later or on the last day
of the month.
FRWK: Every Four Weeks - Every 28 days from
the previous payment date beginning with the
first payment date. Results in 13 payments per
year.
MONT: Monthly - Every month on the same
date as the first payment. Results in 12 payments
per year.
QTER: Quarterly - Every three months on the
same date as the first payment.
SMYR: T wice Every Year - Every six months on
the same date as the first payment.
YEAR: Yearly - Every 12 months on the same
date as the first payment.
Must be a value
shown here,
including all
uppercase letters
(4)
MAXFAILPAYMENTSThe number of payment periods (as specified by
PAYPERIOD) fo r whi ch the transaction is allowed
Numeric
Default = 0
to fail before PayPal cancels a profile. These periods
need not be consecutive (for example, if payments
fail in January, March, and June, the profile is
cancelled).
For example, if you specify 3, then PayPal allows a
maximum of three failed payment periods (possibly
with multiple retries during each payment period,
and possibly non-consecutive periods). If the
transaction is not approved for any three periods
(months in the example), then PayPal deactivates
the profile.
IMPORTANT: Even though this parameter is
optional, if you do not specify a value, the default
value of 0 (zero) specifies that retry attempts should
occur until the term is complete.
24December 2012Payflow Pro Recurring Billing Service User’s Guide
Using the SDK to Perform Recurring Tasks
Required Parameters for the Modify and Reactivate Actions
T
ABLE 2.7Optional recurring profile fields for Modify and Reactivate
ParameterDescriptionUsage (Length)
2
EMAILCustomer email address. This value is used when
sending email receipts to customers.
Alphanumeric
(120)
The presence of email address is the indicator that
an email should be sent.
IMPORTANT: You must specify additional text for
the message using PayPal Manager. For details, see
PayPal Manager online help.
COMPANYNAMECompany name associated with this profile.Alphanumeric
(64)
OPTIONAL TRXDefines an optional Authorization for validating the
Alphanumeric (1)
account information or for charging an initial fee. If
this transaction fails, then the profile is not
generated. The values are:
A: an optional Authorization transaction to
verify the account. It applies to credit card
transactions only.
S: a Sale transaction for an initial fee specified
by OPTIONALTRXAMT.
OPTIONALTRXAMTAmount of the Optional Transaction. Required only
when OPTIONALTRX=S.
NOTE: Do not specify an amount when
OPTIONALTRX=A. The amount will be
ignored.
STREETBilling address. Alphanumeric
(150)
ZIPBilling zip code. Alphanumeric
(10)
Payflow Pro Recurring Billing Service User’s GuideDecember 201225
Using the SDK to Perform Recurring Tasks
2
Using the Cancel Action
Returned Values for the Modify or Reactivate Actions
ABLE 2.8Response values for Modify and Reactivate actions
T
FieldDescription
RESULTResult value for the action.
PROFILEIDThe Profile ID of the original profile.
Profile IDs for test profiles start with the characters RT.
Profile IDs for live profiles start with RP.
RESPMSGOptional response message.
RPREFReference number to this particular action request.
Returned Values if You Specify an Optional Transaction
Table 2.9 lists values that are included in the response if the transaction involved an Optional
transaction. Other payment-related fields could also be returned, depending on your
configuration (for example, verbosity level).
T
ABLE 2.9Response fields returned for Modify and Reactivate ac tions if
OPTIONALTRX is used
FieldDescription
TRXPNREFPNREF of the optional transaction.
TRXRESULTRESULT of the optional transaction.
TRXRESPMSGRESPMSG of the optional transaction .
Using the Cancel Action
You can Cancel (ACTION=C) the recurring profile to deactivate the profile from performing
further transactions. The profile is marked as cancelled and the customer is no longer billed.
PayPal records the cancellation date.
All parameters other than those listed in the example are ignored, and no profile settings are
changed when you submit a Cancel action.
NOTE: If desired, you can use the Reactivate action to reactivate the profile.
Example Cancel Action
The following example Payflow parameter string performs a Cancel action. Parameters are
described in “Required Parameters for the Cancel Action” on page 27.
TABLE 2.10 Parameters required by the Cancel action
ParameterDescriptionUsage (Length)
TRXTYPESpecifies a recurring profile request.Must be “R” (1)
ACTIONSpecifies action to take.Must be “C” (1)
ORIGPROFILEIDProfile ID of the profile to cancel.
Profile IDs for test profiles start with RT.
Profile IDs for live profiles start with RP.
2
Returned Values for the Cancel Action
T
ABLE 2.11 Response values for a Cancel action
FieldDescription
RESULTResult value for the action.
PROFILEIDThe Profile ID of the original profile.
Profile IDs for test profiles start with the characters RT.
Profile IDs for live profiles start with RP.
RESPMSGOptional response message.
RPREFReference number to this particular action request.
Using the Inquiry Action to View Information for a Profile
You can use the Inquiry action to request two different sets of information for a profile:
To view the full set of payment information (that is, the recurring and optional transaction
details), you submit two separate Inquiry actions (see “Using the Inquiry Action to View
the Status of Payments” on page 31:
– T o view the recurring transaction details, pass the PA YMENTHISTORY=Y name-value
pair with the Inquiry action.
Payflow Pro Recurring Billing Service User’s GuideDecember 201227
Using the SDK to Perform Recurring Tasks
2
Using the Inquiry Action to View the Status of the Profile
– To view the optional transaction details, pass the PAYMENTHISTORY=O name-value
pair with the Inquiry action.
To view the status of a customer’s profile, submit an Inquiry action that does not include
the PAYMENTHISTORY parameter (alternatively, submit PAYMENTHISTORY=N, the
default value). This use is described in this section.
Using the Inquiry Action to View the Status of the Profile
Example Profile Status Inquiry Action
The following example Payflow parameter string performs a profile status Inquiry action.
Parameters are described in “Required Parameters for the Profile Status Inquiry Action” on
Example Response to a Profile Status Inquiry Action
The following is an example response to a profile status Inquiry action. Returned values are
described in “Response Values for the Profile Status Inquiry Action” on page 29.
NOTE: Transactions sent after the buyer’s account has expired return the expiration date or
28December 2012Payflow Pro Recurring Billing Service User’s Guide
Using the SDK to Perform Recurring Tasks
Using the Inquiry Action to View the Status of the Profile
Required Parameters for the Profile Status Inquiry Action
TABLE 2.12 Required parameters for the Inquiry action
ParameterDescriptionUsage (Leng t h)
TRXTYPESpecifies a recurring profile request.Must be “R” (1)
ACTIONSpecifies action to take.Must be “I” (1)
ORIGPROFILEIDProfile ID of the profile to inquire about.
Profile IDs for test profiles start with RT.
Profile IDs for live profiles start with RP.
Response Values for the Profile Status Inquiry Action
An Inquiry action for profile status can return any of the values listed in Table 2.13. Inquiries
echo only those name-value pairs sent to the recurring billing server. For example, if, while
adding or modifying a profile, you do not assign a value to PHONENUM, inquiries about the
profile do not return a value for PHONENUM.
2
NOTE: See Payflow Pro Developer’s Guide for a list of optional parameters that you can pass
for reporting purposes.
T
ABLE 2.13 Response fields for Inquiry actions
FieldDescription
RESULTResult value of the profile request. This value represents the success or
failure of the Inquiry transaction, not of the financial transaction.
PROFILEIDRequest profile reference number. Profile IDs for test profiles start with the
characters RT. Profile IDs for live profiles start with RP.
PROFILENAMEName of the profile.
RESPMSGResponse message if result value is non-zero.
STARTDate of beginning recurring billing cycle.
TERMTotal number of payments.
PAYPERIODPeriod of payment recurrence (weekly, monthly, and so on).
STATUSCurrent status of the profile. One of the following:
VENDOR INACTIVE
DEACTIVATED BY MERCHANT
EXPIRED (if profile is expired, limited profile data is returned)
TOO MANY FAILURES: PayPal cancelled the profile because it has
too many failed transactions (for example, as would result with a bad
credit card).
ACTIVE
Payflow Pro Recurring Billing Service User’s GuideDecember 201229
Using the SDK to Perform Recurring Tasks
2
Using the Inquiry Action to View the Status of the Profile
T
ABLE 2.13 Response fields for Inquiry actions (Continued)
FieldDescription
TENDERTender Type.
PAYMENTSLEFTNumber of payments left to be billed.
NOTE: This value decreases by 1 after each payment period, regardless
whether the payment failed or succeeded. To ensure that you receive
funds for each payment period, you must monitor payments and
follow up on any failed payments.
NEXTPAYMENTDate that the next payment is due.
ENDDate that the last payment is due. Present only if this is not an unlimited-
term subscription.
AGGREGATEA MTAmount collected so far for scheduled payments.
AGGREGATEO PTIONALAMTAmount collected through sending optional transactions.
AMTBase dollar amount to be billed.
MAXFAILPAYMENTSThe number of payment periods (specified by PAYPERIOD) for which the
transaction is allowed to fail before PayPal cancels a profile. See
RETRYNUMDAYS.
NUMFAILPAYMENTSNumber of payments that failed.
RETRYNUMDAYSThe number of consecutive days that PayPal should attempt to process a
failed transaction until Approved status is received; maximum value is 4.
EMAILCustomer email address email receipts (described in PayPal Manager online
help).
COMPANYNAMERecurring Profile Company Name.
NAMEName of account holder.
FIRSTNAMEFirst name of card holder.
MIDDLENAMEMiddle name of card holder.
LASTNAMELast name of card holder.
STREETBilling street.
CITYBilling city.
STATEBil ling state.
ZIPBilling postal code.
COUNTRYBilling country.
PHONENUMTelephone number.
SHIPTOFIRSTNAMEFirst name of the ship-to person.
SHIPTOMIDDLENAMEMiddle name of the ship-to person.
30December 2012Payflow Pro Recurring Billing Service User’s Guide
Using the SDK to Perform Recurring Tasks
Using the Inquiry Action to View the Status of Payments
T
ABLE 2.13 Response fields for Inquiry actions (Continued)
FieldDescription
SHIPTOLASTNAMELast name of the ship-to person.
SHIPTOSTREETShipping street.
SHIPTOCITYShipping city.
SHIPTOSTATEShipping state.
SHIPTOZIPShipping postal code.
SHIPTOCOUNTRYShipping country.
Using the Inquiry Action to View the Status of Payments
To view the full set of payment information (that is, the recurring and optional transaction
details), you submit two separate Inquiry actions:
2
To view the recurring transaction details, pass the PAYMENTHISTORY=Y name-value
pair with the Inquiry action.
To view the optional transaction details, pass the PAYMENTHISTORY=O name-value
pair with the Inquiry action.
Using the Inquiry Action to view Recurring Transaction Details
Example Status for a Recurring Transaction Details Inquiry Action
The following example Payflow parameter string performs a recurring transaction details
Inquiry action. Inquiry action parameters are described in “Required Parameters for the Status
Example Results for a Recurring Transaction Details Inquiry Action
The following is an example response to a recurring transaction details Inquiry action. The
data includes only the final payment attempt for each payment period. The characters P_ are
prepended to parameter names to indicate that they represent historical payment data. The
number appended to parameter names is the payment number.
Returned values are described in “Required Parameters for the Status of Payments Inquiry
Action” on page 33.
Payflow Pro Recurring Billing Service User’s GuideDecember 201231
Using the SDK to Perform Recurring Tasks
2
Using the Inquiry Action to View the Status of Payments
Using the Inquiry Action to View Optional Transaction Details
Example Status for an Optional Transaction Details Inquiry Action
The following example Payflow parameter string performs an optional transaction details
Inquiry action. Inquiry action parameters are described in “Required Parameters for the Status
Example Results for an Optional Transaction Details Inquiry Action
The following is an example response to an optional transaction details Inquiry action. The
data includes only the final payment attempt for each payment period. The characters P_ are
prepended to parameter names to indicate that they represent historical payment data. The
number appended to parameter names is the payment number.
Returned values are described in “Required Parameters for the Status of Payments Inquiry
32December 2012Payflow Pro Recurring Billing Service User’s Guide
Using the SDK to Perform Recurring Tasks
Required Parameters for the Status of Payments Inquiry Action
Required Parameters for the Status of Payments Inquiry Action
TABLE 2.14 Required parameters for the Inquiry action
ParameterDescriptionUsage (Length)
2
PAYMENTHISTORYRecurring transaction details are returned when the
value is Y. Optional transaction details, if any, are
returned when the value is O.
TRXTYPESpecifies a recurring profile request.Must be R (1)
ACTIONSpecifies action to take.Must be I (1)
ORIGPROFILEIDProfile ID of the profile to inquire about.
Profile IDs for test profiles start with RT.
Profile IDs for live profiles start with RP.
Return Values for a Status of Payments Inquiry Action
The return parameter names have the format P_<parameter_name>n, where the index n
reflects the payment number, starting at 1. The values listed in Table 2.15 are returned for each
payment:
T
ABLE 2.15 Return parameters for a Status of Payments Inquiry Action
FieldDescription
P_RESULTnResult value of the financial transaction.
Note: Only the final result for each payment is returned, so payments that
eventually succeed after being retried are returned with RESULT=0.
Must be Y or O (1)
P_PNREFnPNREF of the particular payment.
The Payment Network Reference ID value (PNREF) is a unique
transaction identification number issued by PayPal that identifies the
transaction for billing, reporting, and transaction data purposes. The
PNREF value appears in the Transaction ID column in PayPal Manager
reports.
P_TRANSTATEnTRANS_STATE of the particular payment.
Payflow Pro Recurring Billing Service User’s GuideDecember 201233
Using the SDK to Perform Recurring Tasks
2
Using the Payment Action
T
ABLE 2.15 Return parameters for a Status of Payments Inquiry Action(Continued)
FieldDescription
P_TRANSTIMEnThe timestamp for the transaction in the dd-mmm-yy hh:mm AM/PM
format, for example, 17-Jun-04 04:47 PM.
P_AMTnAmount in US dollars that was billed.
Using the Payment Action
The Payment action (ACTION=P) performs a real-time retry on a transaction that is in the
retry state. The response string is similar to the string for Optional transactions, except that,
upon approval, the profile is updated to reflect the successful retry.
If the transaction being retried is part of the current payment period, a successful Payment
action causes the profile to flag the current payment as successful and to advance to the next
payment at the scheduled time.
If the profile had been previously cancelled due to too many failed payments, then a successful
Payment action decrements the failed payment count and re-activates the profile (thus restarting the recurring payment cycle).
Example Payment Action
The following example Payflow parameter string performs a Payment action. Parameters are
described in “Required Parameters for the Payment Action” on page 35.
34December 2012Payflow Pro Recurring Billing Service User’s Guide
Using the SDK to Perform Recurring Tasks
Required Parameters for the Payment Action
Required Parameters for the Payment Action
TABLE 2.16 Parameters for the Payment action
ParameterDescriptionUsage (Length)
TRXTYPESpecifies a recurring profile request.Must be “R” (1)
ACTIONSpecifies action to take.Must be “P” (1)
ORIGPROFILEIDProfile ID of the profile of the transaction to retry.
Profile IDs for test profiles start with RT. Profile IDs for
live profiles start with RP.
2
PAYMENTNUMPayment number identifying the failed payment to be
retried.
AMTIf specified, overwrites the original payment amount for
this payment only. This value does not modify the AMT
specified in the profile.
This parameter is useful for catching up on failed past
payments.
Not required if retrying for the original amount.
Returned Values for the Payment Action
Table 2.17 describes the return values for a pr ofile with no Optional transaction. Table 2.18
describes the return values for a profile that includes an Optional transaction.
T
ABLE 2.17 Response values for a Payment action
FieldDescription
RESULTResult value for the action.
RPREFReference number to this particular action request .
PROFILEIDThe Profile ID of the original profile.
Profile IDs for test profiles start with the characters RT.
Profile IDs for live profiles start with RP.
Numeric
Numeric (10 with
decimal point)
RESPMSGOptional response message.
Payflow Pro Recurring Billing Service User’s GuideDecember 201235
Using the SDK to Perform Recurring Tasks
2
Required Parameters for the Payment Action
Returned Values if You Specify an Optional Transaction
Table 2.18 lists values that are included in the response if the transaction involved is an
Optional transaction. Other payment-related fields could also be returned, depending on your
configuration (for example, verbosity level).
TABLE 2.18 Response fields returned for Modify and Reactivate action s if
OPTIONALTRX is used
FieldDescription
TRXPNREFPNREF of the optional transaction.
TRXRESULTRESULT of the optional transaction.
TRXRESPMSGRESPMSG of the optional transaction.
36December 2012Payflow Pro Recurring Billing Service User’s Guide
Testing Recurring Billing
3
This chapter provides the information you need to test recurring billing.
In This Chapter
“Testing Guidelines” on page 37
“Credit Card Numbers Used for Testing” on page 37
“Testing Result Value Responses” on page 38
Testing Guidelines
PayPal provides test card numbers. Other numbers produce an error.
Expiration Date must be a valid date in the future (use the mm/yy format).
Use PayPal Manager to view the credit card processor that you have selected for testing.
Credit Card Numbers Used for Testing
Use the following card numbers for testing. Any other card number produces a general failure.
TABLE 3.1Test credit card numbers
American Express378282246310005
American Express371449635398431
American Express Corporate378734493671000
Diners Club30569309025904
Diners Club38520000023237
Discover6011111111111117
Discover6011000990139424
JCB3530111333300000
JCB3566002020360505
MasterCard555555 5555554444
MasterCard510510 5105105100
Visa4111111111111111
Payflow Pro Recurring Billing Service User’s GuideDecember 201237
Testing Recurring Billing
3
Testing Result Value Responses
ABLE 3.1Test credit card numbers
T
Visa4012888888881881
Visa4222222222222
Testing Result Value Responses
You can use the amount of the transaction to generate a particular result value. This table lists
the general guidelines for specifying amounts.
T
ABLE 3.2Results generated by the amount submitted
AmountRESULT (RESPMSG)
NOTE: Even thoug h this number has a different character count
than the other test numbers, it is the correct and functional
number.
$0 – $1000
$1001 – $2000Certain amounts in this range will return specific PayPal results, and can be
$2001+
RESULT value 0 (Approved)
generated by adding $1000 to that RESULT value. For example, for RESULT
value 13 (Referral), submit the amount 1013.
If the amount is in this range but does not correspond to a PayPal result
supported by this testing mechanism, RESULT value 12 (Declined) is returned.
RESULT value 12 (Declined)
38December 2012Payflow Pro Recurring Billing Service User’s Guide
Obtaining Consent to Bill
A
Customers Using Recurring
Billing
You must obtain each customer’s consent to bill them on an automated schedule.
Here is the relevant section from PayPal’s Merchant Services Agreement:
Merchant shall be solely responsible for:
Obtaining all necessary approvals required from each customer authorizing Merchant to
bill such customer’s credit card account. Merchant hereby represents and warrants that
Merchant has the authorization to bill its customers’ credit card accounts in the manner, for
the amounts and for the period of time indicated by Merchant at the time Merchant enrolls
with PayPal.
Complying with all applicable bank and credit card rules with respect to recurring billing of
consumers’ credit cards. Merchant hereby represents and warrants that Merchant has
complied with all applicable bank and credit card rules in billing its customers’credit card
and in its use of PayPal Merchant Services.
Providing accurate information regarding the credit cards to be billed, the amounts, the
billing cycles, billing period and any other information requested by PayPal that is
necessary to properly process such Transactions.
Payflow Pro Recurring Billing Service User’s GuideDecember 201239
Obtaining Consent to Bill Customers Using Recurring Billing
A
40December 2012Payflow Pro Recurring Billing Service User’s Guide