Language

2Checkout Documentation

Update

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 update a product option.

Arguments

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

Returns

  • Response Object

Example Usage:

args = {
    option_name: "test option",
    option_value_name: "value name",
    option_value_surcharge: "0.01"
};

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

Example Response:

{
    "response_code": "OK",
    "response_message": "Option updated successfully"
}