--- layout: m1x_soap title: Invoice Cancel ---
Aliases:
Allows you to cancel the required invoice. Note that not all order invoices can be canceled. Only some payment methods support canceling the order invoice (e.g., Google Checkout, PayPal Pro, PayPal Express Checkout).
Aliases:
Arguments:
| Type | Name | Description |
|---|---|---|
| string | sessionId |
Session ID |
| string | invoiceIncrementId |
Invoice increment ID |
Returns:
| Type | Description |
|---|---|
| boolean | True if the order invoice is canceled. |
$proxy = new SoapClient('http://magentohost/api/soap/?wsdl');
$sessionId = $proxy->login('apiUser', 'apiKey');
$invoiceIncrementId = '100000013';
$result = $proxy->call(
$session,
'sales_order_invoice.cancel',
$invoiceIncrementId
);