Integrating PayPal Express Checkout button

The PayPal Express Checkout button offers your customers another way to pay, and it complements your existing PayPal payment flow. It will provide a one-click checkout solution without the need of asking the billing and shipping addresses. This allows you to place the button on any page in your webshop, like the product page.

https://assets.docs.mollie.com/_images/paypal-express-button@2x.png

The button

We recommend you to use the button that we provide in the Mollie Resources pack. This button is recognizable to customers and improves checkout conversion. Of course it’s also possible to design and use your own button, according to the PayPal brand guidelines.

Account requirements

The button can be used when your account is fully setup at PayPal and Mollie. Make sure that your account is a PayPal Business account and that you linked your PayPal account to Mollie as described in our help center article.

Integration steps

Using the button requires the Orders API. You can use your existing integration with the Orders API with only some small tweaks. You can use the following steps as a guideline for the basic integration:

  1. Place the button on the intended page, like a product page.

  2. Your website creates an order via the Orders API after the consumer clicks the button. Make sure you set method to paypal so that the billingAddress field will not be required anymore.

    Note

    Once the order is created, the amount can not be changed. When calculating shipping costs and/or taxes, be sure to include them when creating the order.

    Warning

    The billingAddress stays required for every other method. If you set another method, or no method at all, your request will result in an HTTP status code 422 Unprocessable Entity.

  3. Redirect your customer to the checkout URL which you can find in the response of the Create Order API. The customer will select the address where the product(s) needs to be send to and completes the payment.

  4. Mollie will receive the address from PayPal and adds it to the order. The consumer will be redirected back to your website while we call your webhook, if set, to inform you about the latest order state.

  5. You can retrieve the shipping address by calling the Get order API and finish your order to ship the product(s).