PayPal REST API (via X-Payments Cloud)
Seller Labs avatar
Written by Seller Labs
Updated over a week ago

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

PayPal REST API Features

Feature

Supported

Sale

Supports transactions of 'Sale' type (Authorization and capture actions are completed simultaneously at the time of payment processing)

Yes

Auth

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)

Yes

Capture

Allows capturing the previously authorized amount (The authorized amount is moved from the buyer's account to the account of the merchant)

Yes
(Partial and multiple transactions supported)

Void

Allows removing an authorization hold from the buyer's account by the merchant

Yes

Refund

Allows issuing refunds (The money is returned to the buyer's account)

Yes

(Partial and multiple transactions supported)

Get Status

Can provide information about the status of a transaction to X-Payments Cloud

No

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.

No

Accept

Allows accepting transactions with a higher likelihood of risk

No

Decline

Allows rejecting transactions with a higher likelihood of risk

No

Test

Can test whether the merchant account details entered in X-Payments Cloud are valid

No

3D-Secure via
Cardinal Commerce

Supports 3-D Secure payer authentication via Cardinal Commerce. Best for PSD 2 in the European Union.

Built-in (3-D Secure v1 and v2)

Tokenization

Supports tokenization (Allows billing a customer's credit card again - without X-Payments Cloud storing cardholder data).

Yes (via PayPal Vault)

Account Updater

Supports Account Updater service

Yes

Apple Pay

Supports Apple Pay

Yes

Google Pay

Supports Google Pay

No

Other payment methods supported by X-Payments Cloud are listed in the section X-Payments Cloud: Supported Payment Methods.


Configure PayPal REST API

Prerequisites:

  • You need to have a PayPal Business account. You can sign up for one at paypal.com

  • The PayPal account needs to be subscribed and approved for PPCP custom/UCC to process direct card payments. You may reach out to PayPal Customer Support team to enable PPCP custom/UCC on your account. Also, you can apply for it here under Advanced integration.

  • You need to have an account with X-Payments Cloud.

  • Your X-Cart store needs to be connected to your X-Payments Cloud account. The connection can be made using the X-Payments Cloud connector add-on. Detailed information on setting up the connection is available here. Getting Started info for X-Payments Cloud is available here.

To configure PayPal REST API:

  1. Go to Dashboard -> Business Dashboard.

  2. In the top menu, select App Centre.

  3. Scroll down the page. Closer to the bottom of the page you will find a block titled "Streamline operations". In that block, click on "API credentials - Accept payments on your site".

    You will be redirected to the API Credentials page.

    Here you can get the API credentials for your integration.

    You will need the credentials to connect to X-Payments Cloud, so for now, keep the page open.

  4. 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 (Store Setup > Payment Methods).

    The Payment Methods page opens.

  5. Scroll down the page to find your store's X-Payments Cloud payment method. Choose to configure this method by clicking the Configure button opposite its name.

    The X-Payments Cloud Settings page opens.

  6. Make sure you are viewing the page in editing mode. If the padlock icon on the page is displayed as locked, it means that you will need to unlock editing before you can proceed.

  7. Use the Add a payment gateway drop-down selector to select the name of the payment gateway integration you require: PayPal REST API. Click Add.

  8. The Add new payment configuration page for PayPal REST API opens.

  9. Provide the credentials for your PayPal app so X-Payments Cloud 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 Cloud 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.

    • Accept currencies: 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.

    • Order total limits (Minimum / Maximum): The transaction amount range that 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.

  10. After adjusting the payment configuration settings as you require, be sure to click Save to save your changes.

    The payment configuration will be created; a success message will be shown at the top of the screen:

  11. If this is the first real payment processor you have enabled, you will be prompted to set up Two-step user authentication. This step is required for security. Complete Two-step user authentication setup as described in Connecting Your X-Cart Store to X-Payments Cloud.

  12. Once you have configured a method for Two-step user authentication, you will be redirected to the list of your payment configurations. There you should be able to see the PayPal (REST API) payment configuration you have just added. New payment configurations in X-Payments Cloud are activated upon creation, so your PayPal (REST API) payment configuration will be active. On the list of payment configurations, this will be shown as the green "Enabled" button opposite the payment configuration name. You can use this button to temporarily disable the payment configuration. But, of course, for your store to be able to process payments via this payment configuration, the payment configuration needs to remain in the Enabled state.

You are all set. Make sure your X-Payments Cloud payment method is active (enabled). Also adjust your Store Settings. After this, you should be able to successfully process payments with PayPal REST API.

Important: If using PayPal REST API, be sure to also configure PayPal Checkout.

Did this answer your question?