-
Notifications
You must be signed in to change notification settings - Fork 8
Product_Create
Jacob McConnell edited this page Jun 11, 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
###create
Use to create a product.
####Arguments
- object - Object containing product parameters. Parameters -> API Create Product
- callback - Function to be called on success/error
####Returns
Response Object
####Example Usage:
args = {
name: "test product",
price: "0.01"
};
tco.products.create(args, function (error, data) {
if (error) {
console.log(error);
} else {
console.log(data.response_code);
}
});
####Example Response:
{
"assigned_product_id": "2560",
"product_id": "4688359093",
"response_code": "OK",
"response_message": "Product successfully created"
}
Please feel free to contact 2Checkout directly for assistance with your integration.