Accept a PayPal payment
Learn how to accept PayPal payment, a digital wallet popular with businesses in Europe.
Caution
Stripe automatically presents your customers payment method options by evaluating their currency, payment method restrictions, and other parameters. We recommend that you configure your payment methods from the Stripe Dashboard using the instructions in Accept a payment.
If you want to continue manually configuring the payment methods you present to your customers with Checkout, use this guide. Otherwise, update your integration to configure payment methods in the Dashboard.
Stripe Checkout shows PayPal either as a standard payment method or as a standalone button, depending on which option is more likely to increase the conversion rate.
Determine compatibility
A Checkout Session must satisfy all of the following conditions to support PayPal payments:
- Prices for all line items must be in the same currency. If you have line items in different currencies, create separate Checkout Sessions for each currency.
Accept a payment
Note
Build an integration to accept a payment with Checkout before using this guide.
Use this guide to learn how to enable PayPal – it shows the differences between accepting a card payment and using PayPal.
Enable PayPal as a payment method
When creating a new Checkout Session, do the following:
- Add
paypal
to the list ofpayment_
.method_ types - Make sure all your
line_
use the same currency.items
Fulfill your orders
After accepting a payment, learn how to fulfill orders.
Test your integration
You don’t need to connect your PayPal business account to test the integration. However, make sure to connect your PayPal and Stripe accounts when you’re ready to activate live mode payments.
When testing your Checkout integration, select PayPal as the payment method and click Pay.
To simulate the most common integration and failure scenarios for PayPal payments, pass email
values that match the patterns described in these test scenarios.
Test scenarios
Email pattern | Scenario | Explanation |
---|---|---|
. | Merchant account restricted | Capturing or authorising a payment fails with a payment_ error if your merchant account is restricted by PayPal. Provide an email matching this pattern at time of authorisation to fail the authorisation. |
. | Transaction refused | Capturing a payment fails with a payment_ error if the transaction is refused by PayPal. |
. | Payment instrument declined | Capturing a payment fails with a payment_ error if the instrument presented was either declined by the processor or bank, or it can’t be used for this payment. |
. | Lost dispute | On capture, the payment intent first succeeds only to be disputed. The dispute created is already lost and the merchant can’t submit evidence on the Stripe Dashboard. |
. | Manually capturing an authorised payment | Capturing an authorised payment fails with a capture_ error if the authorisation has already expired. |