Transactions

Introduction

WuBook services generate a cost. 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)

XML Example

+ show/hide code

Available functions

All functions return a common data scheme as described above

get_balance(token, lcode, status)

That function returns, if present, the trasactions of a specific property based by the status filter argument. The use of get_balance is available both for corporates and direct customers, except for account belonging to a corporate.

get_crp_balance(token, subaccount_code, status)

The use of get_crp_balance is allowed only for corporates customers. That function returns, if present, the account level trasactions.

Working with waiting balances

That section is for corporates only.

Field

Type

balance_ids

ArrayOf balance_id

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.

detach_balance(token, balance_ids)

The detach_balance function marks the selected balances as insolvent. It is possible to detach only waiting balances.

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.