code: public static UsageRecord createOnSubscriptionItem(
        String subscriptionItem, Map<String, Object> params, RequestOptions options)
        throws StripeException {
      String url =
          String.format(
              "%s%s",
              Stripe.getApiBase(),
              String.format(
                  "/v1/subscription_items/%s/usage_records",
                  ApiResource.urlEncodeId(subscriptionItem)));
      return request(ApiResource.RequestMethod.POST, url, params, UsageRecord.class, options);
    }
docs: Creates a usage record for a specified subscription item and date, and fills it with a
  quantity.
  
  <p>Usage records provide <code>quantity</code> information that Stripe uses to track how much a
  customer is using your service. With usage information and the pricing model set up by the <a
  href="https://stripe.com/docs/billing/subscriptions/metered-billing">metered billing</a> plan,
  Stripe helps you send accurate invoices to your customers.
  
  <p>The default calculation for usage is to add up all the <code>quantity</code> values of the
  usage records within a billing period. You can change this default behavior with the billing
  plan’s <code>aggregate_usage</code> <a
  href="https://stripe.com/docs/api/plans/create#create_plan-aggregate_usage">parameter</a>. When
  there is more than one usage record with the same timestamp, Stripe adds the <code>quantity
  </code> values together. In most cases, this is the desired resolution, however, you can change
  this behavior with the <code>action</code> parameter.
  
  <p>The default pricing model for metered billing is <a
  href="https://stripe.com/docs/api/plans/object#plan_object-billing_scheme">per-unit
  pricing</a>. For finer granularity, you can configure metered billing to have a <a
  href="https://stripe.com/docs/billing/subscriptions/tiers">tiered pricing</a> model.