Language

2Checkout Documentation

Retrieve

The CouponService class provides methods to create, retrieve, update and delete coupons.

Methods

Retrieve

Use to retrieve a Coupon object.

Arguments

  • TwoCheckoutConfig - Set your ApiUsername and ApiPassword.
  • CouponRetrieveServiceOptions - Object composed of detail coupon attributes.

Returns

Returns a Coupon object.

Example Usage:

var ServiceObject = new CouponService();
var ArgsObject = new CouponRetrieveServiceOptions();
ArgsObject.coupon_code = "DOTNETSHIPPING";
var result = ServiceObject.Retrieve(ArgsObject);

Example Response:

{TwoCheckout.Coupon}
  coupon_code: "DOTNETSHIPPING"
  date_expire: 12/10/2022
  minimum_purchase: 0.00
  percentage_off: null
  type: "shipping"
  value_off: null