Developer's Guide
Table Of Contents
- Adaptive Payments Developer Guide
- Contents
- What’s New?
- Introducing Adaptive Payments
- Adaptive Payments Actors and Objects
- Simple, Parallel, and Chained Payments
- Payment Approval
- Adaptive Payments Service Permissions
- Explicit Approval Payment Flow
- Preapproved Payments Flow
- Implicit Approval Payments Flow
- Embedded Payments
- Embedded Payment Flow Presentations
- Kinds of Embedded Payments
- Embedded Payments Implementation Basics
- Embedded Payment Experience
- Preapprove Future Payments Checkbox
- Shipping Address Information
- Embedded Payment Experience
- Setting Up Web Pages to Invoke the Embedded Payment Flow Using a Lightbox
- Setting Up Web Pages to Invoke the Embedded Payment Flow Using a Minibrowser
- Displaying and Collecting Shipping Addresses
- Guest Payments
- Fee Payment Configuration
- Getting Started
- Pay API Operation
- PaymentDetails API Operation
- ExecutePayment API Operation
- GetPaymentOptions API Operation
- SetPaymentOptions API Operation
- Preapproval API Operation
- PreapprovalDetails API Operation
- CancelPreapproval API Operation
- ConvertCurrency API Operation
- Refund API Operation
- GetFundingPlans API Operation
- GetShippingAddresses API Operation
- Adaptive Payment Commands and Redirects
- Instant Payment Notifications
- Older Versions of the Adaptive Payments API
- 1.8.0 Features
- 1.7.0 Features
- 1.6.0 Features
- New API Operations for Version 1.6.0
- Changes to PayRequest Fields for Version 1.6.0
- Changes to PayResponse Fields for Version 1.6.0
- Changes to ExecutePaymentRequest Fields for Version 1.6.0
- Changes to GetPaymentOptionsResponse Fields for Version 1.6.0
- Changes to SetPaymentOptionsRequest Fields for Version 1.6.0
- Changes to PreapprovalRequest Fields for Version 1.6.0
- Changes to Address Structure for Version 1.6.0
- Changes to DisplayOptions Structure for Version 1.6.0
- New CurrencyConversion Structure for Version 1.6.0
- New InvoiceData Structure for Version 1.6.0
- New InvoiceItem Structure for Version 1.6.0
- New SenderOptions Structure for Version 1.6.0
- New SenderIdentifier Structure for Version 1.6.0
- New AccountIdentifier Structure for Version 1.6.0
- New ReceiverOptions Structure for Version 1.6.0
- New ReceiverIdentifier Structure for Version 1.6.0
- Additional Error Messages for Version 1.6.0
- 1.5.0 Features
- 1.4.0 Features
- 1.3.0 Features
- 1.2.0 Features
- 1.1.0 Features
- Revision History
- Index
PreapprovalDetails API Operation
PreapprovalDetails Examples Using NVP and CURL
188 August 7, 2012 Adaptive Payments Developer Guide
command is a single line and each request and response is a string without line breaks or extra
whitespace.
Obtaining information about a preapproval
In this example, the caller of the PreapprovalDetails API operation specifies a
preapproval key. The result shows whether or not the status has been approved, which in this
case is false because the person making the approval has not completed the process on
PayPal.
NOTE: The sample code below uses the insecure setting to work around the certificate for
testing in a sandbox environment. For actual implementations, you must specify the
location of the certificate.
Request:
curl -s --insecure
-H "X-PAYPAL-SECURITY-USERID: api_username"
-H "X-PAYPAL-SECURITY-PASSWORD: api_password"
-H "X-PAYPAL-SECURITY-SIGNATURE: api_signature"
-H "X-PAYPAL-REQUEST-DATA-FORMAT: NV"
-H "X-PAYPAL-RESPONSE-DATA-FORMAT: NV"
-H "X-PAYPAL-APPLICATION-ID: app_id"
https://svcs.sandbox.paypal.com/AdaptivePayments/PreapprovalDetails -d
"preapprovalKey=PA-9JR04288NR0519129
&requestEnvelope.errorLanguage=en_US "
Response:
responseEnvelope.timestamp=2009-07-13T13%3A50%3A40.496-07%3A00
&responseEnvelope.ack=Success
&responseEnvelope.correlationId=16dbc35f1aea7
&responseEnvelope.build=DEV
&approved=false
&cancelUrl=your_cancel_url
&curPayments=0
&curPaymentsAmount=0.00
&curPeriodAttempts=0
¤cyCode=USD
&dateOfMonth=0
&dayOfWeek=NO_DAY_SPECIFIED
&endingDate=2009-12-13T13%3A40%3A37.0-08%3A00&maxAmountPerPayment=200.00
&maxNumberOfPayments=30
&maxTotalAmountOfAllPayments=1500.00
&paymentPeriod=NO_PERIOD_SPECIFIED
&pinType=NOT_REQUIRED
&returnUrl=your_cancel_url
&startingDate=2009-07-13T13%3A40%3A37.0-07%3A00
&status=ACTIVE