Get invoices for an order (incl. upcoming scheduled subscription invoices)
curl --request GET \
--url https://server.twicecommerce.com/v1/admin/orders/{orderId}/invoices \
--header 'X-API-KEY: <api-key>'import requests
url = "https://server.twicecommerce.com/v1/admin/orders/{orderId}/invoices"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://server.twicecommerce.com/v1/admin/orders/{orderId}/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://server.twicecommerce.com/v1/admin/orders/{orderId}/invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://server.twicecommerce.com/v1/admin/orders/{orderId}/invoices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://server.twicecommerce.com/v1/admin/orders/{orderId}/invoices")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.twicecommerce.com/v1/admin/orders/{orderId}/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"type": "invoice",
"number": 123,
"status": "draft",
"pricing": {
"currency": "<string>",
"total": 0,
"subtotal": 0,
"totalTaxes": 0,
"totalDiscounts": 0,
"taxExcluded": true,
"taxLines": [
{
"price": 0,
"rate": 123,
"combinedLabel": {
"def": "<string>"
},
"label": {
"def": "<string>"
},
"taxableAmount": 0
}
],
"listPrice": 0,
"originalListPrice": 0,
"additionalInfo": "<string>",
"discountCodes": {},
"manualDiscount": 0,
"deposit": 0
},
"capturedTotal": 123,
"refundedTotal": 123,
"issuedAt": "<string>",
"dueAt": "<string>",
"crmCustomerId": "<string>",
"lines": {
"id": "<string>",
"invoiceId": "<string>",
"type": "line_item",
"subscriptionId": "<string>",
"periodStart": "<string>",
"periodEnd": "<string>",
"name": "<string>",
"quantity": 123,
"pricing": {
"currency": "<string>",
"total": 0,
"subtotal": 0,
"totalTaxes": 0,
"totalDiscounts": 0,
"taxExcluded": true,
"taxLines": [
{
"price": 0,
"rate": 123,
"combinedLabel": {
"def": "<string>"
},
"label": {
"def": "<string>"
},
"taxableAmount": 0
}
],
"listPrice": 0,
"originalListPrice": 0,
"additionalInfo": "<string>",
"discountCodes": {},
"manualDiscount": 0,
"deposit": 0
},
"capturedTotal": 123,
"refundedTotal": 123,
"createdAt": "<string>",
"updatedAt": "<string>",
"orderLineItemId": "<string>",
"purchaseType": "booking",
"meta": "<unknown>"
},
"createdAt": "<string>",
"updatedAt": "<string>",
"orderId": "<string>",
"originalInvoiceId": "<string>",
"source": "solteq_pos",
"tenantInfo": {
"name": "<string>",
"legalName": "<string>",
"businessId": "<string>",
"address": "<string>",
"phone": "<string>"
},
"customerSnapshot": {
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phone": "<string>",
"address": "<string>",
"businessId": "<string>"
}
}Lists invoices issued for the order, e.g. subscription billing cycles, with their payment status.
GET
/
v1
/
admin
/
orders
/
{orderId}
/
invoices
Get invoices for an order (incl. upcoming scheduled subscription invoices)
curl --request GET \
--url https://server.twicecommerce.com/v1/admin/orders/{orderId}/invoices \
--header 'X-API-KEY: <api-key>'import requests
url = "https://server.twicecommerce.com/v1/admin/orders/{orderId}/invoices"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://server.twicecommerce.com/v1/admin/orders/{orderId}/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://server.twicecommerce.com/v1/admin/orders/{orderId}/invoices",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://server.twicecommerce.com/v1/admin/orders/{orderId}/invoices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://server.twicecommerce.com/v1/admin/orders/{orderId}/invoices")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.twicecommerce.com/v1/admin/orders/{orderId}/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"type": "invoice",
"number": 123,
"status": "draft",
"pricing": {
"currency": "<string>",
"total": 0,
"subtotal": 0,
"totalTaxes": 0,
"totalDiscounts": 0,
"taxExcluded": true,
"taxLines": [
{
"price": 0,
"rate": 123,
"combinedLabel": {
"def": "<string>"
},
"label": {
"def": "<string>"
},
"taxableAmount": 0
}
],
"listPrice": 0,
"originalListPrice": 0,
"additionalInfo": "<string>",
"discountCodes": {},
"manualDiscount": 0,
"deposit": 0
},
"capturedTotal": 123,
"refundedTotal": 123,
"issuedAt": "<string>",
"dueAt": "<string>",
"crmCustomerId": "<string>",
"lines": {
"id": "<string>",
"invoiceId": "<string>",
"type": "line_item",
"subscriptionId": "<string>",
"periodStart": "<string>",
"periodEnd": "<string>",
"name": "<string>",
"quantity": 123,
"pricing": {
"currency": "<string>",
"total": 0,
"subtotal": 0,
"totalTaxes": 0,
"totalDiscounts": 0,
"taxExcluded": true,
"taxLines": [
{
"price": 0,
"rate": 123,
"combinedLabel": {
"def": "<string>"
},
"label": {
"def": "<string>"
},
"taxableAmount": 0
}
],
"listPrice": 0,
"originalListPrice": 0,
"additionalInfo": "<string>",
"discountCodes": {},
"manualDiscount": 0,
"deposit": 0
},
"capturedTotal": 123,
"refundedTotal": 123,
"createdAt": "<string>",
"updatedAt": "<string>",
"orderLineItemId": "<string>",
"purchaseType": "booking",
"meta": "<unknown>"
},
"createdAt": "<string>",
"updatedAt": "<string>",
"orderId": "<string>",
"originalInvoiceId": "<string>",
"source": "solteq_pos",
"tenantInfo": {
"name": "<string>",
"legalName": "<string>",
"businessId": "<string>",
"address": "<string>",
"phone": "<string>"
},
"customerSnapshot": {
"firstName": "<string>",
"lastName": "<string>",
"email": "<string>",
"phone": "<string>",
"address": "<string>",
"businessId": "<string>"
}
}Authorizations
API key for the Twice API
Path Parameters
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Query Parameters
Available options:
true, false Response
200
Available options:
invoice Available options:
draft, open, cancelled, uncollectible, scheduled Hide child attributes
Hide child attributes
Required range:
-9007199254740991 <= x <= 9007199254740991Required range:
-9007199254740991 <= x <= 9007199254740991Required range:
-9007199254740991 <= x <= 9007199254740991Required range:
-9007199254740991 <= x <= 9007199254740991Hide child attributes
Hide child attributes
Required range:
-9007199254740991 <= x <= 9007199254740991Required range:
-9007199254740991 <= x <= 9007199254740991Required range:
-9007199254740991 <= x <= 9007199254740991Required range:
-9007199254740991 <= x <= 9007199254740991Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Required range:
-9007199254740991 <= x <= 9007199254740991Required range:
-9007199254740991 <= x <= 9007199254740991Hide child attributes
Hide child attributes
Available options:
line_item, shipping, deposit, fee, rounding Hide child attributes
Hide child attributes
Required range:
-9007199254740991 <= x <= 9007199254740991Required range:
-9007199254740991 <= x <= 9007199254740991Required range:
-9007199254740991 <= x <= 9007199254740991Required range:
-9007199254740991 <= x <= 9007199254740991Hide child attributes
Hide child attributes
Required range:
-9007199254740991 <= x <= 9007199254740991Required range:
-9007199254740991 <= x <= 9007199254740991Required range:
-9007199254740991 <= x <= 9007199254740991Required range:
-9007199254740991 <= x <= 9007199254740991Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Required range:
-9007199254740991 <= x <= 9007199254740991Required range:
-9007199254740991 <= x <= 9007199254740991Available options:
booking, sale, subscription, buyback Available options:
solteq_pos Was this page helpful?