Search code examples
reactjspaypal

PayPal is showing only the payment options of some of the enable-funding values


I have this code set up for dynamically adding the script into the body of my react website. I'm using an npm package called react-paypal-buttons-v2

const script = document.createElement('script');
script.type = 'text/javascript';
script.src = `https://www.paypal.com/sdk/js?client-id=${clientId}&currency=USD&enable-funding=credit,paylater,venmo,bancontact,blik,eps,giropay,ideal,mercadopago,mybank,p24,sepa,sofort`;
script.async = true;

script.onload = () => {
    setSdkReady(true);
};

document.body.appendChild(script);

Code for rendering buttons -

import { PayPalButton } from 'react-paypal-button-v2'
<PayPalButton amount={order.totalPrice} onSuccess={sucessPaymentHandler} />

Everything is working fine except PayPal is only showing some of the payment methods (paypal credit, venmo and a few other buttons are not being shown)


Solution

  • Payment methods only show up when the buyer is eligible, this is the normal and expected behavior.

    You won't see both paylater and credit, you won't see giropay outside Germany, you won't see mercadopago outside south america, etc.

    To test different locations in sandbox mode, use &buyer-country=XX. This only works for sandbox.