This is the early access documentation preview for Custom Views. This documentation might not be in sync with our official documentation.

PayPal payment connector

Learn how to add a PayPal payment connector to your Project.

Add a PayPal payment connector

Before you add a PayPal payment connector, do the following:

  • Create a PayPal application from its Developer Dashboard, and after the application is generated, copy the Client ID and Application secret.
    For more information on how to create a sandbox environment, see Sandbox accounts.
  • Create a Composable Commerce API Client with the Orders, Payments, and Types scopes selected.
    These permissions are required to establish a communication between Composable Commerce and commercetools Checkout.

To add a PayPal payment connector, you must:

  1. Configure a PayPal payment connector.
  2. Set up a webhook in your PayPal Developer Dashboard.
  3. Finalize the configuration of the PayPal payment connector.

Configure a PayPal payment connector

  1. In the Merchant Center main navigation, click commercetools Checkout > Add payment connector.

    Add payment connector in the Merchant Center navigation menu and the Configure payment connector page

  2. On the Configure payment connector page, do the following:

    1. From Select payment provider, select PayPal.

    2. In the General information section, for Payment connector name, enter a plain-text name for the payment connector.

    3. In the Configuration section, do the following:

      1. For PayPal Client ID, enter the PayPal client ID you generated while creating a PayPal application.
      2. For Environment, select the environment where you will use the payment connector.
    4. In the Payment method section, keep the PayPal toggle in the activated position.

    5. In the API client credentials section, do the following:

      1. For Client ID, enter the client ID you generated while creating the Composable Commerce API Client.
      2. For Client secret, enter the client secret you generated while creating the Composable Commerce API Client.
  3. Click Save.

Set up a PayPal webhook

PayPal uses webhooks to call back the commercetools Checkout application and provide notifications about the status of the payment process.

To set up a webhook, follow the steps in PayPal documentation and enter the following configuration values:

  • URL: https://pypl.checkout.{region}.commercetools.com/{PaymentConnectorID}/notifications. Replace {region} with the Region where your commercetools Checkout project is deployed (for example, europe-west1.gcp) and {PaymentConnectorID} with the payment connector ID you generated earlier.

  • Event: select the following events to listen to:

    • NotificationEventType.PAYMENT_CAPTURE_DECLINED
    • NotificationEventType.PAYMENT_CAPTURE_COMPLETED
    • NotificationEventType.PAYMENT_CAPTURE_REFUNDED
    • NotificationEventType.PAYMENT_CAPTURE_REVERSED

Finalize the configuration of the PayPal payment connector

  1. In the Merchant Center navigation menu, select commercetools Checkout > Payment connector list.

  2. Select the payment connector you created earlier.

  3. In the PSP specific connector secrets section, do the following:

    1. For Application secret, enter the PayPal application secret you generated while creating a Paypal application.
    2. For Webhook ID, enter the webhook ID you generated while setting up the PayPal webhook.
  4. Click Save.

After adding the PayPal payment connector, add the activated payment method for this payment connector to your application.