Accounting API
Invoices
Upcoming Subscription Invoice
path parameters id the id of the subscription to retrieve require "uri" require "net/http" url = uri("https //api tamio com/v2/invoices/upcoming/6e2fa1c1 35c1 416c 9b5c ea277f6ae390") https = net http new(url host, url port) https use ssl = true request = net http get new(url) request\["accept"] = "application/json" request\["authorization"] = "bearer your token here" response = https request(request) puts response read body var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("authorization", "bearer your token here"); var requestoptions = { method 'get', headers myheaders }; fetch("https //api tamio com/v2/invoices/upcoming/6e2fa1c1 35c1 416c 9b5c ea277f6ae390", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));curl location request get 'https //api tamio com/v2/invoices/upcoming/6e2fa1c1 35c1 416c 9b5c ea277f6ae390' \\ \ header 'accept application/json' \\ \ header 'authorization bearer your token here'import requests url = "https //api tamio com/v2/invoices/upcoming/6e2fa1c1 35c1 416c 9b5c ea277f6ae390" payload={} headers = { 'accept' 'application/json', 'authorization' 'bearer your token here' } response = requests request("get", url, headers=headers, data=payload) print(response text) { "status" 200, "invoice" { "object" "upcoming invoice", "affiliate" null, "site" null, "customer information" { "name" "mike", "email" "mike\@example com", "country" "de", "locale" "en", "last name" "doe", "id" "ecd97edb 9799 452d bc18 d7b70374d8b4", "stripe customer id" "cus mtqxjc9mbma759", "billing information" { "id" "d51b7096 2a38 47d1 94ff 6c5942763228", "phone" "+123456789", "object" "address", "name" "mike", "representative" null, "email" "mike\@example com", "address" "awesome address", "city" "frankfurt", "postcode" null, "state" null, "country" "de", "locale" "en", "shipping address" false, "ip" null, "is company" false }, "shipping information" {} }, "payments" \[], "locale" "en", "instalments" { "plans" \[], "selected plan" null }, "taxes" { "tax rates" \[ { "id" null, "rate percent" 19, "rate amount" null, "label" "mwst ", "tax" 160, "moss" false, "jurisdiction" "de", "inclusive" true, "vat tax" true, "stripe tax id" "txr 1melh2eje1uz2ukgnbjrf6fx", "applies to" \[ "686e231a e9b1 4e6b 85f3 a764beb4045a" ] } ], "shipping tax rates" \[], "has vat" true }, "shipping" { "has shipping" false, "shipping rates" \[], "item count" 0, "packages" \[] }, "currency" "eur", "products" \[ { "name" "invoice item", "quantity" 1, "type" "billing plan", "classification" "recurring invoice item", "is preorder" false, "is moss product" false, "currency" "eur", "id" "686e231a e9b1 4e6b 85f3 a764beb4045a", "start date" 1673567157, "end date" 1676245557, "taxes" { "inclusive" true, "tax rates" \[ { "id" null, "rate percent" 19, "rate amount" null, "label" "mwst ", "tax" 160, "moss" false, "jurisdiction" "de", "inclusive" true, "vat tax" true, "stripe tax id" "txr 1melh2eje1uz2ukgnbjrf6fx" } ], "shipping tax rates" \[] }, "totals" { "unit price" 1000, "item total" 1000, "item total with tax" 1160, "total" 1160, "discount" 0, "shipping subtotal" 0, "shipping discount" 0, "shipping tax" 0, "shipping" 0, "shipping total" 0, "tax" 160, "subtotal" 1000, "exchange rate" null, "price conversion" false, "moss taxable amount" 0, "moss tax total" 0 }, "reservations" \[], "discounts" \[], "has shipping" false, "variation id" null, "is variant" false, "billing cycle" "month", "interval" 1, "stripe price id" "price 1mekmaeje1uz2ukgdetzllkq" } ], "totals" { "tax" 160, "shipping" 0, "shipping tax" 0, "subtotal" 1000, "total" 1000, "discount" 0, "item count" 1, "shipping discount" 0, "item total with tax" 1160, "shipping subtotal" 0, "price conversion" false, "item total" 1000, "moss tax total" 0, "moss taxable amount" 0, "trial deductions" 0, "shipping total" 0 }, "discounts" \[], "start date" 1670888757, "end date" 1673567157, "recurring" true, "payment" "stripe" } }