Skip to content

Magento : REST API integration with paypal payment method

We are using REST API for mobile app from magento 2. We are try to place order using paypal express checkout method. But we get error. Check detail bellow.

API call.

Call Type : PUT

API URL : https://example.com/index.php/rest/V1/carts/302/order

Request Body

{
    "paymentMethod": {
          "method": "paypal_express",
          "additional_data": {
                 "paypal_express_payment_payload": {
                       "create_time":"2019-04-15T23:13:52Z",
                       "id":"PAY-6RV70583SB702805EKEYSZ6Y",
                       "intent":"sale",
                       "state":"approved"
                 }
          }
    }
}

Response of API call :

{
“message”: “Internal Error. Details are available in Magento log file. Report ID: webapi-5cb8df18c6197”
}

Magento Error log

    [2019-04-18 20:33:28] main.CRITICAL: Report ID: webapi-5cb8df18c6197; Message: Notice: Array to string conversion in /vendor/magento/framework/Reflection/TypeProcessor.php on line 473 
{"exception":"[object] (Exception(code: 0): Report ID: webapi-5cb8df18c6197; Message: Notice: Array to string conversion in /vendor/magento/framework/Reflection/TypeProcessor.php on line 473 
at /vendor/magento/framework/Webapi/ErrorProcessor.php:206, Exception(code: 0): Notice: Array to string conversion in /vendor/magento/framework/Reflection/TypeProcessor.php on line 473 at /vendor/magento/framework/App/ErrorHandler.php:61)"} []

Here is my postman screenshot.

enter image description here

enter image description here

Response after developer mode enabled

enter image description here