Page 1 of 1

Payment/Invoice items in getBookings API

Posted: Tue Dec 17, 2019 10:33 am
by kingszg
Can you shed some light on the type and type2 fields of invoice items retrieved with the getBookings API methods?

Code: Select all

            "description":"Some description",
Somehow a type of 200 seems to indicate a payment. Is there any more meaning to these fields?

And in a related question, is it possible to expose pending payments through the API? ... or create them that way?


Re: Payment/Invoice items in getBookings API

Posted: Mon Dec 23, 2019 8:30 am
by kingszg
Hello - any input on this from the beds24 team?

Re: Payment/Invoice items in getBookings API

Posted: Sat Jan 04, 2020 2:57 pm
by kingszg
thanks for letting me know your thoughts on this.

Re: Payment/Invoice items in getBookings API

Posted: Thu Apr 09, 2020 1:23 pm
by lea_5886
in reference to:

I am also looking for information on this exact same subject. It appears this invoice array holds a number of invoice structures, one for each charge and payment item on the bookings "Charges & Payments" tab page.

By throwing things at the API / test booking in Beds24 and watching what it returns, I have been able to figure out a few things. However throwing things at the API and observing the returns is a less then ideal approach to interacting / understanding the API. Any sort of documentation on this invoice structure and specifically the fields of type, type2, and qty would be extremely helpful.

edit: (note my post below this one about not using type2!)
edit2: (note my other post below about the meanings of type)

the small text below probably should be ignored in light of my additional posts about type2, type, and qty

What I have found so far:
Room rate: type=1, type2=0
"invoiceId": "01234567",
"description": "Aspen Cottage Wednesday, 1 July, 2020 - Friday, 3 July, 2020",
"status": "",
"qty": "1",
"price": "420.00",
"vatRate": "0.00",
"type": "1",
"type2": "0",
"invoiceeId": ""

Upsell* items: type=3, type2=1
*it seems in Beds24 upsell items are how additional sales tax & room tax are added
"invoiceId": "7654321",
"description": "WI sales tax + Door county room tax 11%",
"status": "",
"qty": "1",
"price": "46.20",
"vatRate": "0.00",
"type": "3",
"type2": "1",
"invoiceeId": ""

Payment: type=200, type2=0
"invoiceId": "01230123",
"description": "test payment",
"status": "test",
"qty": "-1",
"price": "10.00",
"vatRate": "0.00",
"type": "200",
"type2": "0",
"invoiceeId": ""
note the rather odd return of "-1" for the field qty. That has left me baffled.

also, in the setBooking / getBooking structure, there are fields like custom1, custom2, and etc that appear ideal for sticking an extra tag or id in to assist with syncing bookings between systems. Is there the same sort of field or fields in the invoice structure that can be used for that?

Re: Payment/Invoice items in getBookings API

Posted: Thu Apr 09, 2020 5:23 pm
by lea_5886
I received an interesting response!
Payments are a positive value with a minus quantity.

Type values less than 200 is a charge and type 200 or greater is a payment.

The type2 values are really for internal use and indicate an index to the source of the charge.
That answers some of my questions.

And appears to make it clear we should not be messing with the type2 value ourselves.

Happy day,

Re: Payment/Invoice items in getBookings API

Posted: Fri Apr 10, 2020 9:07 am
by lea_5886
I think figured out part of the meaning of type field.

type < 200 = invoice item
type >= 200 = payment

in addition, I am going to speculate:

When type is < 200 It loosely corresponds to the Booking Engine -> Upsell Items page. Initial Numerical value of type = primary key of item defined on Booking Engine -> Upsell Items page when created from beds24. ?Not necessary when created with setBooking?

type2 is used to designate source of charge, with ?type2="1" being obligatory tax item?. It is possible this is related to the items in the associated drop down menu box on the Booking Engine -> Upsell Items page.

?It seems the numbering of the type field determines the order items are displayed on the booking -> charges & payments page.?

?altering the type field in the invoice array is acceptable, as it only only effect order rather then function provided it remains less then 200 for invoice items, or >= 200 for payment items?

?In order to get additional taxable items on the invoice, they need to be added with a type number less then the obligatory tax type number, to achieve this one will likely have to alter the type field on the obligatory tax item.?

?In order to get additional non-taxable items on the invoice, they need to be added after the obligatory tax type id number?

?When type is >= 200 it is a payment, and once again the value of type determines the order payment is displayed, 200, 201, etc.?

Re: Payment/Invoice items in getBookings API

Posted: Thu Apr 16, 2020 2:51 pm
by markkinchin
The type and type2 values are used for the standard and custom reports within Beds24 to identify where the items originated.