Language

2Checkout Documentation

Refund

The SaleService class provides methods to retrieve and update sales.

Method

Refund

Use to attempt to issue a full or partial refund.

Arguments

  • TwoCheckoutConfig - Set your ApiUsername and ApiPassword.
  • SaleRefundServiceOptions - Object containing refund invoice parameters.

Returns

Returns result as a TwoCheckoutResponse object.

Example Usage:

var ServiceObject = new SaleService();
var ArgsObject = new SaleRefundServiceOptions();
ArgsObject.invoice_id = invoice_id;
ArgsObject.comment = "test refund";
ArgsObject.category = 5;

var result = ServiceObject.Refund(ArgsObject);

Example Response:

{TwoCheckout.TwoCheckoutResponse}
  response_code: "OK"
  response_message: "refund added to invoice"