# 10481 (/api/nvp-soap/troubleshooting/10481)



Returns from the `DoExpressCheckoutPayment` API.

## Cause [#cause]

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

## Impact [#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 [#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.

```php lineNumbers
$DoExpressCheckoutPayment = [
    'TOKEN' => $token,
    'PAYERID' => $payerId,
    'PAYMENTREQUEST_0_PAYMENTACTION' => 'Sale',
    'PAYMENTREQUEST_0_AMT' => '100.00',
    'PAYMENTREQUEST_0_CURRENCYCODE' => 'USD'
];
```

* **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.

```php lineNumbers
$DoExpressCheckoutPayment = [
    'TOKEN'  => $token,
    'PAYERID'  => $payerId,
    'PAYMENTREQUEST_0_PAYMENTACTION' => 'Authorization',
    'PAYMENTREQUEST_0_AMT'  => '100.00',
    'PAYMENTREQUEST_0_CURRENCYCODE'  => 'USD',
];
```

## Upgrade [#upgrade]

The NVP/SOAP API integration method is deprecated.

Find more information about our latest integrations here:

* [REST Orders API](/api/orders/v2)
* [PayPal Checkout](/checkout)
* [Developer portal home page](/)

> **Info:** You can reach out for support at [paypal-techsupport.com](http://www.paypal-techsupport.com).
