Language

2Checkout Documentation

Create

2Checkout’s Admin API allows you to retrieve coupon information. You must specify your API username and password using the TwocheckoutConfig.ApiUsername & TwocheckoutConfig.ApiPassword class variables before calling a method in this class. The TwocheckoutCoupon class provides methods to create, retrieve, update and delete coupons and will return a TwocheckoutResponse object.

Method

create

Use to create a coupon.

Arguments

  • Dictionary Parameters

Returns

Returns a TwocheckoutResponse object.

Example Usage:

var dictionary = new Dictionary();
dictionary.Add("coupon_code", "DOTNETSHIPPING");
dictionary.Add("date_expire", "2012-12-10");
dictionary.Add("type", "shipping");

var result = TwocheckoutCoupon.Create(dictionary);

Example Response:

{TwoCheckout.TwocheckoutResponse}
  response_code: "OK"
  response_message: "Coupon successfully created"
  coupon_code: "DOTNETSHIPPING"