Language

2Checkout Documentation

Delete

The Twocheckout_Coupon class provides methods to create, retrieve, update and delete coupons and will return an Array or JSON response depending on your format specification.

Method

delete

Use to delete an existing coupon.

Arguments

  • Array containing delete_coupon parameters in key => value pairs. Parameters -> API Delete Coupon

Returns

Returns an Array or JSON depending on your format specification.

Example Usage:

Twocheckout::username('APIuser1817037');
Twocheckout::password('APIpass1817037');

$args = array(
    'coupon_code' => '123test'
);

$response = Twocheckout_Coupon::delete($args);

Example Response:

Array
(
    [response_code] => OK
    [response_message] => Coupon successfully deleted.
)