PayPal Payments Advanced Authentication
Last updated: Aug 15th, 7:30am
PayPal Payments Advanced requires you to authenticate in the cart admin panel using a secure token. This secure token is good for one transaction and is valid for 30 minutes. The token and its token ID are used by the server to retrieve and display the transaction data for customer approval.
To set up and retrieve secure tokens, complete the following steps:
- Add a user to your account
- Set up secure token use
- Obtain a secure token
Add a user
Merchants should create and add a user account for transactions; otherwise, if the password for the merchant login changes, the API calls will fail.
To add a user to the account:
- Use the merchant login and password of your PayPal Payments Advanced account to log into PayPal Manager.
- Click Account Adiminstration.
- Under Manage Users, click Add User.
- Fill in the fields under Admin Configuration, User Information, and User Login Information.
-
Under Assign Privilege to User and in the Select a Predefined Role field,
select
FULL_TRANSACTIONSand leave User Status as Active. - Click the Update button.
Set up secure token use
To set up your PayPal Payments Advanced account to use secure tokens:
- Log into PayPal Manager with the user created above or other predefined user.
- Navigate to the Hosted Checkout Pages section. The link is located in the Services Summary on the lower right.
-
Click Set Up and enter the following values (this is the
minimum setup required to get a token in the sandbox environment):
- PayPal Sandbox email address
- Return URL and specify the method as POST
- Toggle the Enable Secure Token in Security Options to "Yes".
- Click Save Changes.
Obtain a secure token
To get a secure token, you need to pass a few pieces of information in an API call. The following table contains parameters for a test call to obtain a secure token:
| Name | Description |
|---|---|
PARTNER |
The Payflow partner. The example below uses PayPal since PayPal Payments Advanced includes a PayPal merchant account. |
VENDOR |
The Merchant Login ID that you use to log into PayPal Manager. |
USER |
The name of the user whom you added to your account using PayPal Manager, above. |
PWD |
The password of the user whom you added to your account using PayPal Manager, above. |
TRXTYPE |
The type of the transaction, e.g. S for sale. |
AMT |
The amount of the sale. |
CREATESECURETOKEN |
Specify a value of Y to request a secure token for
completing the transaction.
|
SECURETOKENID |
An ID that you create for the token that will be returned from the
Payflow pilot endpoint (https://pilot-payflowpro.paypal.com). Use a unique alphanumeric value, up to 36 characters long. For
example, you could specify
SECURETOKENID=9a9ea8208de1413abc3d60c86cb1f4c5.
|
For demonstration purposes, the following example uses cURL to obtain a secure token used in a subsequent test call.
See the parameter descriptions in the table above for the values to
substitute in the following example for PARTNER,
VENDOR, USER, and PWD.
curl https://pilot-payflowpro.paypal.com \ -s \ --insecure \ -d PARTNER=PayPal \ -d VENDOR=MyMerchantID \ -d USER=UserID \ -d PWD=UserPassword \ -d TRXTYPE=S \ -d AMT=40 \ -d CREATESECURETOKEN=Y \ -d SECURETOKENID=12528208de1413abc3d60c86cb15
The response should be similar to this example. The response contains
RESULT=0 for success, a SECURETOKEN (for use in a
subsequent transaction call), a SECURETOKENID (which you provided
in the request to identify the received token), and a
RESPMSG value of Approved.
1RESULT=0&2SECURETOKEN=123456NYslUGMy0tlKafELwct&3SECURETOKENID=12528208de1413abc3d60c86cb15&4RESPMSG=Approved
Use secure tokens
When your configuration is complete, you will pass your token and the token ID in the cart administration panel.
Next
Configure a template using one of these options: