.. meta:: :description: Wired API, transactions :keywords: Wired, xml, api, channel manager, booking engine, transactions Transactions ************ Introduction ------------- WuBook services generate costs. Such costs are generally monitored and managed on the WuBook Account ( https://wubook.net/wauth/wauth/ ). We also provide a way to programmatically manage them. Filter params ------------- For each group of collected costs (balances), we provide the following status: * **current** : services costs not yet claimable; * **waiting** : services waiting for a payment; * **paid** : paid services; Anatomy of the datas -------------------- Every response is bult with a self-explanatory fields: ======================= ======================= ============================================================================================================ Field Type/(default value) Description ======================= ======================= ============================================================================================================ balance_id integer/(0) The balance id (as show on the WuBook Account), in **current** search the value is 0 (mean no transaction) services array of service/[] service container, a empty array mean no services ======================= ======================= ============================================================================================================ Below there are a description of the service object (struct): ======================= ================== ======================================================================================================= Field Type Description ======================= ================== ======================================================================================================= service_name string name of service on_date string date (%d/%m/%Y %H:%M, e.g: 30/12/1970 10:57) description string Description cost float service cost discounted_cost float discounted cost (or empty) ======================= ================== ======================================================================================================= Available functions ------------------- .. function:: read_balance(token, status [,lcode]) That function returns, if present, the trasactions of a specific property based by the **status** filter argument. If the lcode parameter is missing, the function returns the account's balance. The use of read_balance is available both for corporates and direct customers, except for account belonging to a corporate. .. hidden-code-block:: xml :starthidden: True read_balance 9941993872.3000 paid 1213394817 0 balance_id 1642498279 services on_date 18/01/2022 10:30 description ord cost 48.0 discounted_cost 0.0 service_name Online Reception .. function:: read_subaccount_balance(token, status, subaccount_code) The use of read_subaccount_balance is allowed only for **corporates customers**. That function returns, if present, the account level trasactions. .. hidden-code-block:: xml :starthidden: True 0 1213394817 balance_id 1642498270 services on_date 18/01/2022 10:23 description ord cost 48.0 discounted_cost 0.0 service_name Online Reception Working with waiting balances ------------------------------ That section is for **corporates only**. ======================= ======================= Field Type ======================= ======================= balance_ids ArrayOf balance_id ======================= ======================= .. function:: pay_balance(token, balance_ids) The pay_balance function provides an on-demand payment, It is possible to pay **waiting balances**. This call will charge your registered credit card. .. function:: detach_balance(token, balance_ids) The detach_balance function marks the selected balances as **insolvent**. It is possible to detach only **waiting balances**. .. function:: pay_balance_with_credit(token, lcode, balance_ids) The pay_balance_with_credit function provides an on-demand payment, filtered by lodging code (lcode) It is possible to pay **waiting balances**. This call will use your credit.