Skip to main content

Remove product from cart

Last updated: 04-May-2017
Rate this article:


Use this method to remove a product that was added to the shopping cart, during the current session.



Parameter Type/Description
sessionID Required (String)
  Session identifier, which is the output of the Login method. An exception is thrown if the values are incorrect.
productId Required (Integer)
  Unique product identifier from the Avangate system.
priceOptions Optional (StringArray)

Array of price options codes. These identifiers mark the individual options inside pricing options configuration groups.

This parameter must match exactly the pricing option combination of the product added to the cart in order for the product to be removed.


Partner orders can involve the same product, bot ordered in multiple instances, each with different pricing options.


Can be NULL.

quantity Optional (Integer)
  Defines the number of product units added to cart that should be removed. If no quantity info is provided, the product is completely removed from cart. Can be NULL.


Parameters Type/Description
Result Boolean
  True or false



require('PATH_TO_AUTH'); // Authentication example:
require('PATH_TO_setPartner'); // setPartner example:
require('PATH_TO_addProduct'); // addProduct example:

$productId = 'YOUR_PRODUCT_ID';
$priceOptions = array(
$quantity = YOUR_QUANTITY;

try {
$RemoveProduct= $client->deleteProduct ($sessionID, $productId, $priceOptions, $quantity);
} catch (SoapFault $e) {
echo "ProductDeleted: " . $e->getMessage();
var_dump ("ProductDeleted ", $RemoveProduct);


Error Description


The shopping cart is empty.


There is no product with the specified settings in cart.


Rate this article:

Need help?

Do you have a question? If you didn’t find the answer you are looking for in our documentation, you can contact our Support teams for more information. If you have a technical issue or question, please contact us. We are happy to help.

Not yet a Verifone customer?

We’ll help you choose the right payment solution for your business, wherever you want to sell, in-person or online. Our team of experts will happily discuss your needs.

Verifone logo