PayPal SOAP API Developer - 2013 Reference guide

Category
Software
Type
Reference guide
SOAP API Developer
Reference
Last updated: February 01, 2013
SOAP API Developer Reference
Document Number: 100002.en_US-201302
© 2013 PayPal, Inc. All rights reserved. PayPal is a registered trademark of PayPal, Inc. The PayPal logo is a trademark of PayPal, Inc. Other
trademarks and brands are the property of their respective owners.
The information in this document belongs to PayPal, Inc. It may not be used, reproduced or disclosed without the written approval of PayPal, Inc.
Copyright © PayPal. All rights reserved. PayPal S.à r.l. et Cie, S.C.A., Société en Commandite par Actions. Registered office: 22-24 Boulevard Royal, L-
2449, Luxembourg, R.C.S. Luxembourg B 118 349
Consumer advisory: The PayPal™ payment service is regarded as a stored value facility under Singapore law. As such, it does not require the approval
of the Monetary Authority of Singapore. You are advised to read the terms and conditions carefully.
Notice of non-liability:
PayPal, Inc. is providing the information in this document to you “AS-IS” with all faults. PayPal, Inc. makes no warranties of any kind (whether express,
implied or statutory) with respect to the information contained 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 from 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.ear
SOAP API Developer Reference February 01, 2013 3
Contents
What’s New . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11
What’s New . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13
About This Guide. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Intended Audience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Where to Go for More Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Documentation Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Chapter 1 PayPal SOAP API Basics . . . . . . . . . . . . . . . . . .15
PayPal WSDL/XSD Schema Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
PayPal SOAP API Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
SOAP RequesterCredentials: Username, Password, Signature, and Subject. . . . . . . . 17
SOAP Service Endpoints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
SOAP Request Envelope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Request Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
SOAP Message Style: doc-literal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Response Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Error Responses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
CorrelationID for Reporting Problems to PayPal. . . . . . . . . . . . . . . . . . . . . . . 24
UTF-8 Character Encoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Date/Time Formats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Core Currency Amount Data Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Chapter 2 AddressVerify API Operation . . . . . . . . . . . . . . . .27
AddressVerify Request Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
AddressVerifyRequest Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
AddressVerify Response Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
AddressVerify Response Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Contents
4 February 01, 2013 SOAP API Developer Reference
Chapter 3 Authorization and Capture API Operation Reference . . . .31
DoCapture API Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
DoCapture Request Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
DoCapture Response Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
DoAuthorization API Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
DoAuthorization Request Message . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
DoAuthorization Response Message . . . . . . . . . . . . . . . . . . . . . . . . . . 41
DoReauthorization API Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
DoReauthorization Request Message. . . . . . . . . . . . . . . . . . . . . . . . . . 44
DoReauthorization Response Message . . . . . . . . . . . . . . . . . . . . . . . . . 45
DoVoid API Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
DoVoid Request Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
DoVoid Response Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Chapter 4 DoDirectPayment API Operation . . . . . . . . . . . . . .51
DoDirectPayment Request Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
DoDirectPayment Request Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
CreditCardDetailsType Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
PayerInfoType Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
PayerNameType Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
AddressType Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
PaymentDetailsType Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
PaymentDetailsItemType Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
EbayItemPaymentDetailsItemType Fields. . . . . . . . . . . . . . . . . . . . . . . . 65
AddressType (Shipping) Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
ThreeDSecureRequest Fields (U.K. Merchants Only). . . . . . . . . . . . . . . . . . 66
DoDirectPayment Response Message . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
DoDirectPayment Response Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
FMFDetailsType Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
RiskFilterListType Fields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
ThreeDSecure Response Fields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Chapter 5 DoNonReferencedCredit API Operation . . . . . . . . . . .71
DoNonReferencedCredit Request Message. . . . . . . . . . . . . . . . . . . . . . . . . 71
DoNonReferencedCredit Request Fields . . . . . . . . . . . . . . . . . . . . . . . . 73
CreditCardDetailsType Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
PayerNameType Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
PayerInfoType Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
SOAP API Developer Reference February 01, 2013 5
Contents
AddressType Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
DoNonReferencedCredit Response Message. . . . . . . . . . . . . . . . . . . . . . . . 78
DoNonReferencedCredit Response Fields . . . . . . . . . . . . . . . . . . . . . . . 78
Chapter 6 ExpressCheckout API Operations . . . . . . . . . . . . . .79
SetExpressCheckout API Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
SetExpressCheckout Request Message . . . . . . . . . . . . . . . . . . . . . . . . 79
SetExpressCheckout Response Message. . . . . . . . . . . . . . . . . . . . . . . .105
GetExpressCheckoutDetails API Operation . . . . . . . . . . . . . . . . . . . . . . . . .105
GetExpressCheckoutDetails Request Message. . . . . . . . . . . . . . . . . . . . .106
GetExpressCheckoutDetails Response Message. . . . . . . . . . . . . . . . . . . .107
DoExpressCheckoutPayment API Operation . . . . . . . . . . . . . . . . . . . . . . . .126
DoExpressCheckoutPayment Request Message . . . . . . . . . . . . . . . . . . . .127
DoExpressCheckoutPayment Response Message . . . . . . . . . . . . . . . . . . .140
Chapter 7 GetBalance API Operation. . . . . . . . . . . . . . . . . 153
GetBalance Request Message. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .153
GetBalance Request Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .153
GetBalance Response Message. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .154
GetBalance Response Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .154
Chapter 8 GetPalDetails API Operation . . . . . . . . . . . . . . . 155
GetPalDetails Request Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .155
GetPalDetails Response Message. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .156
GetPalDetails Response Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . .156
Chapter 9 GetTransactionDetails API Operation . . . . . . . . . . . 159
GetTransactionDetails Request Message . . . . . . . . . . . . . . . . . . . . . . . . . .159
GetTransactionDetails Request Fields. . . . . . . . . . . . . . . . . . . . . . . . . .159
GetTransactionDetails Response Message . . . . . . . . . . . . . . . . . . . . . . . . .160
GetTransactionDetails Response Fields. . . . . . . . . . . . . . . . . . . . . . . . .166
PaymentTransactionDetailsType Fields . . . . . . . . . . . . . . . . . . . . . . . . .168
ReceiverInfoType Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .169
PayerInfoType Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .169
PayerName Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .170
AddressType Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .171
PaymentInfoType Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .172
Contents
6 February 01, 2013 SOAP API Developer Reference
PaymentItemInfoType Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176
PaymentItemType Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .177
AuctionInfoType Fields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .178
SubscriptionInfoType Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .178
SubscriptionTermsType Fields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .179
Chapter 10 ManagePendingTransactionStatus API Operation. . . . . 181
ManagePendingTransactionStatus Request Message. . . . . . . . . . . . . . . . . . . .181
ManagePendingTransactionStatus Request Fields . . . . . . . . . . . . . . . . . . .181
ManagePendingTransactionStatus Response Message. . . . . . . . . . . . . . . . . . .182
ManagePendingTransactionStatus Response Fields . . . . . . . . . . . . . . . . . .182
Chapter 11 MassPay API Operation . . . . . . . . . . . . . . . . . . 183
MassPay Request Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183
MassPay Request Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183
MassPay Response Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .184
MassPay Response Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .184
Chapter 12 Recurring Payments and Reference Transactions API
Operations185
CreateRecurringPaymentsProfile API Operation . . . . . . . . . . . . . . . . . . . . . .185
CreateRecurringPaymentsProfile Request Message . . . . . . . . . . . . . . . . . .185
CreateRecurringPaymentsProfile Response Message . . . . . . . . . . . . . . . . .201
GetRecurringPaymentsProfileDetails API Operation . . . . . . . . . . . . . . . . . . . .202
GetRecurringPaymentsProfileDetails Request Message . . . . . . . . . . . . . . . .202
GetRecurringPaymentsProfileDetails Response Message . . . . . . . . . . . . . . .203
ManageRecurringPaymentsProfileStatus API Operation . . . . . . . . . . . . . . . . . .214
ManageRecurringPaymentsProfileStatus Request Message . . . . . . . . . . . . . .215
ManageRecurringPaymentsProfileStatus Response Message . . . . . . . . . . . . .216
BillOutstandingAmount API Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . .216
BillOutstandingAmount Request Message . . . . . . . . . . . . . . . . . . . . . . .217
BillOutstandingAmount Response Message. . . . . . . . . . . . . . . . . . . . . . .218
UpdateRecurringPaymentsProfile API Operation . . . . . . . . . . . . . . . . . . . . . .218
UpdateRecurringPaymentsProfile Request Message . . . . . . . . . . . . . . . . . .219
UpdateRecurringPaymentsProfile Response Message . . . . . . . . . . . . . . . . .230
SetCustomerBillingAgreement API Operation . . . . . . . . . . . . . . . . . . . . . . . .230
SetCustomerBillingAgreement Request Message. . . . . . . . . . . . . . . . . . . .231
SetCustomerBillingAgreement Response Message. . . . . . . . . . . . . . . . . . .235
SOAP API Developer Reference February 01, 2013 7
Contents
CreateBillingAgreement API Operation . . . . . . . . . . . . . . . . . . . . . . . . . . .236
CreateBillingAgreement Request Message . . . . . . . . . . . . . . . . . . . . . . .236
CreateBillingAgreement API Response Message . . . . . . . . . . . . . . . . . . . .237
GetBillingAgreementCustomerDetails API Operation . . . . . . . . . . . . . . . . . . . .238
GetBillingAgreementCustomerDetails Request Message . . . . . . . . . . . . . . . .238
GetBillingAgreementCustomerDetails Response Message . . . . . . . . . . . . . . .239
BAUpdate API Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .243
BAUpdate Request Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .243
BAUpdate Response Message . . . . . . . . . . . . . . . . . . . . . . . . . . . . .244
DoReferenceTransaction API Operation. . . . . . . . . . . . . . . . . . . . . . . . . . .249
DoReferenceTransaction Request Message . . . . . . . . . . . . . . . . . . . . . .249
DoReferenceTransaction Response Message . . . . . . . . . . . . . . . . . . . . .263
Chapter 13 RefundTransaction API Operation. . . . . . . . . . . . . 273
RefundTransaction Request Message. . . . . . . . . . . . . . . . . . . . . . . . . . . .273
RefundTransaction Request Fields . . . . . . . . . . . . . . . . . . . . . . . . . . .274
MerchantStoreDetailsTypeFields . . . . . . . . . . . . . . . . . . . . . . . . . . . .276
RefundTransaction Response Message . . . . . . . . . . . . . . . . . . . . . . . . . . .277
RefundTransaction Response Fields . . . . . . . . . . . . . . . . . . . . . . . . . .277
RefundInfoType Fields. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .279
Chapter 14 TransactionSearch API Operation . . . . . . . . . . . . . 281
TransactionSearch Request Message . . . . . . . . . . . . . . . . . . . . . . . . . . . .281
TransactionSearch Request Fields . . . . . . . . . . . . . . . . . . . . . . . . . . .282
PayerName Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .284
TransactionSearch Response Message . . . . . . . . . . . . . . . . . . . . . . . . . . .285
TransactionSearch Response Fields . . . . . . . . . . . . . . . . . . . . . . . . . .285
Appendix A API Error Codes . . . . . . . . . . . . . . . . . . . . . . 287
General API Errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .287
Validation Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .288
DirectPayment API Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .291
SetExpressCheckout API Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .303
GetExpressCheckoutDetails API Errors . . . . . . . . . . . . . . . . . . . . . . . . . . .317
DoExpressCheckoutPayment API Errors . . . . . . . . . . . . . . . . . . . . . . . . . .318
Authorization and Capture API Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . .328
GetTransactionDetails API Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .332
Contents
8 February 01, 2013 SOAP API Developer Reference
TransactionSearch API Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .333
RefundTransaction API Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .334
MassPay API Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .338
Recurring Payments Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .341
SetCustomerBillingAgreement Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . .348
GetBillingAgreementCustomerDetails Errors . . . . . . . . . . . . . . . . . . . . . . . .350
CreateBillingAgreement Errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .351
UpdateBillingAgreement Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .351
DoReferenceTransaction Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .353
AddressVerify API Errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .362
ManagePendingTransactionStatus API Errors. . . . . . . . . . . . . . . . . . . . . . . .362
Appendix B Countries and Regions Supported by PayPal . . . . . . 365
Appendix C State and Province Codes . . . . . . . . . . . . . . . . . 373
Appendix D Currency Codes . . . . . . . . . . . . . . . . . . . . . . 377
Appendix E AVS and CVV2 Response Codes . . . . . . . . . . . . . 381
AVS Response Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .381
AVS Response Codes for Visa, MasterCard, Discover, and American Express . . . .381
AVS Response Codes for Maestro . . . . . . . . . . . . . . . . . . . . . . . . . . .382
CVV2 Response Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .383
CVV2 Response Codes for Visa, MasterCard, Discover, and American Express. . . .383
CVV2 Response Codes for Maestro. . . . . . . . . . . . . . . . . . . . . . . . . . .383
Appendix About Previous Versions of the API. . . . . . . . . . . . 385
What’s New in Version 95.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .385
What’s New in Version 93.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .385
What’s New in Version 92.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .385
What’s New in Version 91.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .385
What’s New in Version 89.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .385
What’s New in Version 88.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .386
What’s New in Version 85.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .386
What’s New in Version 84.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .386
New Field in RefundTransaction Response . . . . . . . . . . . . . . . . . . . . . . .386
SOAP API Developer Reference February 01, 2013 9
Contents
New RefundInfoType in RefundTransaction Response . . . . . . . . . . . . . . . . .386
New Field in DoReferenceTransactionResponseDetailsType . . . . . . . . . . . . .387
New Field in DoDirectPaymentResponse . . . . . . . . . . . . . . . . . . . . . . . .387
What’s New in Version 82.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .387
New Field in DoCapture Request . . . . . . . . . . . . . . . . . . . . . . . . . . . .387
New MerchantStoreDetailsType in DoCapture Request. . . . . . . . . . . . . . . . .388
New Fields in RefundTransaction Request . . . . . . . . . . . . . . . . . . . . . . .388
New MerchantStoreDetailsType in RefundTransaction Request . . . . . . . . . . . .389
What’s New in Version 80.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .389
New Field in PaymentDetailsType in DoDirectPayment Request . . . . . . . . . . . .389
New Fields in PaymentDetailsType in DoReferenceTransaction Request . . . . . . .390
What’s New in Version 74.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .390
New Behavior of DoExpressCheckoutPayment . . . . . . . . . . . . . . . . . . . . .390
New DoExpressCheckoutPayment Error Code . . . . . . . . . . . . . . . . . . . . .390
What’s New in Version 72.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .391
Changes to BuyerDetailsType in SetExpressCheckout Request . . . . . . . . . . . .391
New TaxIdDetailsType Structure in SetExpressCheckout Request . . . . . . . . . . .391
New TaxIdDetailsType Structure in GetExpressCheckoutDetails Response . . . . . .391
What’s New in Version 69 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .392
New PaymentDetailsItemType Structure in CreateRecurringPaymentsProfile Request 392
Changes to PaymentDetailsItemType in DoReferenceTransaction Request . . . . . .393
What’s New in Version 66 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .394
Changes to PaymentDetailsType in SetExpressCheckout and
DoExpressCheckoutPayment Requests. . . . . . . . . . . . . . . . . . . . . . . . .394
Changes to PaymentDetailsItemTypein SetExpressCheckout and
DoExpressCheckoutPayment Requests . . . . . . . . . . . . . . . . . . . . . . . .395
Changes to PaymentDetailsItemType in GetExpressCheckoutDetails Response . . .396
Appendix Revision History. . . . . . . . . . . . . . . . . . . . . . 397
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
Contents
10 February 01, 2013 SOAP API Developer Reference
SOAP API Developer Reference February 01, 2013 11
What’s New
What’s New
Maintenance release. See the latest version of the PayPal Merchant API Release Notes for
more information:
https://www.x.com/developers/paypal/documentation-tools/release-
notes#MerchantAPI
What’s New
12 February 01, 2013 SOAP API Developer Reference
SOAP API Developer Reference February 01, 2013 13
Preface
About This Guide
The SOAP API Developer Reference describes the PayPal SOAP API.
Intended Audience
This guide is written for developers who are implementing solutions using the SOAP API. It is
written for developers who are implementing solutions using the SOAP API.
Where to Go for More Information
Express Checkout Integration Guide
Express Checkout Advanced Features Guide
Merchant Setup and Administration Guide
Documentation Feedback
Help us improve this guide by sending feedback to:
documentationfeedback@paypal.com
Documentation Feedback
14 February 01, 2013 SOAP API Developer Reference
SOAP API Developer Reference February 01, 2013 15
1
PayPal SOAP API Basics
The PayPal SOAP API is based on open standards known collectively as web services, which
include the Simple Object Access Protocol (SOAP), Web Services Definition Language
(WSDL), and the XML Schema Definition language (XSD). A wide range of development
tools on a variety of platforms support web services.
Like many web services, PayPal SOAP is a combination of client-side and server-side
schemas, hardware and software servers, and core services.
PayPal SOAP High-level Diagram
In an object-oriented processing model, the interface to SOAP requests/responses is an object
in your application’s native programming language. Your third-party SOAP client generates
business-object interfaces and network stubs from PayPal-provided WSDL and XSD files that
specify the PayPal SOAP message structure, its contents, and the PayPal API service bindings.
A business application works with data in the form of object properties to send and receive
data by calling object methods. The SOAP client handles the details of building the SOAP
request, sending it to the PayPal service, and converting the response back to an object.
PayPal SOAP API Basics
PayPal WSDL/XSD Schema Definitions
1
16 February 01, 2013 SOAP API Developer Reference
PayPal WSDL/XSD Schema Definitions
The PayPal Web Services schema and its underlying eBay Business Language (eBL) base and
core components are required for developing applications with the PayPal Web Services API.
The following are the locations of the WSDL and XSD files.
Location of PayPal WSDL and XSD Files
PayPal SOAP API Definitions
The PayPal SOAP API comprises individual API definitions for specific business functions.
As a foundation, the API relies on eBay Business Language (eBL) base and core components.
The core eBL structures AbstractRequestType and AbstractResponseType are the
basis of the SOAP request and response of each PayPal API. AbstractResponseType is
also the framework for error messages common across all PayPal APIs.
PayPal has made some schema design decisions that can affect how businesses design their
own applications.
Enumerations: Enumerations are defined directly in the PayPal API schema.
Troubleshooting information: The PayPal API returns information about elements that
trigger errors.
Backward compatibility: The PayPal API is versioned so that business applications are
backward compatible when new elements are introduced to the server-side schema.
NOTE: eBL defines many structures that are specific to processing auctions. PayPal’s SOAP
schema includes these definitions to maintain compatibility with eBay’s SOAP and
for possible future joint use of SOAP across both eBay and PayPal. The material
focuses only on those SOAP definitions pertinent to use of the PayPal SOAP API.
Development and Test with the PayPal Sandbox API Service
PayPal Schema https://www.sandbox.paypal.com/wsdl/PayPalSvc.wsdl
eBL Base Components and
Component Types
https://www.sandbox.paypal.com/wsdl/eBLBaseComponents.xsd
https://www.sandbox.paypal.com/wsdl/CoreComponentTypes.xsd
Production with Live PayPal Web Services API Service
PayPal Schema https://www.paypal.com/wsdl/PayPalSvc.wsdl
eBL Base Components and
Component Types
http://www.paypal.com/wsdl/eBLBaseComponents.xsd
http://www.paypal.com/wsdl/CoreComponentTypes.xsd
SOAP API Developer Reference February 01, 2013 17
PayPal SOAP API Basics
Security
1
Security
The PayPal SOAP API service is protected to ensure that only authorized PayPal members use
it. There are four levels of security:
1. A required API username (Username field) and API password (Password field).
2. A third required authentication mechanism, which is either one of the following:
Client-side request signing using a PayPal-issued API Certificate
Request authentication using an API Signature included in the request (Signature
field)
3. An optional third-party authorization to make the API call on some other account’s behalf
(the optional Subject field).
4. Secure Sockets Layer (SSL) data transport.
A failure of authenticated security at any one of these levels denies access to the PayPal SOAP
API service.
SOAP RequesterCredentials: Username, Password, Signature,
and Subject
For the security of your business, PayPal must verify that merchants or third-party developers
are permitted to initiate a transaction before they make one. PayPal authenticates each request.
If the request cannot be authenticated, a SOAP security fault is returned.
In the SOAP request header, your SOAP client must set the Username, Password elements
to pass an API username/password combination. In addition, you can set the Signature or
Subject elements to specify your API signature string and an optional third-party account
email address for authentication.
The following example shows part of the RequesterCredentials elements. These
elements are required for all SOAP requests.
<SOAP-ENV:Header>
<RequesterCredentials xmlns=”urn:ebay:api:PayPalAPI”
xsi:type=”ebl:CustomSecurityHeaderType”>
<Credentials xmlns=”urn:ebay:apis:eBLBaseComponents”
xsi:type=”ebl:UserIdPasswordType”>
<Username>api_username</Username>
<Password>api_password</Password>
<Signature>api_signature</Signature>
<Subject>authorizing_account_emailaddress</Subject>
</Credentials>
</RequesterCredentials>
</SOAP-ENV:Header>
PayPal SOAP API Basics
SOAP Service Endpoints
1
18 February 01, 2013 SOAP API Developer Reference
RequesterCredentials Authentication Elements in SOAP Header
Related information:
Request Structure
SOAP Service Endpoints
Depending on your chosen authentication mechanism, your SOAP requests must be processed
by different service endpoints.
SOAP Service Endpoints
SOAP Request Envelope
The following diagram illustrates the contents of a PayPal SOAP request envelope.
All PayPal APIs are based on two core structures: AbstractRequestType and
AbstractResponseType.
Element Value Description
<Username> api_username Your API username, which is auto-generated by PayPal when you
apply for a digital certificate to use the PayPal SOAP API. You can
see this value on
https://www.paypal.com/ in your Profile under
API Access > API Certificate Information.
<Password> api_password Your API password, which you specify when you apply for a digital
certificate to use the PayPal SOAP API.
<Signature> api_signature Your API signature, if you use one instead of an API Certificate.
<Subject> authorizing_
account_
emailaddress
The email address of a third-party for whom you are sending
requests to the PayPal SOAP API. Your API username must have
been granted permission by this third-party to make any particular
PayPal API request.
Authentication
Mechanism
Live Production Endpoint Test (Sandbox) Endpoint
API Signature https://api-3t.paypal.com/2.0/ https://api-3t.sandbox.paypal.com/2.0/
API Certificate https://api.paypal.com/2.0/ https://api.sandbox.paypal.com/2.0/
SOAP API Developer Reference February 01, 2013 19
PayPal SOAP API Basics
Request Structure
1
Diagram of SOAP Request Envelope
Request Structure
The following annotated description of the SOAP request structure shows the elements
required by the PayPal SOAP API.
General Structure of PayPal API SOAP Request
<?xml version=”1.0” encoding=”UTF-8”?>
<SOAP-ENV:Envelope xmlns:xsi= ” http://www.w3.org/2001/XMLSchema-instance”
xmlns:SOAP-ENC=”http://schemas.xmlsoap.org/soap/encoding/”
xmlns:SOAP-ENV=”http://schemas.xmlsoap.org/soap/envelope/”
xmlns:xsd=”http://www.w3.org/2001/XMLSchema”
SOAP-ENV:encodingStyle=”http://schemas.xmlsoap.org/soap/encoding/”
><SOAP-ENV:Header>
<RequesterCredentials xmlns=”urn:ebay:api:PayPalAPI”>
<Credentials xmlns=”urn:ebay:apis:eBLBaseComponents”>
<Username>api_username</Username>
PayPal SOAP API Basics
Request Structure
1
20 February 01, 2013 SOAP API Developer Reference
<Password>api_password</Password>
<Signature/>
<Subject/>
</Credentials>
</RequesterCredentials>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<specific_api_name_Req xmlns=”urn:ebay:api:PayPalAPI”>
<specific_api_name_Request>
<Version xmlns=urn:ebay:apis:eBLBaseComponents”>service_version
</Version>
<required_or_optional_fields xsi:type=”some_type_here”>data
</required_or_optional_fields>
</specific_api_name_Request>
</specific_api_name_Req>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Annotation of Generic SOAP Request
Related information:
SOAP RequesterCredentials: Username, Password, Signature, and Subject
Lines Comment
12, 13 The <Username> and <Password> fields are part of the PayPal SOAP API
<RequesterCredentials> security authentication mechanism you must construct for
every SOAP request header.
14 The <Signature> element should include your API signature string if that is the kind of API
credential you are using.
15 The <Subject> element can specify a third-party PayPal account by whom you are
authorized to make this request.
19 through 27 The SOAP request for every PayPal API follows this element-naming pattern. The API’s
specific name is appended with Req, and in this element the specific_api_name_Request is
nested. Each specific_api_name_Request has a corresponding
specific_api_name_RequestType.
22 The number of the PayPal SOAP API version is required on each SOAP request.
This version number is the value of ns:version in
https://www.paypal.com/wsdl/PayPalSvc.wsdl.
24 For details about required and optional elements and values for specific requests, see the
description of individual APIs.
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27
  • Page 28 28
  • Page 29 29
  • Page 30 30
  • Page 31 31
  • Page 32 32
  • Page 33 33
  • Page 34 34
  • Page 35 35
  • Page 36 36
  • Page 37 37
  • Page 38 38
  • Page 39 39
  • Page 40 40
  • Page 41 41
  • Page 42 42
  • Page 43 43
  • Page 44 44
  • Page 45 45
  • Page 46 46
  • Page 47 47
  • Page 48 48
  • Page 49 49
  • Page 50 50
  • Page 51 51
  • Page 52 52
  • Page 53 53
  • Page 54 54
  • Page 55 55
  • Page 56 56
  • Page 57 57
  • Page 58 58
  • Page 59 59
  • Page 60 60
  • Page 61 61
  • Page 62 62
  • Page 63 63
  • Page 64 64
  • Page 65 65
  • Page 66 66
  • Page 67 67
  • Page 68 68
  • Page 69 69
  • Page 70 70
  • Page 71 71
  • Page 72 72
  • Page 73 73
  • Page 74 74
  • Page 75 75
  • Page 76 76
  • Page 77 77
  • Page 78 78
  • Page 79 79
  • Page 80 80
  • Page 81 81
  • Page 82 82
  • Page 83 83
  • Page 84 84
  • Page 85 85
  • Page 86 86
  • Page 87 87
  • Page 88 88
  • Page 89 89
  • Page 90 90
  • Page 91 91
  • Page 92 92
  • Page 93 93
  • Page 94 94
  • Page 95 95
  • Page 96 96
  • Page 97 97
  • Page 98 98
  • Page 99 99
  • Page 100 100
  • Page 101 101
  • Page 102 102
  • Page 103 103
  • Page 104 104
  • Page 105 105
  • Page 106 106
  • Page 107 107
  • Page 108 108
  • Page 109 109
  • Page 110 110
  • Page 111 111
  • Page 112 112
  • Page 113 113
  • Page 114 114
  • Page 115 115
  • Page 116 116
  • Page 117 117
  • Page 118 118
  • Page 119 119
  • Page 120 120
  • Page 121 121
  • Page 122 122
  • Page 123 123
  • Page 124 124
  • Page 125 125
  • Page 126 126
  • Page 127 127
  • Page 128 128
  • Page 129 129
  • Page 130 130
  • Page 131 131
  • Page 132 132
  • Page 133 133
  • Page 134 134
  • Page 135 135
  • Page 136 136
  • Page 137 137
  • Page 138 138
  • Page 139 139
  • Page 140 140
  • Page 141 141
  • Page 142 142
  • Page 143 143
  • Page 144 144
  • Page 145 145
  • Page 146 146
  • Page 147 147
  • Page 148 148
  • Page 149 149
  • Page 150 150
  • Page 151 151
  • Page 152 152
  • Page 153 153
  • Page 154 154
  • Page 155 155
  • Page 156 156
  • Page 157 157
  • Page 158 158
  • Page 159 159
  • Page 160 160
  • Page 161 161
  • Page 162 162
  • Page 163 163
  • Page 164 164
  • Page 165 165
  • Page 166 166
  • Page 167 167
  • Page 168 168
  • Page 169 169
  • Page 170 170
  • Page 171 171
  • Page 172 172
  • Page 173 173
  • Page 174 174
  • Page 175 175
  • Page 176 176
  • Page 177 177
  • Page 178 178
  • Page 179 179
  • Page 180 180
  • Page 181 181
  • Page 182 182
  • Page 183 183
  • Page 184 184
  • Page 185 185
  • Page 186 186
  • Page 187 187
  • Page 188 188
  • Page 189 189
  • Page 190 190
  • Page 191 191
  • Page 192 192
  • Page 193 193
  • Page 194 194
  • Page 195 195
  • Page 196 196
  • Page 197 197
  • Page 198 198
  • Page 199 199
  • Page 200 200
  • Page 201 201
  • Page 202 202
  • Page 203 203
  • Page 204 204
  • Page 205 205
  • Page 206 206
  • Page 207 207
  • Page 208 208
  • Page 209 209
  • Page 210 210
  • Page 211 211
  • Page 212 212
  • Page 213 213
  • Page 214 214
  • Page 215 215
  • Page 216 216
  • Page 217 217
  • Page 218 218
  • Page 219 219
  • Page 220 220
  • Page 221 221
  • Page 222 222
  • Page 223 223
  • Page 224 224
  • Page 225 225
  • Page 226 226
  • Page 227 227
  • Page 228 228
  • Page 229 229
  • Page 230 230
  • Page 231 231
  • Page 232 232
  • Page 233 233
  • Page 234 234
  • Page 235 235
  • Page 236 236
  • Page 237 237
  • Page 238 238
  • Page 239 239
  • Page 240 240
  • Page 241 241
  • Page 242 242
  • Page 243 243
  • Page 244 244
  • Page 245 245
  • Page 246 246
  • Page 247 247
  • Page 248 248
  • Page 249 249
  • Page 250 250
  • Page 251 251
  • Page 252 252
  • Page 253 253
  • Page 254 254
  • Page 255 255
  • Page 256 256
  • Page 257 257
  • Page 258 258
  • Page 259 259
  • Page 260 260
  • Page 261 261
  • Page 262 262
  • Page 263 263
  • Page 264 264
  • Page 265 265
  • Page 266 266
  • Page 267 267
  • Page 268 268
  • Page 269 269
  • Page 270 270
  • Page 271 271
  • Page 272 272
  • Page 273 273
  • Page 274 274
  • Page 275 275
  • Page 276 276
  • Page 277 277
  • Page 278 278
  • Page 279 279
  • Page 280 280
  • Page 281 281
  • Page 282 282
  • Page 283 283
  • Page 284 284
  • Page 285 285
  • Page 286 286
  • Page 287 287
  • Page 288 288
  • Page 289 289
  • Page 290 290
  • Page 291 291
  • Page 292 292
  • Page 293 293
  • Page 294 294
  • Page 295 295
  • Page 296 296
  • Page 297 297
  • Page 298 298
  • Page 299 299
  • Page 300 300
  • Page 301 301
  • Page 302 302
  • Page 303 303
  • Page 304 304
  • Page 305 305
  • Page 306 306
  • Page 307 307
  • Page 308 308
  • Page 309 309
  • Page 310 310
  • Page 311 311
  • Page 312 312
  • Page 313 313
  • Page 314 314
  • Page 315 315
  • Page 316 316
  • Page 317 317
  • Page 318 318
  • Page 319 319
  • Page 320 320
  • Page 321 321
  • Page 322 322
  • Page 323 323
  • Page 324 324
  • Page 325 325
  • Page 326 326
  • Page 327 327
  • Page 328 328
  • Page 329 329
  • Page 330 330
  • Page 331 331
  • Page 332 332
  • Page 333 333
  • Page 334 334
  • Page 335 335
  • Page 336 336
  • Page 337 337
  • Page 338 338
  • Page 339 339
  • Page 340 340
  • Page 341 341
  • Page 342 342
  • Page 343 343
  • Page 344 344
  • Page 345 345
  • Page 346 346
  • Page 347 347
  • Page 348 348
  • Page 349 349
  • Page 350 350
  • Page 351 351
  • Page 352 352
  • Page 353 353
  • Page 354 354
  • Page 355 355
  • Page 356 356
  • Page 357 357
  • Page 358 358
  • Page 359 359
  • Page 360 360
  • Page 361 361
  • Page 362 362
  • Page 363 363
  • Page 364 364
  • Page 365 365
  • Page 366 366
  • Page 367 367
  • Page 368 368
  • Page 369 369
  • Page 370 370
  • Page 371 371
  • Page 372 372
  • Page 373 373
  • Page 374 374
  • Page 375 375
  • Page 376 376
  • Page 377 377
  • Page 378 378
  • Page 379 379
  • Page 380 380
  • Page 381 381
  • Page 382 382
  • Page 383 383
  • Page 384 384
  • Page 385 385
  • Page 386 386
  • Page 387 387
  • Page 388 388
  • Page 389 389
  • Page 390 390
  • Page 391 391
  • Page 392 392
  • Page 393 393
  • Page 394 394
  • Page 395 395
  • Page 396 396
  • Page 397 397
  • Page 398 398
  • Page 399 399
  • Page 400 400
  • Page 401 401
  • Page 402 402
  • Page 403 403
  • Page 404 404
  • Page 405 405
  • Page 406 406
  • Page 407 407
  • Page 408 408
  • Page 409 409
  • Page 410 410

PayPal SOAP API Developer - 2013 Reference guide

Category
Software
Type
Reference guide

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI