Account-level charges
An account can have two levels of charges: account-level charges and policy-level charges. An account-level charge is a charge that is owned by the account directly (such as a charge for a late fee). For more information on policy-level charges, seePolicy-level charges.
Use the following endpoint to query for account-level charges.
-
GET
/billing/v1/accounts/{accountId}/charges
-
GET
/billing/v1/charges/{chargeId}
Charges are associated with both accounts and policy periods, and a given charge cannot be considered to be owned entirely by either an account or a policy period. Therefore, Cloud API considers charges to be a top-level entity. To get an account's charges, you use an endpoint that has the account as the parent. But to get details about a specific charge, you use an endpoint where the charge is the parent.
For example, the following request queries for the account-level charges for account bc:707. The response specifies one charge for a $15 late fee.
Command
GET /billing/v1/accounts/bc:707/charges
{
"count": 1,
"data": [
{
"attributes": {
"amount": {
"amount": "15.00",
"currency": "usd"
},
"chargeDate": "2023-05-23T21:35:02.718Z",
"chargePattern": {
"displayName": "Late Fee",
"id": "default_data:7"
},
"holdStatus": {
"code": "none",
"name": "Not Held"
},
"id": "bc:SjwKGEQ00pe-TC22SOUT_",
"reversed": false,
"skipInvoiceItemCreation": false,
"totalInstallments": 0
},
...
The following request retrieves information about a single charge.
Command
GET /billing/v1/charges/bc:SjwKGEQ00pe-TC22SOUT_
{
"data": {
"attributes": {
"amount": {
"amount": "15.00",
"currency": "usd"
},
"chargeDate": "2023-05-23T21:35:02.718Z",
"chargePattern": {
"displayName": "Late Fee",
"id": "default_data:7"
},
"holdStatus": {
"code": "none",
"name": "Not Held"
},
"id": "bc:SjwKGEQ00pe-TC22SOUT_",
"reversed": false,
"skipInvoiceItemCreation": false,
"totalInstallments": 0
},
...