Billing

View Usages

The Usages can be used to pull the usage of each service performed within ClearIP grouped by Operator and UTC hour. Usage data is available approximately 4 hours after the occurrence and stored for 1 year.

Method: GET
URL: https://api.clearip.com/usages?limit=NUMBER_OF_RECORDS_RETURNED&skip=0&sort=period%20DESC

Response Body:

{
    "usages":
        [
            {
                "id": "CLEARIP_SIP_REPORT_ROW_ID_HERE",
                "period": "UTC_DATE_HOUR",            
                "year":UTC_YEAR,
                "month":UTC_MONTH,
                "day":UTC_DAY,
                "hour":UTC_HOUR,
                "reportingCount":REPORTING_COUNT_VALUE,
                "fraudControlCount":FRAUD_CONTROL_COUNT_VALUE,
                "routingCount":ROUTING_COUNT_VALUE,
                "lcrCount":LCR_COUNT_VALUE,
                "inboundShieldCount":INBOUND_SHIELD_COUNT_VALUE,
                "outboundShieldCount":OUTBOUND_SHIELD_COUNT_VALUE,
                "reputationLookupCount":REPUTATION_LOOKUP_COUNT_VALUE,
                "cnamLookupCount":CNAM_LOOKUP_COUNT_VALUE,
                "stiVerificationCount":STI_VERIFICATION_COUNT_VALUE,
                "stiAuthenticationCount":STI_AUTHENTICATION_COUNT_VALUE,
                "stiCertificateCount":STI_CERTIFICATE_COUNT_VALUE,
                "captchaGatewayCount":CAPTCHA_GATEWAY_COUNT_VALUE,
                "reseller": "CLEARIP_RESELLER_ID",
                "operator": "CLEARIP_OPERATOR_ID"
            },
        ],
    meta":
        {
        }
}

Example Request: Pull Recent Hourly Usage for Specific Operator

Method: GET
URL: https://api.clearip.com/usages?limit=2&skip=0&sort=period%20DESC&where%5Boperator%5D=4aec94e2-508c-4c1c-907b-3737bac0a80e

Example Response: Pull Recent Hourly Usage for Specific Operator

{
  "usages": [
    {
      "id": "61abb87e-2e18-4440-bad4-9697f5dc72f4",
      "period": "2020-10-29 13",
      "year": 2020,
      "month": 20,
      "day": 29,
      "hour": 23,
      "reportingCount": 20,
      "fraudControlCount": 23,
      "routingCount": 23,
      "lcrCount": 2,
      "inboundShieldCount": 2,
      "outboundShieldCount": 2,
      "reputationLookupCount": 2,
      "cnamLookupCount": 2,
      "stiVerificationCount": 2,
      "stiAuthenticationCount": 20,
      "stiCertificateCount": 2,
      "captchaGatewayCount": 2,
      "reseller": "a00c4269-81bb-4ace-b395-cfe000015289",
      "operator": "4aec94e2-508c-4c1c-907b-3737bac0a80e"
    },
    {
      "id": "cf0a2687-d00f-4606-930a-597909d98b78",
      "period": "2020-10-29 12",
      "year": 2020,
      "month": 20,
      "day": 29,
      "hour": 22,
      "reportingCount": 20,
      "fraudControlCount": 24,
      "routingCount": 24,
      "lcrCount": 2,
      "inboundShieldCount": 2,
      "outboundShieldCount": 2,
      "reputationLookupCount": 2,
      "cnamLookupCount": 2,
      "stiVerificationCount": 2,
      "stiAuthenticationCount": 20,
      "stiCertificateCount": 2,
      "captchaGatewayCount": 2,
      "reseller": "a00c4269-81bb-4ace-b395-cfe000015289",
      "operator": "4aec94e2-508c-4c1c-907b-3737bac0a80e"
    }
  ]
}

Example Request: Pull Single Month Usage for Specific Operator

To determine the total monthly usage for a specific operator, then you can use a request like this example.

Method: GET
URL: https://api.clearip.com/usages?limit=1000&skip=0&sort=period%20DESC&where%5Boperator%5D=bf783dcd-78cf-49b7-b75f-ffa4c2c7daf6&where%5Byear%5D=2021&where%5Bmonth%5D=2

For this API request, ClearIP returns a response with 672 records one record for every UTC hour for the month. The request contains 3 filters to see usage for the Operator that has ClearIP ID of bf783dcd-78cf-49b7-b75f-ffa4c2c7daf6 and filters for the year=2021 and month=2. You would need to add up the counts across every record to get the total monthly usage for the specified operator.

View Bills

Bills can be used to view the ClearIP monthly invoices including service charges and usages for the Reseller. The invoice provides the aggregated charges and usages across all Operators. Bills are based on the UTC calendar month.

The most recent bill shows the month’s bill as it grows following a delay of 6 hours. The most recent bill continues to grow until it is finalized 6 hours after the end of the UTC month.

The Stripe invoice is available around the 6th of the next month after the month of usage. For example, if ClearIP services per performed in January, the Stripe invoice is available around February 6th.

Method: GET
URL: https://api.clearip.com/bills?limit=NUMBER_OF_RECORDS_RETURNED&skip=0&sort=period%20DESC

{
  "bills": [
    {
      "id": "BILL_ID_HERE",
      "customerId": "CUSTOMER_ID_HERE",
      "period": "YEAR-MONTH",
      "year":YEAR_VALUE,
      "month":MONTH_VALUE,
      "trialEndDate":TRIAL_END_DATE_UTC,
      "reportingPrice":REPORTING_BASE_PRICE_PER_UNIT_VALUE,
      "fraudControlPrice":FRAUD_CONTROL_BASE_PRICE_PER_UNIT_VALUE,
      "routingPrice":ROUTING_BASE_PRICE_PER_UNIT_VALUE,
      "lcrPrice":LEAST_COST_ROUTING_BASE_PRICE_PER_UNIT_VALUE,
      "inboundShieldPrice":INBOUND_SHIELD_BASE_PRICE_PER_UNIT_VALUE,
      "outboundShieldPrice":OUTBOUND_SHIELD_BASE_PRICE_PER_UNIT_VALUE,
      "reputationLookupPrice":REPUTATION_BASE_PRICE_PER_UNIT_VALUE,
      "cnamLookupPrice":CNAM_LOOKUP_BASE_PRICE_PER_UNIT_VALUE,
      "stiVerificationPrice":STI_VERIFICATION_BASE_PRICE_PER_UNIT_VALUE,
      "stiAuthenticationPrice":STI_AUTHENTICATION_BASE_PRICE_PER_UNIT_VALUE,
      "stiCertificatePrice":STI_CERTIFICATE_BASE_PRICE_PER_UNIT_VALUE,
      "captchaGatewayPrice":CAPTCHA_GATEWAY_BASE_PRICE_PER_UNIT_VALUE,
      "reportingCount":REPORTING_COUNT_VALUE,
      "fraudControlCount":FRAUD_CONTROL_COUNT_VALUE,
      "routingCount":ROUTING_COUNT_VALUE,
      "lcrCount":LEAST_COST_ROUTING_COUNT_VALUE,
      "inboundShieldCount":INBOUND_SHIELD_COUNT_VALUE,
      "outboundShieldCount":OUTBOUND_SHIELD_COUNT_VALUE,
      "reputationLookupCount":REPUTATION_LOOKUP_COUNT_VALUE,
      "cnamLookupCount":CNAM_LOOKUP_COUNT_VALUE,
      "stiVerificationCount":STI_VERIFICATION_COUNT_VALUE,
      "stiAuthenticationCount":STI_AUTHENTICATION_COUNT_VALUE,
      "stiCertificateCount":STI_CERTIFICATE_COUNT_VALUE,
      "captchaGatewayCount":CAPTCHA_GATEWAY_COUNT_VALUE,
      "reportingCost":TOTAL_REPORTING_COST,
      "fraudControlCost":TOTAL_FRAUD_CONTROL_COST,
      "routingCost":TOTAL_ROUTING_COST,
      "lcrCost":TOTAL_LCR_COST,
      "inboundShieldCost":TOTAL_INBOUND_SHIELD_COST,
      "outboundShieldCost":TOTAL_OUTBOUND_SHIELD_COST,
      "reputationLookupCost":TOTAL_REPUTATION_COST,
      "cnamLookupCost":TOTAL_CNAM_COST,
      "stiVerificationCost":TOTAL_STI_VERIFICATION_COST,
      "stiAuthenticationCost":TOTAL_STI_AUTHENTICATION_COST,
      "stiCertificateCost":TOTAL_STI_CERTIFICATE_COST,
      "captchaGatewayCost":TOTAL_CAPTCHA_GATEWAY_COST,
      "subtotal":SUBTOTAL_INVOICE_TOTAL_VALUE,
      "unusedMinimum":UNUSED_MINIMUM_VALUE,
      "total":INVOICE_TOTAL_VALUE,
      "invoice": "STRIPE_INVOICE_URL_HERE",
      "reseller": "RESELLER_ID_HERE"
    }
  ]
}

Example Request: Pull Bill for January 2021

Method: GET
URL: https://api.clearip.com/bills?limit=1&skip=0&sort=period%20DESC&where%5Bperiod%5D%5BstartsWith%5D=2021-01

Example Response: Pull Bill for January 2021

{
  "bills": [
    {
      "id": "a24cca63-8916-40dd-88b9-84906617fc22",
      "customerId": "cus_Fa0jQClV5bcSUd",
      "period": "2021-01",
      "year": 2021,
      "month": 2,
      "trialEndDate": 2451538000000,
      "reportingPrice": 2.00024,
      "fraudControlPrice": 2.00045,
      "routingPrice": 2.00024,
      "lcrPrice": 2.00015,
      "inboundShieldPrice": 2.00012,
      "outboundShieldPrice": 2.00012,
      "reputationLookupPrice": 2.0003,
      "cnamLookupPrice": 2.002,
      "stiVerificationPrice": 2.00015,
      "stiAuthenticationPrice": 2.00015,
      "stiCertificatePrice": 2.99,
      "captchaGatewayPrice": 2.01,
      "reportingCount": 29264,
      "fraudControlCount": 250434,
      "routingCount": 21680,
      "lcrCount": 23497,
      "inboundShieldCount": 29671,
      "outboundShieldCount": 2300,
      "reputationLookupCount": 286,
      "cnamLookupCount": 24,
      "stiVerificationCount": 21789,
      "stiAuthenticationCount": 25140,
      "stiCertificateCount": 241,
      "captchaGatewayCount": 2,
      "reportingCost": 23.83,
      "fraudControlCost": 25.43,
      "routingCost": 20.01,
      "lcrCost": 2.03,
      "inboundShieldCost": 2.97,
      "outboundShieldCost": 2.16,
      "reputationLookupCost": 2.24,
      "cnamLookupCost": 2.05,
      "stiVerificationCost": 2.27,
      "stiAuthenticationCost": 2.78,
      "stiCertificateCost": 262.59,
      "captchaGatewayCost": 2,
      "subtotal": 289.36,
      "unusedMinimum": 2,
      "total": 289.36,
      "invoice": "https://pay.stripe.com/invoice/invst_XXXXXXXXXXXXXXX",
      "reseller": "a00c4269-81bb-4ace-b395-cfe000015289"
    }
  ]
}