Simulate errors with PayPal's Smart Payment Buttons
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using Smart Payment Buttons in Sandbox. Im almost finished.
Can anyone tell me how can i simulate errors? I've turned on Negative testing. But what's next?
I saw that the documentation does provide 2 methods of simulating errors.
Those methods are: test values and request headers.
But both methods seem to be unrelated to Smart Payment Buttons because these methods use something called "Payouts API" - which i dont have.
I think i use Orders API.
Please help.
- Labels:
-
Express Checkout
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I could not find an answer to that. Did you find a way yet?
A few days ago, I activated negative testing for the sandbox account and made it worked with a a specific amount. I can't find that documentation anymore and could not reprod
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey, thanks for taking the time to respond.
Unfortunately, i have not found a sollution for this yet.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is some content we have on Developer.PayPal.com, please let me know if this helps.
Thanks,
Christina
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think you can see from the replies that it does NOT help.
PLEASE provide us with CLEAR documentation on how to test the SMART BUTTON (not REST API, not SOAP, not NVM) for error conditions.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @jlippiner,
I understand the concerns, I'm working with the product teams to see how we can make this more clear. I apologize for the challenges this is presenting you.
Christina
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
https://developer.paypal.com/docs/api/request-headers/ seems to suggest that we can use request headers for testing the Orders API, which is used by the Smart Button, but I don't see how we can add these headers to the request made by the button?
In the javascript Smart Button SDK, we give the call like this:
paypalConfig = {
createOrder: function(data, actions) {
return actions.order.create({
purchase_units: [{
amount: {
value: '0.01'
}
}]
});
}
}
which I guess eventually calls https://developer.paypal.com/docs/api/orders/v2/#orders_create
How would we add the request header to the orders_create API call?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You'll have to go to your Dashboard on https://developer.paypal.com/ .
On the left side go to Sandbox --> Accounts. You'll see at least two accounts. One for your business (the seller) and one personal one (the buyer).
Important: Go to the business account under "manage account" --> "view/edit account" and then choose the last tab on the right called "Settings". There you can enable negative testing
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've not found a way to perform negative testing with smart buttons. Negative testing has been enabled for my sandbox business account. I found a page that says to use a value of 107.55 in order to simulate the 10755 error code, but createOrder() always returns completed.
The documentation for negative testing does not seem to be complete for smart buttons, and always refers back to using request headers, which doesn't seem to be possible with smart buttons. Your last response about enabling negative testing does not seem to have any effect.
Thanks for your help,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Paul_Adamson I completely agree.
This is INSANE that we cant test error conditions easily using the Smart Button. I have an error handler and were seeing issues but no way to test it. Turning on negative testing does nothing and there is no place for headers.
If you figure this out, please let me know.
Josh

- « Previous page
-
- 1
- 2
- Next page »
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.