X-Payments:PayPal REST API

From X-Payments Help
Revision as of 17:47, 1 March 2022 by Dohtur (talk | contribs)
Jump to: navigation, search

Stores connected to X-Payments can be configured to use payment processing via PayPal REST API.

PayPal REST API Features

Feature Supported? Description
Sale Check.svg Supports transactions of 'Sale' type (Authorization and capture actions are completed simultaneously at the time of payment processing)
Auth Check.svg Supports transactions of 'Auth' type (An authorization hold is placed on the amount approved by the buyer to ensure the availability of funds for capture)
Capture Check.svg
Partial and multiple transactions supported
Allows capturing the previously authorized amount (The authorized amount is moved from the buyer's account to the account of the merchant)
Void Check.svg Allows removing an authorization hold from the buyer's account by the merchant
Refund Check.svg
Partial and multiple transactions supported
Allows issuing refunds (The money is returned to the buyer's account)
Get Status Can provide information about the status of a transaction to X-Payments
Get Card Can provide new/updated information about a saved credit card. For example, if a credit card gets re-issued, it is possible to get the renewed expiration date. If any other information changes, like the credit card number or the billing address, it is possible to access this updated credit card information as well.
Accept Allows accepting transactions with a higher likelihood of risk
Decline Allows rejecting transactions with a higher likelihood of risk
Test Can test whether the merchant account details entered in X-Payments are valid
3D-Secure via Cardinal Commerce Built-in (3-D Secure v1 and v2) Supports 3-D Secure payer authentication via Cardinal Commerce. Best for PSD 2 in the European Union.
Tokenization Check.svg Supports tokenization (Allows billing a customer's credit card again - without X-Payments storing cardholder data).
Account Updater Supports Account Updater service

Other payment methods supported by X-Payments are listed in the section X-Payments: Payment gateways supported by X-Payments 3.1.

Configure PayPal REST API

Prerequisites:

  • You need to have a PayPal Business account. You can sign up for one at paypal.com
  • You need to have an account with X-Payments. X-Payments v1.x-3.x User Manual is available.
  • Your X-Cart store needs to be connected to your X-Payments account. For X-Payments v1.x-3.x, the connection can be made using the X-Payments v1.x-3.x Connector add-on.


To configure PayPal REST API:

  1. Go to https://developer.paypal.com/developer/applications and log in to the Dashboard. This will get you to the "My Apps & Credentials" page.
  2. Depending on what you are going to do - test your checkout process or start real-life payment processing - you will need to choose an appropriate PayPal environment: Sandbox or Live.
    Pp rest api live sandbox.jpg

  3. Choose to create a new app by clicking the Create App button.
    Pp rest api create app.jpg
    Once the app has been created, you will get access to the API credentials and settings for it.
    Pp rest api credentials settings.jpg
    You will need the credentials to connect to X-Payments, so for now, keep the page open.

  4. In a new browser tab or window, log in to your X-Payments admin panel. Navigate to Settings > Payment configurations.
    Pp rest api payment configurations.png

    The Payment Configurations page opens.
    Pp rest api payment configurations1.png

  5. From the drop-down box, select PayPal REST API and click Add.
    Pp rest api payment configuration add.png

    The "Add new payment configuration" page for PayPal REST API opens.
    Pp rest api payment configuration add1.png

  6. Provide the credentials for your PayPal app so X-Payments can connect to your PayPal account for payment processing. Also, specify your payment configuration preferences.
    • Name: The text string entered here will be used as the name to identify the payment configuration in X-Payments admin panel and the Admin area of your X-Cart-based online store. You can keep the proposed name or choose to change it. For example, if you are going to have more than one payment configuration based on PayPal REST API payment integration - like to process payments in more than one currency - it is best to change the name so you can see which payment configuration you are dealing with without having to open its details. For example, you can use a name like "PayPal (REST API) - USD" to reflect the name of the currency that is going to be used for payments via this configuration.
    • Client ID and Secret: Copy and paste these values from PayPal (from the page you have kept open in another tab of your browser).
    • Test/Live mode: Whether you are using PayPal sandbox environment or production environment. The production environment is used for real payments (Live mode), whereas the sandbox environment is used for testing (Test mode).
    • Initial transaction: The mode in which you want the payment transaction to be conducted when someone buys something at your online store: Auth (authorize the payment amount but not capture the funds yet) or Auth and capture (authorize and capture the payment amount at once).
    • 3-D Secure mode: The payment gateway provides a built-in 3-D Secure service. You can specify how you want to use it. Two options are available:
      Returns a 3-D Secure contingency when it is a mandate in the region where you operate;
      Trigger 3-D Secure for every transaction, regardless of SCA requirements.
    • 3D Secure behavior: Two options are available:
      Accept all transactions;
      Accept transactions with possible liability shift to the card issuer.
    • Order prefix: Your trading name or any other prefix that will help you to identify a payment transaction as originating from this specific online store.
    • Currency: The currencies in which you will be able to accept payments via the payment method based on this payment configuration. By default, this setting is pre-set to All supported (N), which means all the currencies supported by the payment gateway - with the number N specifying the number of currencies. To limit the range of currencies that will be accepted, click on the All supported (N) button, uncheck the Select all box - this will unselect all the selected currencies - and check the boxes for the currencies that you will accept. For the sake of example, we are creating a configuration that will support only the United States dollar; so here we need to disable all the currencies but USD.
    • Credit card types: The credit card types you wish to accept via the payment method based on this payment configuration.
    • Call-back IPs: IP addresses of the payment gateway's callback requests.
    • Cancel not captured: Whether authorizations obtained for payments made in the "Auth" mode should be voided automatically within 30 days of payment if the capture of the funds has not been performed.
  1. In a new browser tab or window, log in to your X-Cart store Admin area. Use the admin menu to navigate to the Payment Methods page................