UNPROCESSABLE_ENTITY

kk-xiyan
Contributor
Contributor
{
	"name": "UNPROCESSABLE_ENTITY",
	"details": [{
		"issue": "INSTRUMENT_DECLINED",
		"description": "The instrument presented  was either declined by the processor or bank, or it can't be used for this payment."
	}],
	"message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
	"debug_id": "fa9ffe64391d4",
	"links": [{
		"href": "https://developer.paypal.com/docs/api/orders/v2/#error-INSTRUMENT_DECLINED",
		"rel": "information_link",
		"method": "GET"
	}, {
		"href": "https://www.sandbox.paypal.com/checkoutnow?token=2GG04258RD4047935",
		"rel": "redirect",
		"method": "GET"
	}]
} {
	"name": "UNPROCESSABLE_ENTITY",
	"details": [{
		"issue": "INSTRUMENT_DECLINED",
		"description": "The instrument presented  was either declined by the processor or bank, or it can't be used for this payment."
	}],
	"message": "The requested action could not be performed, semantically incorrect, or failed business validation.",
	"debug_id": "5ca10bfb4a729",
	"links": [{
		"href": "https://developer.paypal.com/docs/api/orders/v2/#error-INSTRUMENT_DECLINED",
		"rel": "information_link",
		"method": "GET"
	}, {
		"href": "https://www.sandbox.paypal.com/checkoutnow?token=9FS050679L624391C",
		"rel": "redirect",
		"method": "GET"
	}]
}
Login to Me Too
4 REPLIES 4

kk-xiyan
Contributor
Contributor
'intent' => 'CAPTURE',
'purchase_units' => [
[
'amount' => [
'currency_code' => 'USD',
'value' => '0.01',
],
'description' => 'Description of the order',
"payee" => [
"email_address" => "***"
]
]
]
Login to Me Too

Kavyar
Moderator
Moderator

Good day @kk-xiyan,

 

Thank you for posting to the PayPal community.

 

We apologize for any inconvenience.

 

Upon reviewing the error details, it appears that the reported order attempts failed to capture due to an error "INSTRUMENT_DECLINED".

 

Guide link to resolve the issue - https://developer.paypal.com/api/rest/reference/orders/v2/errors/#link-captureorder

 

UNPROCESSABLE_ENTITY, this error usually occurs when the API request payload is invalid or not well-formatted or the merchant account is restricted.

 

Also, please ensure that the API requests are in the correct format. Here is a sample for your reference:

 

{

    "intent": "CAPTURE",

    "purchase_units": [

        {

            "amount": {

                "currency_code": "USD",

                "value": "100.00"

            }

        }

    ]

}

 

For more detailed information, please refer to the guide provided in the following link:

 

https://developer.paypal.com/docs/api/orders/v2/

 

https://developer.paypal.com/docs/api/orders/v2/#orders_create!path=purchase_units&t=request

 

Unfortunately, we are restricted to process live payments on merchant’s website. Can you please try to process a test payment via card which is not linked to your PayPal account.

 

If you are still experiencing issues, please create an MTS ticket via the following URL - https://www.paypal-support.com/s/?language=en_US . Please ensure that you provide detailed information and error details when submitting the ticket.

 

Sincerely,

Kavya

PayPal MTS

 

If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

Login to Me Too

kk-xiyan
Contributor
Contributor

Thank you for your reply

'intent' => 'CAPTURE',
'purchase_units' => [
[
'amount' => [
'currency_code' => 'USD',
'value' => '0.01',
],
'description' => 'Description of the order',
"payee" => [
"email_address" => "***"
]
]
]

I post ,  Like you

Are there any key operations missing ?

Login to Me Too

Kavyar
Moderator
Moderator

Good day @kk-xiyan,

 

Kindly make sure that the API request you're passing is in JSON format. To assist you further, I have included a sample reference below:

{

   "intent": "CAPTURE",

   "purchase_units":

    [

      {

        "amount":

         {

            "currency_code": "USD",

            "value": "0.01"

         },

        "description": "Description of the order",

        "payee":

         {

            "email_address": "****"

         }

     }

   ]

}

 

If you are still experiencing issues, please create an MTS ticket via the following URL - https://www.paypal-support.com/s/?language=en_US . Please ensure that you provide detailed information and error details when submitting the ticket.

 

Sincerely,

Kavya

PayPal MTS

 

If this post or any other was helpful, please enrich the community by giving kudos or accepting it as a solution.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.