XML-RPC API - Refund a Customer

Refund a Customer
S
Written by Sergiiy
Updated 11 months ago

customerAddFunds(), customerCredit() and customerDebit()

These applications allow to refund or charge the Customer's balance with the specified sum.

The applications support trusted mode and i_wholesaler parameter should be supplied in this case.

Input

These functions receive struct with the following fields:

Mandatory fields

  • i_customer - which customer to update. Integer.
  • amount - amount to refund or charge. Double. The amount is also applied to the customer which is used in the HTTP authentication.
  • currency - currency in which the amount specified. String.

Optional fields

  • payment_notes - String.
  • payment_time - time of the payment in '%H:%M:%S.000 GMT %a %b %d %Y' format (e.g. 09:57:29.000 GMT Wed Nov 18 2009). (from version >= 5.0). String.

Output

The function returns:

  • result - 'OK'
  • XMLRPC fault in case of any error.
Did this answer your question?