Search code examples
phppaypalpaypal-rest-sdk

PayPal Rest API: How to disable registration/pay with creditcard dialog at express checkout


I am wondering whether there is an option at PayPals Rest API to disable the registration dialog in the user approval dialog (@see screenshot).

enter image description here

I am using the php-sdk (https://github.com/paypal/PayPal-PHP-SDK) and I have set the payment method exclusively to 'paypal' in the order creation process:

$payer = new \PayPal\Api\Payer();
$payer->setPaymentMethod("paypal");
...
$payment = new \PayPal\Api\Payment();
$payment->setPayer($payer);
...
$payment->create($this->_getApiContext());

I also have checked the experience API (https://developer.paypal.com/webapps/developer/docs/api/#create-a-web-experience-profile), but there seems to be no option either.

Am I missing something or is there just no possibility to hide this dialog?

Edit: My requirement is to have no second option, just the plain PayPal login.


Solution

  • Where available, Guest Checkout would take the place of the account creation requirement. Guest Checkout is a PayPal Account Optional payment method.
    You will need to ensure that you have a Business Verified PayPal Account and ensure you have Guest Checkout Enabled in your PayPal account
    From the PayPal Developer Site:
    Rest API Accept a PayPal Payment

    Important: To receive Guest Checkout payments, which allow credit cards, ensure that PayPal Account Optional is enabled on your account settings. For example, here is the path for US accounts: Profile > My selling tools > Website preferences > PayPal Account Optional

    The PayPal Hosted Page depending on the country will either have the Guest Checkout Option (Account Optional/Pay with Credit Card) or Create a PayPal Account.