Language

2Checkout Documentation

Delete

You must specify your API username and password when creating your 2checkout-node object (named ‘tco’ in these examples) before calling this method.

Description

Use to delete a coupon.

Arguments

  • object - Object containing Delete Coupon
  • parameters.
  • callback - Function to be called on success/error

Returns

  • Response Object

Example Usage:

args = {
    coupon_code: "TEST123"
};

tco.coupons.delete(args, function (error, data) {
    if (error) {
        console.log(error);
    } else {
        console.log(data.response_code);
    }
});

Example Response:

{
    "response_code": "OK",
    "response_message": "Coupon successfully deleted."
}