Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl --request POST \
--url http://localhost:3000/v2/billing/verification \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"org": "<string>",
"dataset": "<string>",
"includeUpcoming": true,
"toleranceCents": 0,
"maxOrgs": 50
}
'import requests
url = "http://localhost:3000/v2/billing/verification"
payload = {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"org": "<string>",
"dataset": "<string>",
"includeUpcoming": True,
"toleranceCents": 0,
"maxOrgs": 50
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
start: '2023-11-07T05:31:56Z',
end: '2023-11-07T05:31:56Z',
org: '<string>',
dataset: '<string>',
includeUpcoming: true,
toleranceCents: 0,
maxOrgs: 50
})
};
fetch('http://localhost:3000/v2/billing/verification', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v2/billing/verification",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'start' => '2023-11-07T05:31:56Z',
'end' => '2023-11-07T05:31:56Z',
'org' => '<string>',
'dataset' => '<string>',
'includeUpcoming' => true,
'toleranceCents' => 0,
'maxOrgs' => 50
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/v2/billing/verification"
payload := strings.NewReader("{\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"org\": \"<string>\",\n \"dataset\": \"<string>\",\n \"includeUpcoming\": true,\n \"toleranceCents\": 0,\n \"maxOrgs\": 50\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3000/v2/billing/verification")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"org\": \"<string>\",\n \"dataset\": \"<string>\",\n \"includeUpcoming\": true,\n \"toleranceCents\": 0,\n \"maxOrgs\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/billing/verification")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"org\": \"<string>\",\n \"dataset\": \"<string>\",\n \"includeUpcoming\": true,\n \"toleranceCents\": 0,\n \"maxOrgs\": 50\n}"
response = http.request(request)
puts response.read_body{
"object": "billing_verification",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"summary": {
"orgs": 12,
"meters": 8,
"expectedEvents": 120,
"expectedValue": 425000,
"usageRows": 118,
"sentRows": 117,
"sentValue": 420000,
"missingUsageRows": 2,
"missingStripeRows": 3,
"missingSamples": 5,
"databaseAmountCents": 425000,
"stripeInvoiceAmountCents": 420000,
"deltaCents": 5000,
"upcomingAmountCents": 110000,
"invoices": 2,
"invoiceLines": 14,
"diffs": 4,
"errors": 0
},
"rows": [
{
"orgId": "o_abc123",
"orgSlug": "acme",
"orgName": "Acme Ltda",
"meterEventName": "dataset_query.executed",
"expectedEvents": 40,
"expectedValue": 40000,
"usageRows": 40,
"sentRows": 40,
"missingUsageRows": 0,
"missingStripeRows": 0,
"sentValue": 40000,
"stripeInvoiceAmountCents": 40000,
"stripeUpcomingAmountCents": 40000,
"status": "ok",
"stripeCustomerId": "cus_abc123",
"stripeSubscriptionId": "sub_abc123",
"databaseAmountCents": 40000,
"deltaCents": 0,
"detail": "No Stripe customer on org",
"firstQueryAt": {},
"lastQueryAt": {}
}
],
"missingSamples": [
{
"queryId": "query_abc123",
"orgId": "o_abc123",
"orgSlug": "acme",
"datasetSlug": "dataset_slug",
"meterEventName": "dataset_query.executed",
"meterEventValue": 1000,
"createdAt": "2023-11-07T05:31:56Z",
"reason": "missing_stripe"
}
],
"invoiceLines": [
{
"orgId": "o_abc123",
"orgSlug": "acme",
"meterEventName": "dataset_query.executed",
"source": "invoice",
"amountCents": 40000,
"createdAt": "2023-11-07T05:31:56Z",
"invoiceId": "in_abc123",
"invoiceNumber": "INV-0001",
"status": "paid",
"quantity": 40,
"description": "Consumo de créditos"
}
]
}curl --request POST \
--url http://localhost:3000/v2/billing/verification \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"org": "<string>",
"dataset": "<string>",
"includeUpcoming": true,
"toleranceCents": 0,
"maxOrgs": 50
}
'import requests
url = "http://localhost:3000/v2/billing/verification"
payload = {
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"org": "<string>",
"dataset": "<string>",
"includeUpcoming": True,
"toleranceCents": 0,
"maxOrgs": 50
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
start: '2023-11-07T05:31:56Z',
end: '2023-11-07T05:31:56Z',
org: '<string>',
dataset: '<string>',
includeUpcoming: true,
toleranceCents: 0,
maxOrgs: 50
})
};
fetch('http://localhost:3000/v2/billing/verification', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/v2/billing/verification",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'start' => '2023-11-07T05:31:56Z',
'end' => '2023-11-07T05:31:56Z',
'org' => '<string>',
'dataset' => '<string>',
'includeUpcoming' => true,
'toleranceCents' => 0,
'maxOrgs' => 50
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/v2/billing/verification"
payload := strings.NewReader("{\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"org\": \"<string>\",\n \"dataset\": \"<string>\",\n \"includeUpcoming\": true,\n \"toleranceCents\": 0,\n \"maxOrgs\": 50\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:3000/v2/billing/verification")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"org\": \"<string>\",\n \"dataset\": \"<string>\",\n \"includeUpcoming\": true,\n \"toleranceCents\": 0,\n \"maxOrgs\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/v2/billing/verification")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"start\": \"2023-11-07T05:31:56Z\",\n \"end\": \"2023-11-07T05:31:56Z\",\n \"org\": \"<string>\",\n \"dataset\": \"<string>\",\n \"includeUpcoming\": true,\n \"toleranceCents\": 0,\n \"maxOrgs\": 50\n}"
response = http.request(request)
puts response.read_body{
"object": "billing_verification",
"start": "2023-11-07T05:31:56Z",
"end": "2023-11-07T05:31:56Z",
"summary": {
"orgs": 12,
"meters": 8,
"expectedEvents": 120,
"expectedValue": 425000,
"usageRows": 118,
"sentRows": 117,
"sentValue": 420000,
"missingUsageRows": 2,
"missingStripeRows": 3,
"missingSamples": 5,
"databaseAmountCents": 425000,
"stripeInvoiceAmountCents": 420000,
"deltaCents": 5000,
"upcomingAmountCents": 110000,
"invoices": 2,
"invoiceLines": 14,
"diffs": 4,
"errors": 0
},
"rows": [
{
"orgId": "o_abc123",
"orgSlug": "acme",
"orgName": "Acme Ltda",
"meterEventName": "dataset_query.executed",
"expectedEvents": 40,
"expectedValue": 40000,
"usageRows": 40,
"sentRows": 40,
"missingUsageRows": 0,
"missingStripeRows": 0,
"sentValue": 40000,
"stripeInvoiceAmountCents": 40000,
"stripeUpcomingAmountCents": 40000,
"status": "ok",
"stripeCustomerId": "cus_abc123",
"stripeSubscriptionId": "sub_abc123",
"databaseAmountCents": 40000,
"deltaCents": 0,
"detail": "No Stripe customer on org",
"firstQueryAt": {},
"lastQueryAt": {}
}
],
"missingSamples": [
{
"queryId": "query_abc123",
"orgId": "o_abc123",
"orgSlug": "acme",
"datasetSlug": "dataset_slug",
"meterEventName": "dataset_query.executed",
"meterEventValue": 1000,
"createdAt": "2023-11-07T05:31:56Z",
"reason": "missing_stripe"
}
],
"invoiceLines": [
{
"orgId": "o_abc123",
"orgSlug": "acme",
"meterEventName": "dataset_query.executed",
"source": "invoice",
"amountCents": 40000,
"createdAt": "2023-11-07T05:31:56Z",
"invoiceId": "in_abc123",
"invoiceNumber": "INV-0001",
"status": "paid",
"quantity": 40,
"description": "Consumo de créditos"
}
]
}OAuth2 Authorization Code flow
Inclusive period start for dataset query usage
Exclusive period end for dataset query usage
Org id, slug, or Stripe customer id
Dataset id or slug
Include Stripe upcoming invoice previews
Allowed amount delta in cents
x >= 0Maximum orgs to compare with Stripe; 0 means all
0 <= x <= 500billing_verification "billing_verification"
Show child attributes
Show child attributes
Show child attributes
Show child attributes