cURL
curl --request GET \
--url https://api.uselotus.io/api/invoices/{invoice_id}/ \
--header 'Authorization: <api-key>'import requests
url = "https://api.uselotus.io/api/invoices/{invoice_id}/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.uselotus.io/api/invoices/{invoice_id}/', 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://api.uselotus.io/api/invoices/{invoice_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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://api.uselotus.io/api/invoices/{invoice_id}/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://api.uselotus.io/api/invoices/{invoice_id}/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uselotus.io/api/invoices/{invoice_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"invoice_id": "<string>",
"invoice_number": "<string>",
"cost_due": 5000000000,
"amount": 0,
"currency": {
"code": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"issue_date": "2023-11-07T05:31:56Z",
"payment_status": "draft",
"external_payment_obj_id": "<string>",
"external_payment_obj_type": "stripe",
"line_items": [
{
"name": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"quantity": 5000000000,
"billing_type": "in_arrears",
"metadata": {},
"plan": {
"plan_name": "<string>",
"plan_id": "<string>",
"version_id": "<string>",
"version": 123
},
"subscription_filters": [
{
"value": "<string>",
"property_name": "<string>"
}
],
"base": 0,
"adjustments": [
{
"amount": "<string>",
"account": "<string>",
"adjustment_type": "sales_tax"
}
],
"amount": 0,
"subtotal": 0
}
],
"customer": {
"customer_name": "<string>",
"email": "jsmith@example.com",
"customer_id": "<string>",
"address": {
"city": "<string>",
"country": "AW",
"line1": "<string>",
"postal_code": "<string>",
"line2": "<string>",
"state": "<string>"
}
},
"due_date": "2023-11-07T05:31:56Z",
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"seller": {
"name": "<string>",
"address": {
"city": "<string>",
"country": "AW",
"line1": "<string>",
"postal_code": "<string>",
"line2": "<string>",
"state": "<string>"
},
"phone": "<string>",
"email": "jsmith@example.com"
},
"invoice_pdf": "<string>",
"external_payment_obj_status": "<string>"
}Invoices
Get invoice
GET
/
api
/
invoices
/
{invoice_id}
/
cURL
curl --request GET \
--url https://api.uselotus.io/api/invoices/{invoice_id}/ \
--header 'Authorization: <api-key>'import requests
url = "https://api.uselotus.io/api/invoices/{invoice_id}/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.uselotus.io/api/invoices/{invoice_id}/', 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://api.uselotus.io/api/invoices/{invoice_id}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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://api.uselotus.io/api/invoices/{invoice_id}/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://api.uselotus.io/api/invoices/{invoice_id}/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.uselotus.io/api/invoices/{invoice_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"invoice_id": "<string>",
"invoice_number": "<string>",
"cost_due": 5000000000,
"amount": 0,
"currency": {
"code": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"issue_date": "2023-11-07T05:31:56Z",
"payment_status": "draft",
"external_payment_obj_id": "<string>",
"external_payment_obj_type": "stripe",
"line_items": [
{
"name": "<string>",
"start_date": "2023-11-07T05:31:56Z",
"end_date": "2023-11-07T05:31:56Z",
"quantity": 5000000000,
"billing_type": "in_arrears",
"metadata": {},
"plan": {
"plan_name": "<string>",
"plan_id": "<string>",
"version_id": "<string>",
"version": 123
},
"subscription_filters": [
{
"value": "<string>",
"property_name": "<string>"
}
],
"base": 0,
"adjustments": [
{
"amount": "<string>",
"account": "<string>",
"adjustment_type": "sales_tax"
}
],
"amount": 0,
"subtotal": 0
}
],
"customer": {
"customer_name": "<string>",
"email": "jsmith@example.com",
"customer_id": "<string>",
"address": {
"city": "<string>",
"country": "AW",
"line1": "<string>",
"postal_code": "<string>",
"line2": "<string>",
"state": "<string>"
}
},
"due_date": "2023-11-07T05:31:56Z",
"start_date": "2023-12-25",
"end_date": "2023-12-25",
"seller": {
"name": "<string>",
"address": {
"city": "<string>",
"country": "AW",
"line1": "<string>",
"postal_code": "<string>",
"line2": "<string>",
"state": "<string>"
},
"phone": "<string>",
"email": "jsmith@example.com"
},
"invoice_pdf": "<string>",
"external_payment_obj_status": "<string>"
}lotus.get_invoice(
invoice_id='plan_0569173ee6654369',
)
await lotus.getInvoice({
plan_id: "plan_0569173ee6654369",
}); // Will return a promise
Authorizations
knoxTokenAuthOrganizationApiKeyAuth
Token-based authentication with required prefix "Token"
Path Parameters
Response
200 - application/json
Required range:
0 <= x < 10000000000Required range:
-10000000000 < x < 10000000000Show child attributes
Show child attributes
draft- draftvoided- voidedpaid- paidunpaid- unpaid
Available options:
draft, voided, paid, unpaid stripe- Stripebraintree- Braintree
Available options:
stripe, braintree, null Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes