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

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.

+ show/hide code
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.

+ show/hide code

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.