
Preapproval API Operation
Preapproval Examples Using NVP and CURL
174 August 7, 2012 Adaptive Payments Developer Guide
Preapproval Examples Using NVP and CURL
These examples all use NVP for the data binding and CURL to deliver the HTTP request to
the PayPal sandbox endpoint. Line breaks are provided for ease of reading; each CURL
command is a single line and each request and response is a string without line breaks or extra
whitespace.
Setting up a preapproval
In this example, the caller of the Preapproval API sets up a preapproval that is valid from
July 17, 2009 through December 12, 2009. The maximum amount of the preapproval is
$1,500, of which a maximum of 30 payments are authorized with the largest payment not to
exceed $200. The sender need not include a PIN. The response contains the preapproval key
that the caller can use in the Pay API operation.
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:
correlationId xs:string
Correlation identifier. It is a 13-character, alphanumeric string (for example,
db87c705a910e) that is used only by PayPal Merchant Technical Support.
NOTE: You must log and store this data for every response you receive.
PayPal Technical Support uses the information to assist with reported
issues.
timestamp xs:datetime
Date on which the response was sent, for example:
2012-04-02T22:33:35.774-07:00
NOTE: You must log and store this data for every response you receive.
PayPal Technical Support uses the information to assist with reported
issues.
Field Description
Kommentare zu diesen Handbüchern