---
title: "Estimate a new subscription's first invoice"
description: "Dry-run."
canonical_url: "https://twominutebilling.com/help/developers/api-reference/subscriptions/estimate-a-new-subscription-s-first-invoice"
---
# Estimate a new subscription's first invoice

> Dry-run.

<api-operation method="POST" path="/v1/businesses/{biz}/customers/{cus}/subscription_estimate">
<template v-slot:docs="">

## Path parameters

<table>
<thead>
  <tr>
    <th>
      Parameter
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        biz
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        yes
      </strong>
    </td>
    
    <td>
      Business id (biz_…)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        cus
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        yes
      </strong>
    </td>
    
    <td>
      Customer id (cus_…)
    </td>
  </tr>
</tbody>
</table>

## Body

The request body is **required**.

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Required
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        shipping_address_id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Where this subscription ships: one of the customer's shipping addresses. Must not be archived. Omitted: the customer's default shipping address.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        payment_method
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      One of the customer's saved payment methods (<code>
        pm_…
      </code>
      
      ) to pin to the subscription. Collection charges it first, then the customer's backups. Must belong to this customer and not be <code>
        expired
      </code>
      
      /<code>
        invalid
      </code>
      
       (400). Omitted: the customer's primary.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        id
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Your own subscription id (letters, digits, _ and -). Auto-generated as sub_<nano> when omitted. Unique per business; a duplicate returns 400. Mainly for keeping ids when migrating from another billing system.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        items
      </code>
    </td>
    
    <td>
      <code>
        array of object
      </code>
    </td>
    
    <td>
      <strong>
        yes
      </strong>
    </td>
    
    <td>
      The items on the subscription.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        items.price
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        yes
      </strong>
    </td>
    
    <td>
      The price's id (a slug id, e.g. <code>
        pro-monthly-usd
      </code>
      
      ).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        items.quantity
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      The quantity. Defaults to <code>
        1
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        items.unit_price_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Custom price override (flat/per-unit only), minor units; falls back to the catalog price when omitted
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        trial_days
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      0 disables the plan's trial; omitted applies the plan price's trial_period.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        trial_end
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      An exact trial end, in place of trial_days. Must be after the start; on a day-anchored business it names the day the trial ends on.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        start_date
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Backdate/future-date the period start
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        billing_anchor
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Calendar billing anchor for the first period end
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        coupon_ids
      </code>
    </td>
    
    <td>
      <code>
        array of string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Coupon codes applied at signup — discount the first invoice
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        discount
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      A manual discount applied at signup — a %/amount reduction with no catalog coupon behind it, discounting the FIRST invoice (a discount passed at signup lands on the first invoice, not the next renewal). Singular, because the engine allows one discount per subscription and refuses a second.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        discount.type
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        yes
      </strong>
    </td>
    
    <td>
      The discount type. One of <code>
        percent
      </code>
      
      , <code>
        amount
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        discount.value
      </code>
    </td>
    
    <td>
      <code>
        number
      </code>
    </td>
    
    <td>
      <strong>
        yes
      </strong>
    </td>
    
    <td>
      A whole percent 1-100 for <code>
        percent
      </code>
      
      ; integer MINOR units for <code>
        amount
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        discount.duration
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      <strong>
        yes
      </strong>
    </td>
    
    <td>
      How long the discount lasts. One of <code>
        one_time
      </code>
      
      , <code>
        forever
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        discount.note
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      A note shown with the discount.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        invoice_immediately
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Signup invoicing. true (default) raises — and with auto-collection on, collects — the first invoice now. false queues the first period as a pending unbilled charge instead, so it rides on the next invoice and nothing is collected at signup (the response then carries <code>
        deferred_charge
      </code>
      
       instead of <code>
        latest_invoice
      </code>
      
      ). Ignored for a trial or a future-dated start, neither of which invoices now. Distinct from create_pending_invoices, which governs RENEWAL invoicing. Defaults to <code>
        true
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        create_pending_invoices
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      RENEWAL invoicing for this subscription: false posts an invoice each renewal, true opens a pending invoice that charges accumulate on until it is closed. Overrides the business default when supplied.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        bill_usage_monthly
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Invoice metered usage every month while the plan fee stays on the billing period. Needs a billing period of 2 months or more, in months or years, and no pending invoices. Default: the plan price's.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        commitment_amount_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Minimum commitment for one full billing period; null for none. Default: the plan price's. Not with pending invoices.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        custom_fields
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      Custom-field values; or pass top-level cf_<name> params
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        payment_intent
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      An intent (<code>
        pi_…
      </code>
      
      ) the buyer authorized after this request answered 402 <code>
        requires_action
      </code>
      
      . The first invoice is settled by consuming it. Must belong to this customer, be <code>
        authorized
      </code>
      
       and match the first invoice's amount and currency.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        client_result
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      What the gateway's browser SDK returned for a <code>
        next_action.mode: sdk
      </code>
      
       challenge, as string key/values. We send it to the gateway, which decides the outcome. A refusal answers 400 (402 on subscription create) with the gateway's reason, and the intent stays open for a retry. Rejected with <code>
        client_result_unsupported
      </code>
      
       on a gateway that takes no browser result.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        on_charge_failure
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      no
    </td>
    
    <td>
      What a declined first charge does, when the create charges now (auto-collection on, no trial, starts now, invoiced now). <code>
        refuse
      </code>
      
       (default): nothing is created and the call returns 402. <code>
        dun
      </code>
      
      : the subscription is created <code>
        active
      </code>
      
      , the first invoice stays open and dunning collects it, as after a failed renewal; the 201 response carries <code>
        payment_error
      </code>
      
       with the decline. <code>
        dun
      </code>
      
       with <code>
        on_session: true
      </code>
      
       or <code>
        payment_intent
      </code>
      
       is refused (400 <code>
        on_charge_failure_conflict
      </code>
      
      ), because the buyer pays before the subscription exists. One of <code>
        refuse
      </code>
      
      , <code>
        dun
      </code>
      
      .
    </td>
  </tr>
</tbody>
</table>

## Response

<table>
<thead>
  <tr>
    <th>
      Field
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The object type; always <code>
        estimate
      </code>
      
      . One of <code>
        estimate
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        currency
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      The currency code.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        lines
      </code>
    </td>
    
    <td>
      <code>
        array of object
      </code>
    </td>
    
    <td>
      The quoted lines.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        subtotal_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      The sum of the lines, in minor units.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        discount_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Every discount off the subtotal, in minor units.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        tax_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      The tax, in minor units.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        tax_lines
      </code>
    </td>
    
    <td>
      <code>
        array of object
      </code>
    </td>
    
    <td>
      The tax, split into the rows the invoice prints.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        discount_lines
      </code>
    </td>
    
    <td>
      <code>
        array of object
      </code>
    </td>
    
    <td>
      The discount, split into named rows.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        total_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Subtotal minus discount plus tax, in minor units. Goes negative on a downgrade.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        immediate_charge
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      True if the customer is charged now; false if the net is a credit.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        credits_applied_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Refundable and excess credit that the estimate applies, in minor units.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        promotional_credits_applied_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Promotional credit that the estimate applies, in minor units.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        promotional_discount_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Promotional credit as a pre-tax discount, in minor units.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        refundable_credits_applied_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Refundable credit that the estimate applies, in minor units.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        excess_payments_applied_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Excess payments that the estimate applies, in minor units.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        grant_credits_pre_tax_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Credit grants applied before tax (promotional, and paid credit taxed at purchase). Already off <code>
        total_minor
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        grant_credits_post_tax_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Money credit grants taxed at use, applied after tax. Included in <code>
        credits_applied_minor
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        credit_note_total_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      The total of the credit notes the change raises, tax included, in minor units.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        refunded_to_payment_method_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Change estimate only, with <code>
        billing_rules_config.downgrade_credit: refund
      </code>
      
       (or the portal customer's selection): the part of the change's credit that is refunded to the card or bank payments that paid. The rest stays as <code>
        refundable_credit_added_minor
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        refundable_credit_added_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Credit that lands on the customer's balance, in minor units.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        credit_applied_to_open_invoices_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Credit that pays down open invoices, in minor units.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        credit_applied_to_this_invoice_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Credit that offsets this invoice, in minor units.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        credit_destinations
      </code>
    </td>
    
    <td>
      <code>
        array of object
      </code>
    </td>
    
    <td>
      Where the credit goes.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        credited_period_start
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      Start of the period that is credited (ISO 8601).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        credited_period_end
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      End of the period that is credited (ISO 8601).
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        invoice_total_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      The total of the invoice this change raises, in minor units.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        invoice_subtotal_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      The subtotal of the invoice this change raises, in minor units.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        credit_returned_to_buckets_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Credit that returns to promotional or excess balance, in minor units.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        credit_returned_to_grants_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Credit given back to the credit grants the source invoices drew, in minor units. Inside credit_returned_to_buckets_minor.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        credit_stranded_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Credit that reaches nobody, in minor units.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        credit_routing_over_claimed_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      Credit that routing claimed in excess, in minor units.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        amount_due_minor
      </code>
    </td>
    
    <td>
      <code>
        integer
      </code>
    </td>
    
    <td>
      What the customer is asked to pay now, in minor units.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        next_renewal
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      The renewal invoice that the change leads to.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        term_reset
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      True if the change starts a new billing term.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        new_period_end
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      The end of the new term (ISO 8601), or null.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        due_at_trial_end
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      When the first charge is due, if the subscription starts in a trial.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        in_term_reactivation
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      Set when a reactivation can resume the current term.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        in_term_available
      </code>
    </td>
    
    <td>
      <code>
        boolean
      </code>
    </td>
    
    <td>
      True if the subscription can resume its current term.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        scheduled_change
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      Renewal estimate only: the scheduled change that runs before this renewal and whose items it prices.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        mandate_shortfall
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      Set when the amount is above the mandate's per-debit limit.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        debits_in_flight
      </code>
    </td>
    
    <td>
      <code>
        array of object
      </code>
    </td>
    
    <td>
      Debits that are already under way.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        priced_at
      </code>
    </td>
    
    <td>
      <code>
        string · ISO-8601
      </code>
    </td>
    
    <td>
      Only on <code>
        POST …/subscriptions/{sub}/estimate
      </code>
      
      : the instant these amounts are priced at. Send it to <code>
        /change
      </code>
      
       with <code>
        quote
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        quote
      </code>
    </td>
    
    <td>
      <code>
        string
      </code>
    </td>
    
    <td>
      Only on <code>
        POST …/subscriptions/{sub}/estimate
      </code>
      
      : a hash of the amounts shown. Send it to <code>
        /change
      </code>
      
       with <code>
        priced_at
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        change_policy
      </code>
    </td>
    
    <td>
      <code>
        object
      </code>
    </td>
    
    <td>
      Only on <code>
        POST …/subscriptions/{sub}/estimate
      </code>
      
      : the business's plan-change rules for this edit.
    </td>
  </tr>
</tbody>
</table>

## Status codes

<table>
<thead>
  <tr>
    <th>
      Status
    </th>
    
    <th>
      Meaning
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        200
      </code>
    </td>
    
    <td>
      Estimate
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        400
      </code>
    </td>
    
    <td>
      Invalid items, or a coupon the apply would refuse: not yet valid, expired, at its redemption limit, or used by this customer as often as it allows
    </td>
  </tr>
</tbody>
</table>
</template>

<template v-slot:request="">

```bash [Request]
curl -X POST "$TMBILLING_URL/v1/businesses/biz_XXXXXXXXXXXX01/customers/cus_XXXXXXXXXXXX01/subscription_estimate" \
  -H "Authorization: Bearer $TMBILLING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "price": "pro-monthly-usd",
        "quantity": 1
      }
    ]
  }'
```

</template>

<template v-slot:response="">
<code-group>

```json [200 OK]
{
  "object": "estimate",
  "currency": "USD",
  "lines": [
    {
      "description": "Pro plan (monthly)",
      "amount_minor": 4900
    }
  ],
  "subtotal_minor": 4900,
  "discount_minor": 490,
  "tax_minor": 882,
  "tax_lines": [
    {
      "label": "VAT (20.00%)",
      "amount_minor": 980
    }
  ],
  "discount_lines": [
    {
      "label": "welcome-10",
      "amount_minor": 490
    }
  ],
  "total_minor": 5292,
  "immediate_charge": false,
  "credits_applied_minor": 0,
  "promotional_credits_applied_minor": 0,
  "promotional_discount_minor": 0,
  "refundable_credits_applied_minor": 0,
  "excess_payments_applied_minor": 0,
  "grant_credits_pre_tax_minor": 0,
  "grant_credits_post_tax_minor": 0,
  "credit_note_total_minor": 2900,
  "refunded_to_payment_method_minor": 0,
  "refundable_credit_added_minor": 2900,
  "credit_applied_to_open_invoices_minor": 2900,
  "credit_applied_to_this_invoice_minor": 2900,
  "credit_destinations": [
    {
      "kind": "refundable",
      "destination": "balance",
      "amount_minor": 1200,
      "invoice": "inv_XXXXXXXXXXXX01"
    }
  ],
  "credited_period_start": "2026-03-14T09:30:00Z",
  "credited_period_end": "2026-04-14T09:30:00Z",
  "invoice_total_minor": 2900,
  "invoice_subtotal_minor": 2900,
  "credit_returned_to_buckets_minor": 2900,
  "credit_returned_to_grants_minor": 2900,
  "credit_stranded_minor": 2900,
  "credit_routing_over_claimed_minor": 2900,
  "amount_due_minor": 5292,
  "next_renewal": {
    "date": "2026-03-14T09:30:00Z",
    "lines": [
      {
        "description": "Everything a growing team needs.",
        "amount_minor": 2900
      }
    ],
    "subtotal_minor": 2900,
    "discount_minor": 0,
    "tax_minor": 0,
    "tax_lines": [
      {
        "label": "VAT (20.00%)",
        "amount_minor": 980
      }
    ],
    "total_minor": 2900,
    "credits_applied_minor": 0,
    "amount_due_minor": 0
  },
  "term_reset": false,
  "new_period_end": "2026-04-14T09:30:00Z",
  "due_at_trial_end": "2026-04-14T09:30:00Z",
  "in_term_reactivation": {
    "current_period_end": "2026-04-14T09:30:00Z",
    "invoice": {
      "id": "inv_XXXXXXXXXXXX01",
      "number": "INV-1001",
      "status": "payment_due",
      "outstanding_minor": 2900
    },
    "collects_now": false
  },
  "in_term_available": false,
  "scheduled_change": {
    "id": "3f6c1b9e-8a2d-4c5e-9f10-2b7d4e6a8c01",
    "type": "change",
    "effective_at": "2026-03-14T09:30:00Z"
  },
  "mandate_shortfall": {
    "payment_method": "pm_XXXXXXXXXXXX01",
    "ceiling_minor": 2900,
    "amount_minor": 2900,
    "currency": "INR",
    "rail": "upi",
    "reauthorized_ceiling_minor": 2900,
    "needs_authentication_even_if_raised": false
  },
  "debits_in_flight": [
    {
      "invoice": "inv_XXXXXXXXXXXX01",
      "awaiting_buyer": false,
      "kind": "payment"
    }
  ],
  "priced_at": "2026-03-14T09:30:00Z",
  "quote": "9f2c4e1a7b3d5c6e8f0a1b2c3d4e5f60",
  "change_policy": {
    "direction": "upgrade",
    "timings": [
      "now"
    ],
    "default_timing": "now",
    "blocked": {
      "code": "invoices_unpaid",
      "message": "Requested by the customer."
    },
    "prorate": false,
    "reset_term": false,
    "invoice_immediately": false,
    "credit_handling": "credit_balance",
    "coupons": "keep",
    "on_charge_failure": "start_dunning",
    "plan_credits": "full",
    "allowances": "new_window"
  }
}
```

```json [400 Bad Request]
{
  "error": {
    "type": "invalid_request_error",
    "message": "Invalid items, or a coupon the apply would refuse: not yet valid, expired, at its redemption limit, or used by this customer as often as it allows"
  }
}
```

</code-group>
</template>
</api-operation>


## Sitemap

See the full [sitemap](https://twominutebilling.com/sitemap.md) for all pages.
