Search code examples
phppaypalpaypal-sandbox

PayPal Payment Excute Error: Method type not supported for this operation


When we try to complete a PayPal payment we're getting an error.

Curl URL

https://api.sandbox.paypal.com/v1/payments/payment/PAY-6919774712486433JLP6PPIQ/excute/

HTTP Headers
Content-Type: application\/json","Authorization: Bearer A21AAHreFxxtc86Y_27nsOJp9e"

Data
{"payer_id":"LUQRF5YkjhXG6"}

Error
{
    "name": "MALFORMED_REQUEST",
    "message": "Method type not supported for this operation",
    "information_link": "https:\/\/developer.paypal.com\/webapps\/developer\/docs\/api\/#MALFORMED_REQUEST",
    "debug_id": "dd9ba4864e05c"
}

Solution

  • You have a typo in your URL

    It should be execute not excute.

    Use: https://api.sandbox.paypal.com/v1/payments/payment/PAY-6919774712486433JLP6PPIQ/execute/