Developer's Network
Untitled Document

TASK 10: ERROR-HANDLING

 

Error Responses

In the event that invalid data is sent to the buySAFE Website Bonding API, error messages are returned.  It is important that those error messages are properly dealt with when they are received.

Error responses will include the field <IsSuccessful>False</IsSuccessful>

If any error response is received, you should suppress all buySAFE cart signaling and fees in the same way you would if you had received a response with IsBuysafeEnabled=false. Please log the entire error response for troubleshooting purposes.

Specific error messages will be included in the <ErrorCause> element. 

The most common buySAFE API errors are as follows:

  1. Items are invalid. ShoppingCartItem with MarketplaceItemCode "XXXX" is already in the shopping cart. Please update the quantity for duplicate items.

    This occurs when multiple items with the same MarketplaceItemCode are sent to our API.  If two or more identical items exist in the shopping cart, they must be sent as a single item with a multiple quantity.
  1. The cart has already been checked out. Once a cart is checked out it cannot be revised.

    You will receive this error if you attempt to send another API call for a shopping cart that has received a successful SetShoppingCartCheckout call.
  1. The items sent are different from the items previously sent at AddUpdateShoppingCart.

    You will receive this error if the items sent in a cart’s SetShoppingCartCheckout call do not match the items sent in the cart’s last AddUpdateShoppingCart call.  For data integrity reasons, no cart content changes are allowed between the last AddUpdateShoppingCart and the SetShoppingCartCheckout call.

 

Timeouts

You should receive a response from the buySAFE API within 0.5 seconds.

We recommend that our partners implement a failsafe so that if they do not receive a response from the buySAFE API within three seconds, all buySAFE signaling and fees are disabled for the cart.

 

If you do not receive a response from the buySAFE API…

In some scenarios (for example, if malformed XML is sent), you may not receive a response from the buySAFE API.

We recommend that our partners implement a failsafe so that if they do not receive a response from the buySAFE API, all buySAFE signaling and fees are disabled for the cart.

 

NOTES FOR SHOPPING CART PLATFORMS:

We recommend that error messages related to buySAFE are not shown to merchants. If an error occurs, buySAFE should be disabled for that cart. Please log all error message for troubleshooting purposes.

 

 

 

<< PREVIOUS TASK || TOC || NEXT TASK >>