---
title: "Refresh invoice"
method: POST
path: "/api/v1/invoices/{invoice_id}/refresh"
tags: ["Invoices"]
---

# Refresh invoice

`POST /api/v1/invoices/{invoice_id}/refresh`

## Request

- The document declares no server URL.
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/meteroid-oss/apis/meteroid/docs/api/v1/invoices/:invoice_id/refresh/post.ts> (a function with typed inputs; its response is checked against the schema)

Recompute a draft invoice against current usage, credits, coupons and tax, and return it.
Drafts are also refreshed periodically in the background; use this to force it, e.g. after
ingesting late events. Rejected while a payment for the invoice is in progress or when the
invoice was merged into a consolidated parent.

## Path parameters

- `invoice_id` string, MeteroidId, required

## Response `200`

Refreshed invoice

- Invoice
  - `amount_due` integer, required
  - `applied_credits` integer, required: Paid credit applied after tax, in minor units of the invoice currency: it settles part of `total` like a payment, and `amount_due` is net of it.
  - `billing_period_start` string, date, nullable: The period/moment this invoice is about — the subscription period start, or the invoice's own date for manual/one-off. Stable and always present, distinct from `invoice_date` (the emission date). Shown as "Invoice date".
  - `child_invoice_id` string, MeteroidId
  - `coupons` CouponLineItem[], required
    - `coupon_id` string, required
    - `name` string, required
    - `total` integer, required
  - `created_at` string, date-time, required
  - `currency` 'AED' | 'AFN' | 'ALL' | 'AMD' | 'ANG' | 'AOA' | 'ARS' | 'AUD' | 'AWG' | 'AZN' | 'BAM' | 'BBD' | 'BDT' | 'BGN' | 'BHD' | 'BIF' | 'BMD' | 'BND' | 'BOB' | 'BRL' | 'BSD' | 'BTN' | 'BWP' | 'BYN' | 'BZD' | 'CAD' | 'CDF' | 'CHF' | 'CLP' | 'CNH' | 'CNY' | 'COP' | 'CRC' | 'CUC' | 'CUP' | 'CVE' | 'CZK' | 'DJF' | 'DKK' | 'DOP' | 'DZD' | 'EGP' | 'ERN' | 'ETB' | 'EUR' | 'FJD' | 'FKP' | 'GBP' | 'GEL' | 'GHS' | 'GIP' | 'GMD' | 'GNF' | 'GTQ' | 'GYD' | 'HKD' | 'HNL' | 'HRK' | 'HTG' | 'HUF' | 'IDR' | 'ILS' | 'INR' | 'IQD' | 'IRR' | 'ISK' | 'JMD' | 'JOD' | 'JPY' | 'KES' | 'KGS' | 'KHR' | 'KMF' | 'KPW' | 'KRW' | 'KWD' | 'KYD' | 'KZT' | 'LAK' | 'LBP' | 'LKR' | 'LRD' | 'LSL' | 'LYD' | 'MAD' | 'MDL' | 'MGA' | 'MKD' | 'MMK' | 'MNT' | 'MOP' | 'MRU' | 'MUR' | 'MVR' | 'MWK' | 'MXN' | 'MYR' | 'MZN' | 'NAD' | 'NGN' | 'NIO' | 'NOK' | 'NPR' | 'NZD' | 'OMR' | 'PAB' | 'PEN' | 'PGK' | 'PHP' | 'PKR' | 'PLN' | 'PYG' | 'QAR' | 'RON' | 'RSD' | 'RUB' | 'RWF' | 'SAR' | 'SBD' | 'SCR' | 'SDG' | 'SEK' | 'SGD' | 'SHP' | 'SLL' | 'SOS' | 'SRD' | 'SSP' | 'STD' | 'STN' | 'SVC' | 'SYP' | 'SZL' | 'THB' | 'TJS' | 'TMT' | 'TND' | 'TOP' | 'TRY' | 'TTD' | 'TWD' | 'TZS' | 'UAH' | 'UGX' | 'USD' | 'UYU' | 'UZS' | 'VES' | 'VND' | 'VUV' | 'WST' | 'XAF' | 'XCD' | 'XOF' | 'XPF' | 'YER' | 'ZAR' | 'ZMW' | 'ZWL', required
  - `custom_properties` unknown, required
  - `customer_details` CustomerDetails, required
    - `alias` string, nullable
    - `billing_address` Address
      - `city` string, nullable
      - `country` string, CountryCode
      - `line1` string, nullable
      - `line2` string, nullable
      - `state` string, nullable
      - `zip_code` string, nullable
    - `email` string, nullable
    - `id` string, MeteroidId, required
    - `name` string, required
    - `snapshot_at` string, date-time, required
    - `vat_number` string, nullable
  - `customer_id` string, MeteroidId, required
  - `due_date` string, date, nullable
  - `einvoicing_status` 'GENERATED' | 'FAILED': Whether the structured e-invoice was produced with the accounting PDF. Absent when the invoicing entity had not opted in at the time the invoice was issued.
  - `finalized_at` string, date-time, nullable
  - `id` string, MeteroidId, required
  - `invoice_date` string, date, required
  - `invoice_number` string, required
  - `invoice_type` 'RECURRING' | 'ONE_OFF' | 'ADJUSTMENT' | 'USAGE_THRESHOLD', required
  - `line_items` InvoiceLineItem[], required
    - `amount_total` integer, required
    - `credit_unit` InvoiceLineCreditUnit: How a usage line priced in a credit unit was paid: the credits it consumed, those the customer's balance in the unit covered, and the rate the rest was billed at.
      - `code` string, required: The credit unit's code, e.g. `CREDITS`.
      - `consumed` integer, required: Credits the usage priced.
      - `covered` integer, required: Of which paid by the customer's credit wallet.
      - `precision` integer, required: Credit amounts are integers in 10^-precision credit.
      - `rate` string, decimal, required: Invoice-currency major units per credit.
      - `unit_price` string, decimal, nullable: Credits per usage unit.
    - `description` string, nullable
    - `end_date` string, date, required
    - `name` string, required
    - `quantity` string, decimal
    - `quoted_unit_price` string, decimal: The tax-included unit price the customer was quoted, on a line billed from tax-inclusive prices. `unit_price` is its net counterpart.
    - `start_date` string, date, required
    - `sub_line_items` SubLineItem[], required
      - `id` string, required
      - `name` string, required
      - `quantity` string, decimal, required
      - `total` integer, required
      - `unit_price` string, decimal, required
    - `tax_rate` string, decimal, required
    - `unit_price` string, decimal
  - `marked_as_uncollectible_at` string, date-time, nullable
  - `memo` string, nullable
  - `net_terms` integer, required
  - `paid_at` string, date-time, nullable
  - `parent_invoice_id` string, MeteroidId
  - `payment_disputed_at` string, date-time, nullable: When a dispute or chargeback first took money still lost on this invoice's payments. The invoice stays paid; absent when nothing is disputed.
  - `payment_status` 'UNPAID' | 'PARTIALLY_PAID' | 'PAID' | 'ERRORED' | 'PROCESSING', required
  - `promotional_credits` integer: Promotional credit applied before tax (credit included with the plan, coupon credit, bonus credit), in minor units of the invoice currency. Like a discount, it reduces the taxable amount: `tax_amount` and `total` already exclude it, `subtotal` does not. Unlike `applied_credits`, which settles part of the `total` after tax.
  - `purchase_order` string, nullable
  - `reference` string, nullable
  - `settled_by_credit_notes` boolean, required: True when the invoice is `PAID` without any payment: finalized credit notes cancelled its whole total. Nothing was collected, so it books no cash.
  - `status` 'DRAFT' | 'FINALIZED' | 'UNCOLLECTIBLE' | 'VOID' | 'CLOSED', required
  - `subscription_id` string, MeteroidId
  - `subtotal` integer, required
  - `subtotal_recurring` integer, required
  - `tax_amount` integer, required
  - `tax_breakdown` TaxBreakdownItem[], required
    - `exemption_reason` string, nullable: Free-text legal exemption mention (EU exempt/reverse-charge invoices).
    - `exemption_type` 'REVERSE_CHARGE' | 'TAX_EXEMPT' | 'NOT_REGISTERED' | 'EXPORT' | 'NO_VAT_TERRITORY'
    - `name` string, required
    - `tax_amount` integer, required
    - `tax_rate` string, decimal, required
    - `tax_reference` string, nullable: Accounting/reporting code of the tax rate for this line, for exports.
    - `taxable_amount` integer, required
  - `tax_inclusive` boolean, required: The prices billed were quoted tax-included. Amounts are net regardless: the tax was carved out of the quoted price, so `total` is that price to the unit.
  - `total` integer, required
  - `transactions` Transaction[], required
    - `amount` integer, required
    - `amount_disputed` integer: On a PAYMENT: the part of `amount_reversed` lost to disputes or chargebacks. The invoice stays paid; only the rest of `amount_reversed` (a failed collection) reopens it.
    - `amount_refunded` integer, required: On a PAYMENT: how much was voluntarily given back (the sum of its settled REFUND children). The invoice stays paid — the Refund credit note is what reduces it.
    - `amount_reversed` integer, required: On a PAYMENT: how much was involuntarily clawed back (chargeback, bank recall, lost dispute). This is what the invoice nets out, reopening it.
    - `amount_reversed_excess` integer: On a PAYMENT: what the provider withdrew above what the payment still held (refunded before). Never applied to the invoice or credit: contest it with the provider.
    - `credit_note_id` string, MeteroidId
    - `currency` string, required
    - `error` string, nullable
    - `id` string, MeteroidId, required
    - `parent_transaction_id` string, MeteroidId
    - `payment_method_id` string, MeteroidId
    - `payment_method_info` PaymentMethodInfo
      - `account_number_hint` string, nullable
      - `card_brand` string, nullable
      - `card_last4` string, nullable
      - `payment_method_type` 'CARD' | 'BANK_TRANSFER' | 'WALLET' | 'OTHER', required
    - `payment_type` 'PAYMENT' | 'REFUND', required
    - `processed_at` string, date-time, nullable
    - `provider_transaction_id` string, nullable
    - `refund_mode` 'ONLINE' | 'OFFLINE': How a voluntary refund was issued: through the provider, or recorded after a wire or cash movement made outside Meteroid.
    - `reversal_kind` 'REFUND' | 'CHARGEBACK' | 'DEBTOR_RECALL' | 'INSUFFICIENT_FUNDS' | 'MANDATE_INVALID' | 'RETURNED' | 'DISPUTE' | 'OTHER': Why a payment was involuntarily clawed back.
    - `reversal_reason` string, nullable: The provider's raw cause, or what the operator typed when reversing by hand.
    - `status` 'READY' | 'PENDING' | 'SETTLED' | 'CANCELLED' | 'FAILED' | 'REFUNDED', required
  - `updated_at` string, date-time, nullable
  - `voided_at` string, date-time, nullable

## Other responses

- `400`: Invoice cannot be refreshed
- `401`: Unauthorized
- `404`: Invoice not found
- `429`: Too many requests
- `500`: Internal error

## Changes

- **2026-11-04** (v1) `1ce87e3576f5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/meteroid-oss/apis/meteroid/changes/api/v1/invoices/:invoice_id/refresh/post.md)

---

[API](https://skmtc.dev/meteroid-oss/apis/meteroid.md) - [All operations](https://skmtc.dev/meteroid-oss/apis/meteroid/llms.txt) - [OpenAPI document](https://skmtc.dev/meteroid-oss/apis/meteroid/revisions/7275d675ea1f?raw)
