Create a pre-approval key in order to create a pre-approved PayPal billing agreement. Provided PayPal has been configured as a merchant account via the administrative application, this API can be used to generate a PayPal pre-approval key, which in turn allows passing of a PayPal billing agreement to the signup method. The following steps outline the signup flow: 1) Call the pre-approval API shown below to obtain the PayPal redirect URL and pre-approval key. 2) Using the PayPal redirect URL, redirect the user to PayPal for pre-approval. Once completed, PayPal will redirect back using the confirmation URL specified in the call. 3) Complete the signup process by calling the signup API and passing a PayPal billing agreement with the PayPal pre-approval key obtained above.
URL | https://[host].accumulus.com/json/preapprovals |
---|---|
HTTP Method | POST |
Query String Parameters |
Example
POST https://[host].accumulus.com/json/preapprovals
Request Body
{ "CancellationUrl":"https://test.com/failure", "ConfirmationUrl":"https://test.com/success", "CustomerEmailAddress":"test@test.com", "IpAddress":"100.100.100.100", "Memo":"memo text", }
Response Body
{ "Message":"SUCCESS", "PreApprovalKey":"PA-...", "RedirectURL": "https://www.paypal.com/webscr&cmd=_ap-preapproval&preapprovalkey=PA-..." }