Language

2Checkout Documentation

Create

The ProductService class provides methods to create, retrieve, update and delete options.

Method

Create

Use to create an product.

Arguments

  • TwoCheckoutConfig - Set your ApiUsername and ApiPassword.
  • ProductCreateServiceOptions - Object composed of create product attributes.

Returns

Returns a TwoCheckoutResponse object.

Example Usage:

var ServiceObject = new ProductService(); var ArgsObject = new ProductCreateServiceOptions();
 ArgsObject.name = "Test Product";
 ArgsObject.price = (decimal)2.00;

var result = ServiceObject.Create(ArgsObject);

Example Response:

{TwoCheckout.TwoCheckoutResponse}
  response_code: "OK"
  response_message: "Product successfully created"
  product_id: "4831136155"