10481

API

Last updated: Apr 15th, 1:41pm

Returns from the DoExpressCheckoutPayment API.

Cause

Invalid PaymentAction: The PaymentAction parameter set to Authorization is not permitted when using unilateral (guest) checkout or non-credentialed authentication methods.

Impact

The payment process is halted, preventing the customer from finalizing their purchase. This can lead to a poor customer experience and potentially lost sales if the issue is not resolved promptly.

Resolution

  • Check the PaymentAction parameter: Ensure that the PaymentAction parameter is set to Sale instead of Authorization if you are using unilateral (guest) checkout. The Sale action is allowed for guest checkouts and does not require the user to have a PayPal account.
    1$DoExpressCheckoutPayment = [
    2 'TOKEN' => $token,
    3 'PAYERID' => $payerId,
    4 'PAYMENTREQUEST_0_PAYMENTACTION' => 'Sale',
    5 'PAYMENTREQUEST_0_AMT' => '100.00',
    6 'PAYMENTREQUEST_0_CURRENCYCODE' => 'USD'
    7];
    • Use credentialed authentication: If you need to use the Authorization action, ensure that the user is authenticated and has a PayPal account. This means the user must log in to their PayPal account during the checkout process.
    • Review your code: Review your code to ensure that the PaymentAction parameter is set appropriately based on the type of checkout being used. Make sure that the parameter is not being changed or modified at any point before the API call.
      1$DoExpressCheckoutPayment = [
      2 'TOKEN' => $token,
      3 'PAYERID' => $payerId,
      4 'PAYMENTREQUEST_0_PAYMENTACTION' => 'Authorization',
      5 'PAYMENTREQUEST_0_AMT' => '100.00',
      6 'PAYMENTREQUEST_0_CURRENCYCODE' => 'USD',
      7];

      Upgrade

      The NVP/SOAP API integration method is deprecated.

      Find more information about our latest integrations here:

      If you accept cookies, we’ll use them to improve and customize your experience and enable our partners to show you personalized PayPal ads when you visit other sites. Manage cookies and learn more