Skip to content

Sale_Refund

Jacob McConnell edited this page Jun 10, 2014 · 1 revision

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

##Method

###refund

Use to issue a refund on a sale, invoice or lineitem.

####Arguments

####Returns

Result Object

####Example Usage:

args = {
    sale_id: "4774380224",
    comment: "test",
    category: "5"
};

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

####Example Response:

{
    "response_code": "OK",
    "response_message": "refund added to invoice"
}

Clone this wiki locally