curl --request POST \
--url https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/invoices/{invoice}/actions/write_off \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/invoices/{invoice}/actions/write_off"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/invoices/{invoice}/actions/write_off', 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://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/invoices/{invoice}/actions/write_off",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$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://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/invoices/{invoice}/actions/write_off"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/invoices/{invoice}/actions/write_off")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/invoices/{invoice}/actions/write_off")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body"{ \"object\": \"Invoice\", \"id\": \"sub_uYZCBDVUXaWhYn90k0Ov4jZyy3c-00000000\", \"vid\": \"4c7a596b52a734f7420f3ddc5ccd56814ea9bcef\", \"billing_service_period_start\": \"2022-12-20T00:00:00+00:00\", \"billing_service_period_end\": \"2023-01-19T00:00:00+00:00\", \"due_date\": \"2022-12-20T00:00:00+00:00\", \"invoice_date\": \"2022-12-20T00:00:00+00:00\", \"status\": \"Written Off\", \"invoice_currency\": \"USD\", \"invoice_balance\": 5, \"gross_charges_total\": 5, \"tax_charges_total\": 0, \"sales_tax_address\": { \"object\": \"Address\", \"vid\": \"15c18e811ed83201520b56bb3563b92fdb7f7f51\", \"name\": \"Test Script: /home/ssm-user/repos/cashbox/qa/client/portal/perl/portal_list_invoices.t\", \"line1\": \"11235 Fibonacci St.\", \"city\": \"SAN MATEO\", \"district\": \"CA\", \"postal_code\": \"94403\", \"country\": \"US\" }, \"credit_total\": 0, \"payments_received_total\": 0, \"invoice_line_items\": { \"object\": \"List\", \"data\": [{ \"object\": \"InvoiceItem\", \"index_number\": 0, \"type\": \"RecurringCharge\", \"sku\": \"bp_AgsNxo0zFwtK7nO_xU6ZUmlKwMs\", \"description\": \"product default plan AgsNxo0zFwtK7nO_xU6\", \"quantity\": 1, \"unit_amount\": 0, \"tax_classification\": \"TaxExempt\", \"item_added\": \"2022-12-20T00:00:00+00:00\", \"item_removed\": null, \"item_serviceperiod_start\": \"2022-12-20T00:00:00+00:00\", \"item_serviceperiod_end\": \"2023-01-19T00:00:00+00:00\", \"billing_plan\": { \"object\": \"BillingPlan\", \"id\": \"bp_AgsNxo0zFwtK7nO_xU6ZUmlKwMs\", \"vid\": \"f5157aa1fa513be47cf97247392fec3a87883376\" } }, { \"object\": \"InvoiceItem\", \"index_number\": 1, \"type\": \"RecurringCharge\", \"sku\": \"2uUQpX6F7bjlbYYp2dwjQ8d0tg0\", \"description\": \"Test Product Description\", \"quantity\": 1, \"unit_amount\": 5, \"tax_classification\": \"TaxExempt\", \"item_added\": \"2022-12-20T14:12:04+00:00\", \"item_removed\": null, \"item_serviceperiod_start\": \"2022-12-20T14:12:04+00:00\", \"item_serviceperiod_end\": \"2023-01-19T00:00:00+00:00\", \"subscription_item\": { \"object\": \"SubscriptionItem\", \"id\": \"sub_item_kqOSlMLHCuqyPjraaBT_1Ofy9b4\", \"vid\": \"534fe2cc96d2e5dd9e51e43d5c20d85f8901098b\" } } ], \"total_count\": 2 }, \"invoice_tax_items\": { \"object\": \"List\", \"data\": [{ \"object\": \"InvoiceItem\", \"index_number\": 2, \"type\": \"Tax\", \"sku\": \"VIN_SALES_TAX\", \"description\": \"Sales Tax Total\", \"quantity\": 1, \"unit_amount\": 0, \"tax_classification\": \"TaxExempt\", \"item_added\": \"2022-12-20T14:12:04+00:00\", \"item_removed\": null, \"item_serviceperiod_start\": \"2022-12-20T14:12:04+00:00\", \"item_serviceperiod_end\": \"2023-01-19T00:00:00+00:00\" }], \"total_count\": 1 }, \"account\": { \"object\": \"Account\", \"id\": \"SHor6GHrIv46hJ4MxSqQx2pM4Do\", \"vid\": \"bc9bff85494357c627d3aa1c6541736333bb9e40\" }, \"subscription\": { \"object\": \"Subscription\", \"id\": \"sub_uYZCBDVUXaWhYn90k0Ov4jZyy3c\", \"vid\": \"1adc7688b14e792be4713681ffecfe908951a737\" }, \"billing_sequence\": 0 }""{ \"object\": \"Error\", \"message\": \"JSON is invalid\" }"{
"code": "<string>",
"message": "<string>"
}"{ \"object\": \"Error\", \"message\": \"This endpoint does not exist. Check our API docs.\" }"Write Off an Invoice
Marks the invoice as written off meaning that the debt can’t be collected.
curl --request POST \
--url https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/invoices/{invoice}/actions/write_off \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/invoices/{invoice}/actions/write_off"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/invoices/{invoice}/actions/write_off', 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://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/invoices/{invoice}/actions/write_off",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$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://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/invoices/{invoice}/actions/write_off"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/invoices/{invoice}/actions/write_off")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://virtserver.swaggerhub.com/Amdocs_Media/Subscribe_API_WIP/2024.09/invoices/{invoice}/actions/write_off")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body"{ \"object\": \"Invoice\", \"id\": \"sub_uYZCBDVUXaWhYn90k0Ov4jZyy3c-00000000\", \"vid\": \"4c7a596b52a734f7420f3ddc5ccd56814ea9bcef\", \"billing_service_period_start\": \"2022-12-20T00:00:00+00:00\", \"billing_service_period_end\": \"2023-01-19T00:00:00+00:00\", \"due_date\": \"2022-12-20T00:00:00+00:00\", \"invoice_date\": \"2022-12-20T00:00:00+00:00\", \"status\": \"Written Off\", \"invoice_currency\": \"USD\", \"invoice_balance\": 5, \"gross_charges_total\": 5, \"tax_charges_total\": 0, \"sales_tax_address\": { \"object\": \"Address\", \"vid\": \"15c18e811ed83201520b56bb3563b92fdb7f7f51\", \"name\": \"Test Script: /home/ssm-user/repos/cashbox/qa/client/portal/perl/portal_list_invoices.t\", \"line1\": \"11235 Fibonacci St.\", \"city\": \"SAN MATEO\", \"district\": \"CA\", \"postal_code\": \"94403\", \"country\": \"US\" }, \"credit_total\": 0, \"payments_received_total\": 0, \"invoice_line_items\": { \"object\": \"List\", \"data\": [{ \"object\": \"InvoiceItem\", \"index_number\": 0, \"type\": \"RecurringCharge\", \"sku\": \"bp_AgsNxo0zFwtK7nO_xU6ZUmlKwMs\", \"description\": \"product default plan AgsNxo0zFwtK7nO_xU6\", \"quantity\": 1, \"unit_amount\": 0, \"tax_classification\": \"TaxExempt\", \"item_added\": \"2022-12-20T00:00:00+00:00\", \"item_removed\": null, \"item_serviceperiod_start\": \"2022-12-20T00:00:00+00:00\", \"item_serviceperiod_end\": \"2023-01-19T00:00:00+00:00\", \"billing_plan\": { \"object\": \"BillingPlan\", \"id\": \"bp_AgsNxo0zFwtK7nO_xU6ZUmlKwMs\", \"vid\": \"f5157aa1fa513be47cf97247392fec3a87883376\" } }, { \"object\": \"InvoiceItem\", \"index_number\": 1, \"type\": \"RecurringCharge\", \"sku\": \"2uUQpX6F7bjlbYYp2dwjQ8d0tg0\", \"description\": \"Test Product Description\", \"quantity\": 1, \"unit_amount\": 5, \"tax_classification\": \"TaxExempt\", \"item_added\": \"2022-12-20T14:12:04+00:00\", \"item_removed\": null, \"item_serviceperiod_start\": \"2022-12-20T14:12:04+00:00\", \"item_serviceperiod_end\": \"2023-01-19T00:00:00+00:00\", \"subscription_item\": { \"object\": \"SubscriptionItem\", \"id\": \"sub_item_kqOSlMLHCuqyPjraaBT_1Ofy9b4\", \"vid\": \"534fe2cc96d2e5dd9e51e43d5c20d85f8901098b\" } } ], \"total_count\": 2 }, \"invoice_tax_items\": { \"object\": \"List\", \"data\": [{ \"object\": \"InvoiceItem\", \"index_number\": 2, \"type\": \"Tax\", \"sku\": \"VIN_SALES_TAX\", \"description\": \"Sales Tax Total\", \"quantity\": 1, \"unit_amount\": 0, \"tax_classification\": \"TaxExempt\", \"item_added\": \"2022-12-20T14:12:04+00:00\", \"item_removed\": null, \"item_serviceperiod_start\": \"2022-12-20T14:12:04+00:00\", \"item_serviceperiod_end\": \"2023-01-19T00:00:00+00:00\" }], \"total_count\": 1 }, \"account\": { \"object\": \"Account\", \"id\": \"SHor6GHrIv46hJ4MxSqQx2pM4Do\", \"vid\": \"bc9bff85494357c627d3aa1c6541736333bb9e40\" }, \"subscription\": { \"object\": \"Subscription\", \"id\": \"sub_uYZCBDVUXaWhYn90k0Ov4jZyy3c\", \"vid\": \"1adc7688b14e792be4713681ffecfe908951a737\" }, \"billing_sequence\": 0 }""{ \"object\": \"Error\", \"message\": \"JSON is invalid\" }"{
"code": "<string>",
"message": "<string>"
}"{ \"object\": \"Error\", \"message\": \"This endpoint does not exist. Check our API docs.\" }"Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
The id or the vid of the Invoice to write off A unique identifier. Optionally, this object can also be identified by its vid. Using a unique custom identifier is strongly encouraged.
128Response
JSON A full Invoice object.
Value is "Invoice"
A unique identifier. Optionally, this object can also be identified by its vid. Using a unique custom identifier is strongly encouraged.
128A Globally Unique Identifier (GUID) for this object. This value is generated by Vindicia.
128The billing date of the invoice. Typically the 1st day of the billed service period. This is the day when the invoice status goes from Open to Due.
The due date of the invoice. Typically the same as the “invoice date” unless Net Terms are specified for the Subscription.
Start of the billing/service period covered by this invoice.
End of the billing/service period covered by this invoice.
The status of the invoice. Values can be Open, Due, Paid, Overdue, Written Off.
Open, Due, Paid, Overdue, Written Off An ISO 4217 Currency Code. An invoice’s charges must be in a single currency.
The original net total of the invoice (in the currency identified as the invoice_currency).
The current balance due of the invoice (in the currency identified as the invoice_currency).
The original gross charges total of the invoice (in the currency identified as the invoice_currency). Represents the pre-tax, pre-discount sub-total of all charge/purchase items.
The original tax total of the invoice (in the currency identified as the invoice_currency).
The original discount and credit total of the invoice (in the currency identified as the invoice_currency).
The current currency total of all payments successfully processed against this invoice.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The Account represents a merchant’s customer. As such it can contain as much or as little information as you collect about the customers (people or organizations) to which you offer billing and subscriptions. Subscriptions and Transactions must belong to an Account - as such, Accounts will be required in CashBox for billing. Read More in our User Guide
An Account can have any number of children accounts and may have up to one parent account. Read more in our User Guide.
An Account owns the “on file” payment methods to be used by it in billing.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The subscription’s billing cycle for which this invoice charges. As a zero-based index, this indicates the renewal number.
InvoiceTerms from the owning subscription. Represents Days after the invoice date at which a bill is considered delinquent, if the AutoBill payment method is of type MerchantAcceptedPayment. The value will be undefined for all other payment method types.
Affiliate or channel identifier, if any, under which the subscription was submitted.
A more granular or subordinate affiliate identifier.
Metadata are sets of key-value pairs and are useful for storing additional, structured information on an object. This object is used to store a list of keys, which you create and associate with text string values. You use these key-value pairs to store custom data for your own internal tracking purposes, or to store CashBox specific data for defined CashBox purposes.
The metadata field supports key-value pairs with the following limitations:
Keys can be up to 256 characters
Keys can be any string that is needed, except only CashBox can prefix keys with vin:
Values can be up to 1024 characters
In some cases metadata from one object will be inherited automatically from one object to another that is spawned from it. e.g. metadata on a Subscription and SubscriptionItem will be inherited by all Transactions and TransactionItems that result from them.

