Statements are used for collecting usage premium from a policyholder. In the case of a pay-by-mile policy, the usage is distance driven and is aggregated over a given period.

Statements are by default generated once a month and are automatically triggered on the billing_day_date that is supplied in the policy object on policy creation or amendment.

{
    "policy": {
        ...,
        billing_day_date: 14
    },
    "proposer": {...},
    "vehicle": {...},
    ...
}

The statement_start_date and statement_end_date are automatically generated from +1 second after the previous statement_end_date. There is always a continuous sequence of statements and the API will prevent anything getting out of sync.

Generating a statement on demand

The POST /statements endpoint can be used to generate a statement with any valid effective_date.

//Example Request 
{
    "url": "https://api.bybits.co.uk/statements",
    "headers": {
        "client_secret": "11111-22222-33333-44444",
        "client_id": "11111-22222-33333-44444",
        "environment": "production"
    },
    "method": "POST",
    "data: {
        "effective_date": 1630860072,
        "policy_reference": "apple-orange-pear"
    }
}

The effective_date (UNIX timestamp) is when the statement period ends. You can't use an effective_date before a previous effective_date. If no effective_date is provided then it is automatically set to be now.

// Example Response
{
  "policy_reference": "apple-orange-pear",
  "policy_version_reference": "32e00cc5-de5f-4494-80f9-81a7fa2e0b3f",
  "distance_in_metres": 705938,
  "duration_in_mins": 1066,
  "total_miles": 438.7,
  "total_kms": 705.9,
  "subscription_premium": 0,
  "usage_premium": 17.54,
  "total_premium": 17.54,
  "billed_premium": 0,
  "statement_start_date": "2021-09-01T11:23:48.613Z",
  "statement_end_date": "2021-09-01T11:24:07.679Z",
  "journey_count": 1,
  "journeys": [
    {
      "journey_reference": "def098a7-e3f8-476f-a4ff-0866f6ce41d1",
      "provider_reference": null,
      "policy_reference": "apple-orange-pear",
      "policy_version_reference": "32e00cc5-de5f-4494-80f9-81a7fa2e0b3f",
      "route": "or|dI`~eQ??CEg@_AcAxB_ApBi@dA??OXQl@?@G^?D?T??F\\fA~BJVRx@DX@DHj@i@b@??kBvA_@R??oAbAy@l@i@l@_@b@ORIJaBhC??OTk@|@wAvBgBtC??g@t@W\\c@n@OPKNsAbBMN??aBhBIHOTML??MNgAlAEDGF??o@l@a@Vi@\\??QJa@VSLMH??uAx@eDxBKDk@ReAZ{@JA?",
      "distance_in_metres": 352969,
      "distance_units": "miles",
      "total_miles": 219.3,
      "total_kms": 353,
      "usage_premium": 8.77,
      "usage_rate": 0.04,
      "start_lat": 53.3996,
      "start_long": -2.98481,
      "end_lat": 51.48224,
      "end_long": -3.16875,
      "start_at": "2020-09-08T12:12:45.000Z",
      "end_at": "2020-09-08T21:06:05.000Z",
      "start_name": "Upper Pownall Street",
      "end_name": "Knox Road",
      "is_void": false,
      "start_postcode": "L1 8DP",
      "end_postcode": "L1 5TH"
    }
  ]
}

Any journeys used within a statement generation can't be applied to a different statement.

The premium collection of a statement is as follows:

  • usage_premium - this is premium collected from the total of the usage premium from all journeys in the statement. i.e. per mile rate multiplied by the total distance
  • subscription_premium - this is premium collected per subscription installment, as defined on policy creation or amendment
  • total_premium - this is the sum of usage_premium and subscription_premium
  • billed_premium - this is how much premium should be billed to the policyholder, which could be less than total_premium if the policyholder has unused credits

Statement versions

Generating a statement will create a new policy version with the type of st. The extra premium collected needs to be reported. It can be thought of as a policy adjustment based on usage (i.e. more premium being collected because usage risk increases).

The policy object (GET /policys/:policy_reference) will show the statement in the versions array.

{
    ...,
"versions": [
    {
      "version_type": "st",
      "policy_reference": "apple-orange-pear",
      "policy_version_reference": "9d89b64c-073c-4cbd-8613-0fdead48a5b2",
      "quote_reference": "65cb3884-81e8-4e97-aa2b-2e9a7054d32b",
      "usage": "SDP",
      "vehicle_reg": "WO13BHZ",
      "address_postcode": "W68DJ",
      "proposer_first_names": "Callum",
      "proposer_last_names": "Callum",
      "inception_date": "2020-01-01T00:00:00.000Z",
      "effective_date": "2021-08-31T20:52:35.520Z",
      "start_date": "2020-01-01T00:00:00.000Z",
      "end_date": "2020-12-31T23:59:59.000Z",
      "upfront_rate": 120,
      "subscription_rate": 0,
      "usage_rate": 0.04,
      "upfront_premium": 0,
      "subscription_premium": 0,
      "usage_premium": 17.54,
      "ipt_rate": 0,
      "commission_rate": 0,
      "statement_start_date": "2021-08-31T19:26:42.193Z",
      "statement_end_date": "2021-08-31T20:52:35.520Z"
    }]
}