Add a usage entry for an add-on that bills for usage at the end of the month.
curl --request POST \
--url https://{subdomain}.outseta.com/api/v1/billing/usage \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"Uid": "string",
"_objectType": "string",
"ActivityEventData": {},
"UsageDate": "string",
"Invoice": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"InvoiceDate": "string",
"PaymentReminderSentDate": "string",
"Number": 0,
"BillingInvoiceStatus": 1,
"Subscription": {},
"Amount": 0,
"AmountOutstanding": 0,
"InvoiceLineItems": [],
"IsUserGenerated": false,
"StripeTaxCalculationId": "string",
"StripeTaxBehavior": "string",
"AmountCredit": 0,
"AmountDiscount": 0,
"AmountPaid": 0,
"AmountRefunded": 0,
"AmountSubtotal": 0,
"AmountTax": 0,
"AmountTaxRefunded": 0,
"IsTaxable": false,
"HasPaymentGatewayTransactions": false,
"StripePaymentTransactionIds": "string",
"StripeRefundTransactionIds": "string",
"StripeTaxRefundTransactionIds": "string"
},
"SubscriptionAddOn": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"BillingRenewalTerm": 1,
"Subscription": {},
"AddOn": {},
"Quantity": 0,
"StartDate": "string",
"EndDate": "string",
"ExpirationDate": "string",
"RenewalDate": "string",
"NewRequiredQuantity": 0,
"Rate": 0
},
"Amount": 0,
"AdditionalUsageData": "string"
}
'import requests
url = "https://{subdomain}.outseta.com/api/v1/billing/usage"
payload = {
"Uid": "string",
"_objectType": "string",
"ActivityEventData": {},
"UsageDate": "string",
"Invoice": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"InvoiceDate": "string",
"PaymentReminderSentDate": "string",
"Number": 0,
"BillingInvoiceStatus": 1,
"Subscription": {},
"Amount": 0,
"AmountOutstanding": 0,
"InvoiceLineItems": [],
"IsUserGenerated": False,
"StripeTaxCalculationId": "string",
"StripeTaxBehavior": "string",
"AmountCredit": 0,
"AmountDiscount": 0,
"AmountPaid": 0,
"AmountRefunded": 0,
"AmountSubtotal": 0,
"AmountTax": 0,
"AmountTaxRefunded": 0,
"IsTaxable": False,
"HasPaymentGatewayTransactions": False,
"StripePaymentTransactionIds": "string",
"StripeRefundTransactionIds": "string",
"StripeTaxRefundTransactionIds": "string"
},
"SubscriptionAddOn": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"BillingRenewalTerm": 1,
"Subscription": {},
"AddOn": {},
"Quantity": 0,
"StartDate": "string",
"EndDate": "string",
"ExpirationDate": "string",
"RenewalDate": "string",
"NewRequiredQuantity": 0,
"Rate": 0
},
"Amount": 0,
"AdditionalUsageData": "string"
}
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({
Uid: 'string',
_objectType: 'string',
ActivityEventData: {},
UsageDate: 'string',
Invoice: {
Uid: 'string',
_objectType: 'string',
Created: 'string',
Updated: 'string',
ActivityEventData: {},
InvoiceDate: 'string',
PaymentReminderSentDate: 'string',
Number: 0,
BillingInvoiceStatus: 1,
Subscription: {},
Amount: 0,
AmountOutstanding: 0,
InvoiceLineItems: [],
IsUserGenerated: false,
StripeTaxCalculationId: 'string',
StripeTaxBehavior: 'string',
AmountCredit: 0,
AmountDiscount: 0,
AmountPaid: 0,
AmountRefunded: 0,
AmountSubtotal: 0,
AmountTax: 0,
AmountTaxRefunded: 0,
IsTaxable: false,
HasPaymentGatewayTransactions: false,
StripePaymentTransactionIds: 'string',
StripeRefundTransactionIds: 'string',
StripeTaxRefundTransactionIds: 'string'
},
SubscriptionAddOn: {
Uid: 'string',
_objectType: 'string',
Created: 'string',
Updated: 'string',
ActivityEventData: {},
BillingRenewalTerm: 1,
Subscription: {},
AddOn: {},
Quantity: 0,
StartDate: 'string',
EndDate: 'string',
ExpirationDate: 'string',
RenewalDate: 'string',
NewRequiredQuantity: 0,
Rate: 0
},
Amount: 0,
AdditionalUsageData: 'string'
})
};
fetch('https://{subdomain}.outseta.com/api/v1/billing/usage', 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://{subdomain}.outseta.com/api/v1/billing/usage",
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([
'Uid' => 'string',
'_objectType' => 'string',
'ActivityEventData' => [
],
'UsageDate' => 'string',
'Invoice' => [
'Uid' => 'string',
'_objectType' => 'string',
'Created' => 'string',
'Updated' => 'string',
'ActivityEventData' => [
],
'InvoiceDate' => 'string',
'PaymentReminderSentDate' => 'string',
'Number' => 0,
'BillingInvoiceStatus' => 1,
'Subscription' => [
],
'Amount' => 0,
'AmountOutstanding' => 0,
'InvoiceLineItems' => [
],
'IsUserGenerated' => false,
'StripeTaxCalculationId' => 'string',
'StripeTaxBehavior' => 'string',
'AmountCredit' => 0,
'AmountDiscount' => 0,
'AmountPaid' => 0,
'AmountRefunded' => 0,
'AmountSubtotal' => 0,
'AmountTax' => 0,
'AmountTaxRefunded' => 0,
'IsTaxable' => false,
'HasPaymentGatewayTransactions' => false,
'StripePaymentTransactionIds' => 'string',
'StripeRefundTransactionIds' => 'string',
'StripeTaxRefundTransactionIds' => 'string'
],
'SubscriptionAddOn' => [
'Uid' => 'string',
'_objectType' => 'string',
'Created' => 'string',
'Updated' => 'string',
'ActivityEventData' => [
],
'BillingRenewalTerm' => 1,
'Subscription' => [
],
'AddOn' => [
],
'Quantity' => 0,
'StartDate' => 'string',
'EndDate' => 'string',
'ExpirationDate' => 'string',
'RenewalDate' => 'string',
'NewRequiredQuantity' => 0,
'Rate' => 0
],
'Amount' => 0,
'AdditionalUsageData' => 'string'
]),
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 := "https://{subdomain}.outseta.com/api/v1/billing/usage"
payload := strings.NewReader("{\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"ActivityEventData\": {},\n \"UsageDate\": \"string\",\n \"Invoice\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"InvoiceDate\": \"string\",\n \"PaymentReminderSentDate\": \"string\",\n \"Number\": 0,\n \"BillingInvoiceStatus\": 1,\n \"Subscription\": {},\n \"Amount\": 0,\n \"AmountOutstanding\": 0,\n \"InvoiceLineItems\": [],\n \"IsUserGenerated\": false,\n \"StripeTaxCalculationId\": \"string\",\n \"StripeTaxBehavior\": \"string\",\n \"AmountCredit\": 0,\n \"AmountDiscount\": 0,\n \"AmountPaid\": 0,\n \"AmountRefunded\": 0,\n \"AmountSubtotal\": 0,\n \"AmountTax\": 0,\n \"AmountTaxRefunded\": 0,\n \"IsTaxable\": false,\n \"HasPaymentGatewayTransactions\": false,\n \"StripePaymentTransactionIds\": \"string\",\n \"StripeRefundTransactionIds\": \"string\",\n \"StripeTaxRefundTransactionIds\": \"string\"\n },\n \"SubscriptionAddOn\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"BillingRenewalTerm\": 1,\n \"Subscription\": {},\n \"AddOn\": {},\n \"Quantity\": 0,\n \"StartDate\": \"string\",\n \"EndDate\": \"string\",\n \"ExpirationDate\": \"string\",\n \"RenewalDate\": \"string\",\n \"NewRequiredQuantity\": 0,\n \"Rate\": 0\n },\n \"Amount\": 0,\n \"AdditionalUsageData\": \"string\"\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("https://{subdomain}.outseta.com/api/v1/billing/usage")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"ActivityEventData\": {},\n \"UsageDate\": \"string\",\n \"Invoice\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"InvoiceDate\": \"string\",\n \"PaymentReminderSentDate\": \"string\",\n \"Number\": 0,\n \"BillingInvoiceStatus\": 1,\n \"Subscription\": {},\n \"Amount\": 0,\n \"AmountOutstanding\": 0,\n \"InvoiceLineItems\": [],\n \"IsUserGenerated\": false,\n \"StripeTaxCalculationId\": \"string\",\n \"StripeTaxBehavior\": \"string\",\n \"AmountCredit\": 0,\n \"AmountDiscount\": 0,\n \"AmountPaid\": 0,\n \"AmountRefunded\": 0,\n \"AmountSubtotal\": 0,\n \"AmountTax\": 0,\n \"AmountTaxRefunded\": 0,\n \"IsTaxable\": false,\n \"HasPaymentGatewayTransactions\": false,\n \"StripePaymentTransactionIds\": \"string\",\n \"StripeRefundTransactionIds\": \"string\",\n \"StripeTaxRefundTransactionIds\": \"string\"\n },\n \"SubscriptionAddOn\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"BillingRenewalTerm\": 1,\n \"Subscription\": {},\n \"AddOn\": {},\n \"Quantity\": 0,\n \"StartDate\": \"string\",\n \"EndDate\": \"string\",\n \"ExpirationDate\": \"string\",\n \"RenewalDate\": \"string\",\n \"NewRequiredQuantity\": 0,\n \"Rate\": 0\n },\n \"Amount\": 0,\n \"AdditionalUsageData\": \"string\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.outseta.com/api/v1/billing/usage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"ActivityEventData\": {},\n \"UsageDate\": \"string\",\n \"Invoice\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"InvoiceDate\": \"string\",\n \"PaymentReminderSentDate\": \"string\",\n \"Number\": 0,\n \"BillingInvoiceStatus\": 1,\n \"Subscription\": {},\n \"Amount\": 0,\n \"AmountOutstanding\": 0,\n \"InvoiceLineItems\": [],\n \"IsUserGenerated\": false,\n \"StripeTaxCalculationId\": \"string\",\n \"StripeTaxBehavior\": \"string\",\n \"AmountCredit\": 0,\n \"AmountDiscount\": 0,\n \"AmountPaid\": 0,\n \"AmountRefunded\": 0,\n \"AmountSubtotal\": 0,\n \"AmountTax\": 0,\n \"AmountTaxRefunded\": 0,\n \"IsTaxable\": false,\n \"HasPaymentGatewayTransactions\": false,\n \"StripePaymentTransactionIds\": \"string\",\n \"StripeRefundTransactionIds\": \"string\",\n \"StripeTaxRefundTransactionIds\": \"string\"\n },\n \"SubscriptionAddOn\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"BillingRenewalTerm\": 1,\n \"Subscription\": {},\n \"AddOn\": {},\n \"Quantity\": 0,\n \"StartDate\": \"string\",\n \"EndDate\": \"string\",\n \"ExpirationDate\": \"string\",\n \"RenewalDate\": \"string\",\n \"NewRequiredQuantity\": 0,\n \"Rate\": 0\n },\n \"Amount\": 0,\n \"AdditionalUsageData\": \"string\"\n}"
response = http.request(request)
puts response.read_body{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"UsageDate": "string",
"Invoice": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"InvoiceDate": "string",
"PaymentReminderSentDate": "string",
"Number": 0,
"BillingInvoiceStatus": 1,
"Subscription": {},
"Amount": 0,
"AmountOutstanding": 0,
"InvoiceLineItems": [],
"IsUserGenerated": false,
"StripeTaxCalculationId": "string",
"StripeTaxBehavior": "string",
"AmountCredit": 0,
"AmountDiscount": 0,
"AmountPaid": 0,
"AmountRefunded": 0,
"AmountSubtotal": 0,
"AmountTax": 0,
"AmountTaxRefunded": 0,
"IsTaxable": false,
"HasPaymentGatewayTransactions": false,
"StripePaymentTransactionIds": "string",
"StripeRefundTransactionIds": "string",
"StripeTaxRefundTransactionIds": "string"
},
"SubscriptionAddOn": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"BillingRenewalTerm": 1,
"Subscription": {},
"AddOn": {},
"Quantity": 0,
"StartDate": "string",
"EndDate": "string",
"ExpirationDate": "string",
"RenewalDate": "string",
"NewRequiredQuantity": 0,
"Rate": 0
},
"Amount": 0,
"AdditionalUsageData": "string"
}Subscriptions
Add a usage entry for an add-on that bills for usage at the end of the month.
POST
/
api
/
v1
/
billing
/
usage
Add a usage entry for an add-on that bills for usage at the end of the month.
curl --request POST \
--url https://{subdomain}.outseta.com/api/v1/billing/usage \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"Uid": "string",
"_objectType": "string",
"ActivityEventData": {},
"UsageDate": "string",
"Invoice": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"InvoiceDate": "string",
"PaymentReminderSentDate": "string",
"Number": 0,
"BillingInvoiceStatus": 1,
"Subscription": {},
"Amount": 0,
"AmountOutstanding": 0,
"InvoiceLineItems": [],
"IsUserGenerated": false,
"StripeTaxCalculationId": "string",
"StripeTaxBehavior": "string",
"AmountCredit": 0,
"AmountDiscount": 0,
"AmountPaid": 0,
"AmountRefunded": 0,
"AmountSubtotal": 0,
"AmountTax": 0,
"AmountTaxRefunded": 0,
"IsTaxable": false,
"HasPaymentGatewayTransactions": false,
"StripePaymentTransactionIds": "string",
"StripeRefundTransactionIds": "string",
"StripeTaxRefundTransactionIds": "string"
},
"SubscriptionAddOn": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"BillingRenewalTerm": 1,
"Subscription": {},
"AddOn": {},
"Quantity": 0,
"StartDate": "string",
"EndDate": "string",
"ExpirationDate": "string",
"RenewalDate": "string",
"NewRequiredQuantity": 0,
"Rate": 0
},
"Amount": 0,
"AdditionalUsageData": "string"
}
'import requests
url = "https://{subdomain}.outseta.com/api/v1/billing/usage"
payload = {
"Uid": "string",
"_objectType": "string",
"ActivityEventData": {},
"UsageDate": "string",
"Invoice": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"InvoiceDate": "string",
"PaymentReminderSentDate": "string",
"Number": 0,
"BillingInvoiceStatus": 1,
"Subscription": {},
"Amount": 0,
"AmountOutstanding": 0,
"InvoiceLineItems": [],
"IsUserGenerated": False,
"StripeTaxCalculationId": "string",
"StripeTaxBehavior": "string",
"AmountCredit": 0,
"AmountDiscount": 0,
"AmountPaid": 0,
"AmountRefunded": 0,
"AmountSubtotal": 0,
"AmountTax": 0,
"AmountTaxRefunded": 0,
"IsTaxable": False,
"HasPaymentGatewayTransactions": False,
"StripePaymentTransactionIds": "string",
"StripeRefundTransactionIds": "string",
"StripeTaxRefundTransactionIds": "string"
},
"SubscriptionAddOn": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"BillingRenewalTerm": 1,
"Subscription": {},
"AddOn": {},
"Quantity": 0,
"StartDate": "string",
"EndDate": "string",
"ExpirationDate": "string",
"RenewalDate": "string",
"NewRequiredQuantity": 0,
"Rate": 0
},
"Amount": 0,
"AdditionalUsageData": "string"
}
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({
Uid: 'string',
_objectType: 'string',
ActivityEventData: {},
UsageDate: 'string',
Invoice: {
Uid: 'string',
_objectType: 'string',
Created: 'string',
Updated: 'string',
ActivityEventData: {},
InvoiceDate: 'string',
PaymentReminderSentDate: 'string',
Number: 0,
BillingInvoiceStatus: 1,
Subscription: {},
Amount: 0,
AmountOutstanding: 0,
InvoiceLineItems: [],
IsUserGenerated: false,
StripeTaxCalculationId: 'string',
StripeTaxBehavior: 'string',
AmountCredit: 0,
AmountDiscount: 0,
AmountPaid: 0,
AmountRefunded: 0,
AmountSubtotal: 0,
AmountTax: 0,
AmountTaxRefunded: 0,
IsTaxable: false,
HasPaymentGatewayTransactions: false,
StripePaymentTransactionIds: 'string',
StripeRefundTransactionIds: 'string',
StripeTaxRefundTransactionIds: 'string'
},
SubscriptionAddOn: {
Uid: 'string',
_objectType: 'string',
Created: 'string',
Updated: 'string',
ActivityEventData: {},
BillingRenewalTerm: 1,
Subscription: {},
AddOn: {},
Quantity: 0,
StartDate: 'string',
EndDate: 'string',
ExpirationDate: 'string',
RenewalDate: 'string',
NewRequiredQuantity: 0,
Rate: 0
},
Amount: 0,
AdditionalUsageData: 'string'
})
};
fetch('https://{subdomain}.outseta.com/api/v1/billing/usage', 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://{subdomain}.outseta.com/api/v1/billing/usage",
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([
'Uid' => 'string',
'_objectType' => 'string',
'ActivityEventData' => [
],
'UsageDate' => 'string',
'Invoice' => [
'Uid' => 'string',
'_objectType' => 'string',
'Created' => 'string',
'Updated' => 'string',
'ActivityEventData' => [
],
'InvoiceDate' => 'string',
'PaymentReminderSentDate' => 'string',
'Number' => 0,
'BillingInvoiceStatus' => 1,
'Subscription' => [
],
'Amount' => 0,
'AmountOutstanding' => 0,
'InvoiceLineItems' => [
],
'IsUserGenerated' => false,
'StripeTaxCalculationId' => 'string',
'StripeTaxBehavior' => 'string',
'AmountCredit' => 0,
'AmountDiscount' => 0,
'AmountPaid' => 0,
'AmountRefunded' => 0,
'AmountSubtotal' => 0,
'AmountTax' => 0,
'AmountTaxRefunded' => 0,
'IsTaxable' => false,
'HasPaymentGatewayTransactions' => false,
'StripePaymentTransactionIds' => 'string',
'StripeRefundTransactionIds' => 'string',
'StripeTaxRefundTransactionIds' => 'string'
],
'SubscriptionAddOn' => [
'Uid' => 'string',
'_objectType' => 'string',
'Created' => 'string',
'Updated' => 'string',
'ActivityEventData' => [
],
'BillingRenewalTerm' => 1,
'Subscription' => [
],
'AddOn' => [
],
'Quantity' => 0,
'StartDate' => 'string',
'EndDate' => 'string',
'ExpirationDate' => 'string',
'RenewalDate' => 'string',
'NewRequiredQuantity' => 0,
'Rate' => 0
],
'Amount' => 0,
'AdditionalUsageData' => 'string'
]),
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 := "https://{subdomain}.outseta.com/api/v1/billing/usage"
payload := strings.NewReader("{\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"ActivityEventData\": {},\n \"UsageDate\": \"string\",\n \"Invoice\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"InvoiceDate\": \"string\",\n \"PaymentReminderSentDate\": \"string\",\n \"Number\": 0,\n \"BillingInvoiceStatus\": 1,\n \"Subscription\": {},\n \"Amount\": 0,\n \"AmountOutstanding\": 0,\n \"InvoiceLineItems\": [],\n \"IsUserGenerated\": false,\n \"StripeTaxCalculationId\": \"string\",\n \"StripeTaxBehavior\": \"string\",\n \"AmountCredit\": 0,\n \"AmountDiscount\": 0,\n \"AmountPaid\": 0,\n \"AmountRefunded\": 0,\n \"AmountSubtotal\": 0,\n \"AmountTax\": 0,\n \"AmountTaxRefunded\": 0,\n \"IsTaxable\": false,\n \"HasPaymentGatewayTransactions\": false,\n \"StripePaymentTransactionIds\": \"string\",\n \"StripeRefundTransactionIds\": \"string\",\n \"StripeTaxRefundTransactionIds\": \"string\"\n },\n \"SubscriptionAddOn\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"BillingRenewalTerm\": 1,\n \"Subscription\": {},\n \"AddOn\": {},\n \"Quantity\": 0,\n \"StartDate\": \"string\",\n \"EndDate\": \"string\",\n \"ExpirationDate\": \"string\",\n \"RenewalDate\": \"string\",\n \"NewRequiredQuantity\": 0,\n \"Rate\": 0\n },\n \"Amount\": 0,\n \"AdditionalUsageData\": \"string\"\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("https://{subdomain}.outseta.com/api/v1/billing/usage")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"ActivityEventData\": {},\n \"UsageDate\": \"string\",\n \"Invoice\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"InvoiceDate\": \"string\",\n \"PaymentReminderSentDate\": \"string\",\n \"Number\": 0,\n \"BillingInvoiceStatus\": 1,\n \"Subscription\": {},\n \"Amount\": 0,\n \"AmountOutstanding\": 0,\n \"InvoiceLineItems\": [],\n \"IsUserGenerated\": false,\n \"StripeTaxCalculationId\": \"string\",\n \"StripeTaxBehavior\": \"string\",\n \"AmountCredit\": 0,\n \"AmountDiscount\": 0,\n \"AmountPaid\": 0,\n \"AmountRefunded\": 0,\n \"AmountSubtotal\": 0,\n \"AmountTax\": 0,\n \"AmountTaxRefunded\": 0,\n \"IsTaxable\": false,\n \"HasPaymentGatewayTransactions\": false,\n \"StripePaymentTransactionIds\": \"string\",\n \"StripeRefundTransactionIds\": \"string\",\n \"StripeTaxRefundTransactionIds\": \"string\"\n },\n \"SubscriptionAddOn\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"BillingRenewalTerm\": 1,\n \"Subscription\": {},\n \"AddOn\": {},\n \"Quantity\": 0,\n \"StartDate\": \"string\",\n \"EndDate\": \"string\",\n \"ExpirationDate\": \"string\",\n \"RenewalDate\": \"string\",\n \"NewRequiredQuantity\": 0,\n \"Rate\": 0\n },\n \"Amount\": 0,\n \"AdditionalUsageData\": \"string\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.outseta.com/api/v1/billing/usage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"ActivityEventData\": {},\n \"UsageDate\": \"string\",\n \"Invoice\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"InvoiceDate\": \"string\",\n \"PaymentReminderSentDate\": \"string\",\n \"Number\": 0,\n \"BillingInvoiceStatus\": 1,\n \"Subscription\": {},\n \"Amount\": 0,\n \"AmountOutstanding\": 0,\n \"InvoiceLineItems\": [],\n \"IsUserGenerated\": false,\n \"StripeTaxCalculationId\": \"string\",\n \"StripeTaxBehavior\": \"string\",\n \"AmountCredit\": 0,\n \"AmountDiscount\": 0,\n \"AmountPaid\": 0,\n \"AmountRefunded\": 0,\n \"AmountSubtotal\": 0,\n \"AmountTax\": 0,\n \"AmountTaxRefunded\": 0,\n \"IsTaxable\": false,\n \"HasPaymentGatewayTransactions\": false,\n \"StripePaymentTransactionIds\": \"string\",\n \"StripeRefundTransactionIds\": \"string\",\n \"StripeTaxRefundTransactionIds\": \"string\"\n },\n \"SubscriptionAddOn\": {\n \"Uid\": \"string\",\n \"_objectType\": \"string\",\n \"Created\": \"string\",\n \"Updated\": \"string\",\n \"ActivityEventData\": {},\n \"BillingRenewalTerm\": 1,\n \"Subscription\": {},\n \"AddOn\": {},\n \"Quantity\": 0,\n \"StartDate\": \"string\",\n \"EndDate\": \"string\",\n \"ExpirationDate\": \"string\",\n \"RenewalDate\": \"string\",\n \"NewRequiredQuantity\": 0,\n \"Rate\": 0\n },\n \"Amount\": 0,\n \"AdditionalUsageData\": \"string\"\n}"
response = http.request(request)
puts response.read_body{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"UsageDate": "string",
"Invoice": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"InvoiceDate": "string",
"PaymentReminderSentDate": "string",
"Number": 0,
"BillingInvoiceStatus": 1,
"Subscription": {},
"Amount": 0,
"AmountOutstanding": 0,
"InvoiceLineItems": [],
"IsUserGenerated": false,
"StripeTaxCalculationId": "string",
"StripeTaxBehavior": "string",
"AmountCredit": 0,
"AmountDiscount": 0,
"AmountPaid": 0,
"AmountRefunded": 0,
"AmountSubtotal": 0,
"AmountTax": 0,
"AmountTaxRefunded": 0,
"IsTaxable": false,
"HasPaymentGatewayTransactions": false,
"StripePaymentTransactionIds": "string",
"StripeRefundTransactionIds": "string",
"StripeTaxRefundTransactionIds": "string"
},
"SubscriptionAddOn": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"BillingRenewalTerm": 1,
"Subscription": {},
"AddOn": {},
"Quantity": 0,
"StartDate": "string",
"EndDate": "string",
"ExpirationDate": "string",
"RenewalDate": "string",
"NewRequiredQuantity": 0,
"Rate": 0
},
"Amount": 0,
"AdditionalUsageData": "string"
}Authorizations
BearerApiKey
Enter your access token (OAuth / JWT).
Body
application/json
The usage entry to create, including UsageDate, Amount, and SubscriptionAddOn reference
Minimum string length:
1Show child attributes
Show child attributes
Example:
{
"Uid": "string",
"_objectType": "string",
"ActivityEventData": {},
"BillingRenewalTerm": 1,
"Subscription": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"BillingRenewalTerm": 1,
"Account": {},
"Plan": {},
"Quantity": 0,
"StartDate": "string",
"EndDate": "string",
"ExpirationDate": "string",
"RenewalDate": "string",
"NewRequiredQuantity": 0,
"IsPlanUpgradeRequired": false,
"PlanUpgradeRequiredMessage": "string",
"SubscriptionAddOns": [],
"DiscountCouponSubscriptions": [],
"DiscountCode": "string",
"DiscountCouponExpirationDate": "string",
"LatestInvoice": {},
"Rate": 0
},
"AddOn": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"Name": "string",
"BillingAddOnType": 1,
"IsQuantityEditable": false,
"MinimumQuantity": 0,
"MonthlyRate": 0,
"AnnualRate": 0,
"SetupFee": 0,
"UnitOfMeasure": "string",
"IsTaxable": false,
"IsBilledDuringTrial": false,
"ExpiresAfterMonths": 0,
"ExpirationDate": "string",
"StripeTaxCodeId": "string",
"PlanAddOns": [],
"ContentGroups": [],
"IsPerUser": false,
"QuarterlyRate": 0,
"OneTimeRate": 0,
"SubscriptionCount": 0,
"Quantity": 0
},
"Quantity": 0,
"StartDate": "string",
"EndDate": "string",
"ExpirationDate": "string",
"RenewalDate": "string",
"NewRequiredQuantity": 0,
"Rate": 0
}
Maximum string length:
10Show child attributes
Show child attributes
Example:
{
"Uid": "string",
"_objectType": "string",
"ActivityEventData": {},
"InvoiceDate": "string",
"PaymentReminderSentDate": "string",
"Number": 0,
"BillingInvoiceStatus": 1,
"Subscription": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"BillingRenewalTerm": 1,
"Account": {},
"Plan": {},
"Quantity": 0,
"StartDate": "string",
"EndDate": "string",
"ExpirationDate": "string",
"RenewalDate": "string",
"NewRequiredQuantity": 0,
"IsPlanUpgradeRequired": false,
"PlanUpgradeRequiredMessage": "string",
"SubscriptionAddOns": [],
"DiscountCouponSubscriptions": [],
"DiscountCode": "string",
"DiscountCouponExpirationDate": "string",
"LatestInvoice": {},
"Rate": 0
},
"Amount": 0,
"AmountOutstanding": 0,
"InvoiceLineItems": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"StartDate": "string",
"EndDate": "string",
"Description": "string",
"UnitOfMeasure": "string",
"Quantity": 0,
"Rate": 0,
"Amount": 0,
"Tax": 0,
"Invoice": {},
"LineItemType": 1,
"EntityId": 0,
"StripeTaxReference": "string",
"StripeTaxLineItemId": "string",
"EntityUid": "string"
}
],
"IsUserGenerated": false,
"StripeTaxCalculationId": "string",
"StripeTaxBehavior": "string",
"AmountCredit": 0,
"AmountDiscount": 0,
"AmountPaid": 0,
"AmountRefunded": 0,
"AmountSubtotal": 0,
"AmountTax": 0,
"AmountTaxRefunded": 0,
"IsTaxable": false,
"HasPaymentGatewayTransactions": false,
"StripePaymentTransactionIds": "string",
"StripeRefundTransactionIds": "string",
"StripeTaxRefundTransactionIds": "string"
}
Maximum string length:
1024Response
Minimum string length:
1Minimum string length:
1Minimum string length:
1Show child attributes
Show child attributes
Example:
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"BillingRenewalTerm": 1,
"Subscription": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"BillingRenewalTerm": 1,
"Account": {},
"Plan": {},
"Quantity": 0,
"StartDate": "string",
"EndDate": "string",
"ExpirationDate": "string",
"RenewalDate": "string",
"NewRequiredQuantity": 0,
"IsPlanUpgradeRequired": false,
"PlanUpgradeRequiredMessage": "string",
"SubscriptionAddOns": [],
"DiscountCouponSubscriptions": [],
"DiscountCode": "string",
"DiscountCouponExpirationDate": "string",
"LatestInvoice": {},
"Rate": 0
},
"AddOn": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"Name": "string",
"BillingAddOnType": 1,
"IsQuantityEditable": false,
"MinimumQuantity": 0,
"MonthlyRate": 0,
"AnnualRate": 0,
"SetupFee": 0,
"UnitOfMeasure": "string",
"IsTaxable": false,
"IsBilledDuringTrial": false,
"ExpiresAfterMonths": 0,
"ExpirationDate": "string",
"StripeTaxCodeId": "string",
"PlanAddOns": [],
"ContentGroups": [],
"IsPerUser": false,
"QuarterlyRate": 0,
"OneTimeRate": 0,
"SubscriptionCount": 0,
"Quantity": 0
},
"Quantity": 0,
"StartDate": "string",
"EndDate": "string",
"ExpirationDate": "string",
"RenewalDate": "string",
"NewRequiredQuantity": 0,
"Rate": 0
}
Maximum string length:
10Show child attributes
Show child attributes
Example:
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"InvoiceDate": "string",
"PaymentReminderSentDate": "string",
"Number": 0,
"BillingInvoiceStatus": 1,
"Subscription": {
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"BillingRenewalTerm": 1,
"Account": {},
"Plan": {},
"Quantity": 0,
"StartDate": "string",
"EndDate": "string",
"ExpirationDate": "string",
"RenewalDate": "string",
"NewRequiredQuantity": 0,
"IsPlanUpgradeRequired": false,
"PlanUpgradeRequiredMessage": "string",
"SubscriptionAddOns": [],
"DiscountCouponSubscriptions": [],
"DiscountCode": "string",
"DiscountCouponExpirationDate": "string",
"LatestInvoice": {},
"Rate": 0
},
"Amount": 0,
"AmountOutstanding": 0,
"InvoiceLineItems": [
{
"Uid": "string",
"_objectType": "string",
"Created": "string",
"Updated": "string",
"ActivityEventData": {},
"StartDate": "string",
"EndDate": "string",
"Description": "string",
"UnitOfMeasure": "string",
"Quantity": 0,
"Rate": 0,
"Amount": 0,
"Tax": 0,
"Invoice": {},
"LineItemType": 1,
"EntityId": 0,
"StripeTaxReference": "string",
"StripeTaxLineItemId": "string",
"EntityUid": "string"
}
],
"IsUserGenerated": false,
"StripeTaxCalculationId": "string",
"StripeTaxBehavior": "string",
"AmountCredit": 0,
"AmountDiscount": 0,
"AmountPaid": 0,
"AmountRefunded": 0,
"AmountSubtotal": 0,
"AmountTax": 0,
"AmountTaxRefunded": 0,
"IsTaxable": false,
"HasPaymentGatewayTransactions": false,
"StripePaymentTransactionIds": "string",
"StripeRefundTransactionIds": "string",
"StripeTaxRefundTransactionIds": "string"
}
Maximum string length:
1024⌘I