Last active
December 25, 2015 12:21
-
-
Save xcommerce-gists/3504189 to your computer and use it in GitHub Desktop.
How to Create a PayPal Account Using Adaptive Accounts.curl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTTP Headers | |
------------ | |
-H "X-PAYPAL-SECURITY-USERID: <Caller-UID>" # UserID from the Caller account | |
-H "X-PAYPAL-SECURITY-PASSWORD: <Caller-Pswd>" # Password from the Caller account | |
-H "X-PAYPAL-SECURITY-SIGNATURE: <Caller-Sig>" # Signature from the Caller account | |
-H "X-PAYPAL-REQUEST-DATA-FORMAT: JSON" | |
-H "X-PAYPAL-RESPONSE-DATA-FORMAT: JSON" | |
-H "X-PAYPAL-SANDBOX-EMAIL-ADDRESS: <Caller-Sandbox-edress>" | |
-H "X-PAYPAL-DEVICE-IPADDRESS: 192.0.2.0" | |
-H "X-PAYPAL-APPLICATION-ID: APP-80W284485P519543T" # Standard Sandbox App ID | |
Endpoint | |
-------- | |
https://svcs.sandbox.paypal.com/AdaptiveAccounts/CreateAccount | |
Input Parameters | |
---------------- | |
-d "{ | |
"sandboxEmailAddress": "[email protected]", | |
"accountType": "PERSONAL", | |
"name": { | |
"firstName": "Lenny", | |
"lastName": "Riceman" | |
}, | |
"address": { | |
"line1": "123 Main St.", | |
"city": "Austin", | |
"state": "TX", | |
"postalCode": "78759", | |
"countryCode": "US" | |
}, | |
"citizenshipCountryCode": "US", | |
"contactPhoneNumber": "512-555-5555", | |
"dateOfBirth": "1968-01-01Z", | |
"currencyCode": "USD", | |
"emailAddress": "[email protected]", | |
"preferredLanguageCode": "en_US", | |
"registrationType": "Web", | |
"requestEnvelope": { | |
"errorLanguage": "en_US" | |
} | |
}" | |
Response | |
-------- | |
{ | |
"responseEnvelope": { | |
"timestamp": "2014-09-23T12:35:07.442-07:00", | |
"ack": "Success", | |
"correlationId": "73e9513e3812c", | |
"build": "12670835" | |
}, | |
"createAccountKey": "AA-9GG80569J45735316", | |
"execStatus": "COMPLETED", | |
"redirectURL": "https://www.sandbox.paypal.com/us/cgi-bin/webscr?cmd=_hostedua-flow&encrypted_second_auth_code=<Code>&encrypted_id=<Id>", | |
"accountId": "RCAHW8QAUHZAW" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated example as per comments from the Sandbox team.