Skip to content

Instantly share code, notes, and snippets.

@xcommerce-gists
Last active December 25, 2015 12:21
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xcommerce-gists/3504189 to your computer and use it in GitHub Desktop.
Save xcommerce-gists/3504189 to your computer and use it in GitHub Desktop.
How to Create a PayPal Account Using Adaptive Accounts.curl
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": "sender_per@example.com",
"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": "lr12345@example.com",
"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"
}
@xcommerce-gists
Copy link
Author

Updated example as per comments from the Sandbox team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment