How to provoke a failed payment execution?

suntrop
Contributor
Contributor

I'd like to test an see how the response looks like, if a /v1/payments/payment/XXXX/execute fails.

 

I know from the docs the state can be approved or failed, but is there some way to provoke a sandbox account to result in a failed state?

Login to Me Too
1 ACCEPTED SOLUTION

Accepted Solutions
Solved

MTS_Jennifer
Moderator
Moderator

Hello,

Thank you for Posting to the PayPal Merchant Technical Support Community.

We have Negative Testing Available, which will provoke negative responses on purpose to help with your testing.

Here is the guide for Rest API Negative Testing: https://developer.paypal.com/docs/api/nt-rest/

Please keep in mind that it is in beta so not ever response is available, but it is very useful in testing error conditions.

Thank you,

Jennifer

PayPal

View solution in original post

Login to Me Too
4 REPLIES 4
Solved

MTS_Jennifer
Moderator
Moderator

Hello,

Thank you for Posting to the PayPal Merchant Technical Support Community.

We have Negative Testing Available, which will provoke negative responses on purpose to help with your testing.

Here is the guide for Rest API Negative Testing: https://developer.paypal.com/docs/api/nt-rest/

Please keep in mind that it is in beta so not ever response is available, but it is very useful in testing error conditions.

Thank you,

Jennifer

PayPal

Login to Me Too

suntrop
Contributor
Contributor

Thanks for the help and link. Had seen this page before and it seems it does not provide testing for payments endpoints.

 

Perhaps there is some description on what circumstances a payment can fail. 

Login to Me Too

MTS_Jennifer
Moderator
Moderator

Hello,

Here is a link to the request headers and the negative testing that is available:

https://developer.paypal.com/docs/api/request-headers/

 

Thank you,

Jennifer

PayPal

Login to Me Too

suntrop
Contributor
Contributor

Ok, seems I have misinterpreted the docs for negativ testing. Will try it 🙂

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.