Developer's Guide

18 August 2012 PayPal Mobile Payments Developer Guide and Reference – iOS Edition
Preapprovals
The PayPal Mobile Payments Library lets you obtain authorization in advance from buyers for
future payments to you without requiring buyers to authorize each payment individually. For
example, you might use the library to establish preapproval agreements for subscriptions to
mobile content, such as mobile streaming audio or video. Or, you might use the library to
establish preapproval agreements for payments to gain access to higher levels of difficulty in
mobile games.
How Preapprovals Work
There are three steps to setting up and using preapprovals.
1. Obtain a pending preapproval key from PayPal.
From your web server, send a
Preapproval request to PayPal with the terms of your
preapproval agreement.
2. Obtain authorization from the buyer for the preapproval agreement.
From your mobile application, call the
preapprovalWithKey method with the pending
preapproval key. The library launches the preapproval checkout experience and returns a
confirmed preapproval key.
3. Take payments from the buyer under the terms of the preapproval agreement.
From your web server, send a
Pay request to PayPal with the buyer’s confirmed
preapproval key.
For more information about the
Preapproval and Pay requests, see the Adaptive Payments
Developer Guide.
About Preapproval Keys
Preapproval keys uniquely identify preapproval your agreements. Preapproval keys that you
obtain by using the
Preapproval API identify your pending preapproval agreements. No buyers
have yet agreed to them. Pending approval keys remain valid for 3 hours before expiring without
confirmation from buyers.
Call the
preapprovalWithKey method to launch the preapproval checkout experience to
confirm a buyer’s agreement to a pending preapproval. If the buyer completes the preapproval
checkout, the library returns a confirmed preapproval key. Maintain a record of buyers and their
confirmed preapproval keys on your web server. Later on your web server, take payments from
buyers by sending Pay requests with buyers’ preapproval keys to PayPal.
About Preapproval Pins
Confirmed preapproval keys let you take payments from buyers without requiring them to log in
to PayPal to authorize payments individually. Depending on your business model, you may want
to obtain consent quickly from buyers before you take individual payments. Preapproval PINs are