POST
/
invoices
Create a new one off invoice
curl --request POST \
  --url https://api.cloud.flexprice.io/v1/invoices \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "amount_due": 123,
  "amount_paid": 123,
  "billing_period": "<string>",
  "billing_reason": "SUBSCRIPTION_CREATE",
  "coupons": [
    "<string>"
  ],
  "currency": "<string>",
  "customer_id": "<string>",
  "description": "<string>",
  "due_date": "<string>",
  "environment_id": "<string>",
  "idempotency_key": "<string>",
  "invoice_coupons": [
    {
      "amount_off": 123,
      "coupon_association_id": "<string>",
      "coupon_id": "<string>",
      "percentage_off": 123,
      "type": "fixed"
    }
  ],
  "invoice_number": "<string>",
  "invoice_pdf_url": "<string>",
  "invoice_status": "DRAFT",
  "invoice_type": "SUBSCRIPTION",
  "line_item_coupons": [
    {
      "amount_off": 123,
      "coupon_association_id": "<string>",
      "coupon_id": "<string>",
      "line_item_id": "<string>",
      "percentage_off": 123,
      "type": "fixed"
    }
  ],
  "line_items": [
    {
      "amount": 123,
      "display_name": "<string>",
      "entity_id": "<string>",
      "entity_type": "<string>",
      "metadata": {},
      "meter_display_name": "<string>",
      "meter_id": "<string>",
      "period_end": "<string>",
      "period_start": "<string>",
      "plan_display_name": "<string>",
      "plan_id": "<string>",
      "price_id": "<string>",
      "price_type": "<string>",
      "price_unit": "<string>",
      "price_unit_amount": 123,
      "quantity": 123
    }
  ],
  "metadata": {},
  "payment_status": "INITIATED",
  "period_end": "<string>",
  "period_start": "<string>",
  "prepared_tax_rates": [
    {
      "code": "<string>",
      "created_at": "<string>",
      "created_by": "<string>",
      "description": "<string>",
      "environment_id": "<string>",
      "fixed_value": 123,
      "id": "<string>",
      "metadata": {},
      "name": "<string>",
      "percentage_value": 123,
      "scope": "INTERNAL",
      "status": "published",
      "tax_rate_status": "ACTIVE",
      "tax_rate_type": "percentage",
      "tenant_id": "<string>",
      "updated_at": "<string>",
      "updated_by": "<string>"
    }
  ],
  "subscription_id": "<string>",
  "subtotal": 123,
  "tax_rate_overrides": [
    {
      "auto_apply": true,
      "currency": "<string>",
      "metadata": {},
      "priority": 123,
      "tax_rate_code": "<string>"
    }
  ],
  "tax_rates": [
    "<string>"
  ],
  "total": 123
}'
{
  "amount_due": 123,
  "amount_paid": 123,
  "amount_remaining": 123,
  "billing_period": "<string>",
  "billing_reason": "<string>",
  "billing_sequence": 123,
  "coupon_applications": [
    {
      "applied_at": "<string>",
      "coupon_association_id": "<string>",
      "coupon_id": "<string>",
      "coupon_snapshot": {},
      "created_at": "<string>",
      "created_by": "<string>",
      "currency": "<string>",
      "discount_percentage": 123,
      "discount_type": "fixed",
      "discounted_amount": 123,
      "environment_id": "<string>",
      "final_price": 123,
      "id": "<string>",
      "invoice_id": "<string>",
      "invoice_line_item_id": "<string>",
      "metadata": {},
      "original_price": 123,
      "status": "published",
      "subscription_id": "<string>",
      "tenant_id": "<string>",
      "updated_at": "<string>",
      "updated_by": "<string>"
    }
  ],
  "created_at": "<string>",
  "created_by": "<string>",
  "currency": "<string>",
  "customer": {
    "address_city": "<string>",
    "address_country": "<string>",
    "address_line1": "<string>",
    "address_line2": "<string>",
    "address_postal_code": "<string>",
    "address_state": "<string>",
    "created_at": "<string>",
    "created_by": "<string>",
    "email": "<string>",
    "environment_id": "<string>",
    "external_id": "<string>",
    "id": "<string>",
    "metadata": {},
    "name": "<string>",
    "status": "published",
    "tenant_id": "<string>",
    "updated_at": "<string>",
    "updated_by": "<string>"
  },
  "customer_id": "<string>",
  "description": "<string>",
  "due_date": "<string>",
  "finalized_at": "<string>",
  "id": "<string>",
  "idempotency_key": "<string>",
  "invoice_number": "<string>",
  "invoice_pdf_url": "<string>",
  "invoice_status": "DRAFT",
  "invoice_type": "SUBSCRIPTION",
  "line_items": [
    {
      "amount": 123,
      "created_at": "<string>",
      "created_by": "<string>",
      "currency": "<string>",
      "customer_id": "<string>",
      "display_name": "<string>",
      "entity_id": "<string>",
      "entity_type": "<string>",
      "id": "<string>",
      "invoice_id": "<string>",
      "metadata": {},
      "meter_display_name": "<string>",
      "meter_id": "<string>",
      "period_end": "<string>",
      "period_start": "<string>",
      "plan_display_name": "<string>",
      "plan_id": "<string>",
      "price_id": "<string>",
      "price_type": "<string>",
      "price_unit": "<string>",
      "price_unit_amount": 123,
      "price_unit_id": "<string>",
      "quantity": 123,
      "status": "<string>",
      "subscription_id": "<string>",
      "tenant_id": "<string>",
      "updated_at": "<string>",
      "updated_by": "<string>",
      "usage_analytics": [
        {
          "cost": "<string>",
          "event_count": 123,
          "percentage": "<string>",
          "source": "<string>",
          "usage": "<string>"
        }
      ],
      "usage_breakdown": [
        {
          "cost": "<string>",
          "event_count": 123,
          "grouped_by": {},
          "percentage": "<string>",
          "usage": "<string>"
        }
      ]
    }
  ],
  "metadata": {},
  "overpaid_amount": 123,
  "paid_at": "<string>",
  "payment_status": "INITIATED",
  "period_end": "<string>",
  "period_start": "<string>",
  "status": "<string>",
  "subscription": {
    "active_pause_id": "<string>",
    "billing_anchor": "<string>",
    "billing_cadence": "RECURRING",
    "billing_cycle": "anniversary",
    "billing_period": "MONTHLY",
    "billing_period_count": 123,
    "cancel_at": "<string>",
    "cancel_at_period_end": true,
    "cancelled_at": "<string>",
    "collection_method": "<string>",
    "commitment_amount": 123,
    "coupon_associations": [
      {
        "coupon": {
          "amount_off": 123,
          "cadence": "once",
          "created_at": "<string>",
          "created_by": "<string>",
          "currency": "<string>",
          "duration_in_periods": 123,
          "environment_id": "<string>",
          "id": "<string>",
          "max_redemptions": 123,
          "metadata": {},
          "name": "<string>",
          "percentage_off": 123,
          "redeem_after": "<string>",
          "redeem_before": "<string>",
          "rules": {},
          "status": "published",
          "tenant_id": "<string>",
          "total_redemptions": 123,
          "type": "fixed",
          "updated_at": "<string>",
          "updated_by": "<string>"
        },
        "coupon_id": "<string>",
        "created_at": "<string>",
        "created_by": "<string>",
        "environment_id": "<string>",
        "id": "<string>",
        "metadata": {},
        "status": "published",
        "subscription_id": "<string>",
        "subscription_line_item_id": "<string>",
        "tenant_id": "<string>",
        "updated_at": "<string>",
        "updated_by": "<string>"
      }
    ],
    "created_at": "<string>",
    "created_by": "<string>",
    "currency": "<string>",
    "current_period_end": "<string>",
    "current_period_start": "<string>",
    "customer": {
      "address_city": "<string>",
      "address_country": "<string>",
      "address_line1": "<string>",
      "address_line2": "<string>",
      "address_postal_code": "<string>",
      "address_state": "<string>",
      "created_at": "<string>",
      "created_by": "<string>",
      "email": "<string>",
      "environment_id": "<string>",
      "external_id": "<string>",
      "id": "<string>",
      "metadata": {},
      "name": "<string>",
      "status": "published",
      "tenant_id": "<string>",
      "updated_at": "<string>",
      "updated_by": "<string>"
    },
    "customer_id": "<string>",
    "customer_timezone": "<string>",
    "end_date": "<string>",
    "environment_id": "<string>",
    "gateway_payment_method_id": "<string>",
    "id": "<string>",
    "latest_invoice": {},
    "line_items": [
      {
        "billing_period": "MONTHLY",
        "created_at": "<string>",
        "created_by": "<string>",
        "currency": "<string>",
        "customer_id": "<string>",
        "display_name": "<string>",
        "end_date": "<string>",
        "entity_id": "<string>",
        "entity_type": "plan",
        "environment_id": "<string>",
        "id": "<string>",
        "invoice_cadence": "ARREAR",
        "metadata": {},
        "meter_display_name": "<string>",
        "meter_id": "<string>",
        "plan_display_name": "<string>",
        "price_id": "<string>",
        "price_type": "USAGE",
        "price_unit": "<string>",
        "price_unit_id": "<string>",
        "quantity": 123,
        "start_date": "<string>",
        "status": "published",
        "subscription_id": "<string>",
        "tenant_id": "<string>",
        "trial_period": 123,
        "updated_at": "<string>",
        "updated_by": "<string>"
      }
    ],
    "lookup_key": "<string>",
    "metadata": {},
    "overage_factor": 123,
    "pause_status": "none",
    "pauses": [
      {
        "created_at": "<string>",
        "created_by": "<string>",
        "environment_id": "<string>",
        "id": "<string>",
        "metadata": {},
        "original_period_end": "<string>",
        "original_period_start": "<string>",
        "pause_end": "<string>",
        "pause_mode": "immediate",
        "pause_start": "<string>",
        "pause_status": "none",
        "reason": "<string>",
        "resume_mode": "immediate",
        "resumed_at": "<string>",
        "status": "published",
        "subscription_id": "<string>",
        "tenant_id": "<string>",
        "updated_at": "<string>",
        "updated_by": "<string>"
      }
    ],
    "payment_behavior": "<string>",
    "plan": {
      "created_at": "<string>",
      "created_by": "<string>",
      "credit_grants": [
        {
          "cadence": "ONETIME",
          "created_at": "<string>",
          "created_by": "<string>",
          "credits": 123,
          "environment_id": "<string>",
          "expiration_duration": 123,
          "expiration_duration_unit": "DAY",
          "expiration_type": "NEVER",
          "id": "<string>",
          "metadata": {},
          "name": "<string>",
          "period": "DAILY",
          "period_count": 123,
          "plan_id": "<string>",
          "priority": 123,
          "scope": "PLAN",
          "status": "published",
          "subscription_id": "<string>",
          "tenant_id": "<string>",
          "updated_at": "<string>",
          "updated_by": "<string>"
        }
      ],
      "description": "<string>",
      "display_order": 123,
      "entitlements": [
        {
          "addon": {
            "created_at": "<string>",
            "created_by": "<string>",
            "description": "<string>",
            "entitlements": [
              {}
            ],
            "environment_id": "<string>",
            "id": "<string>",
            "lookup_key": "<string>",
            "metadata": {},
            "name": "<string>",
            "prices": [
              {
                "amount": 123,
                "billing_cadence": "RECURRING",
                "billing_model": "FLAT_FEE",
                "billing_period": "MONTHLY",
                "billing_period_count": 123,
                "conversion_rate": 123,
                "created_at": "<string>",
                "created_by": "<string>",
                "currency": "<string>",
                "description": "<string>",
                "display_amount": "<string>",
                "display_price_unit_amount": "<string>",
                "end_date": "<string>",
                "entity_id": "<string>",
                "entity_type": "PLAN",
                "environment_id": "<string>",
                "id": "<string>",
                "invoice_cadence": "ARREAR",
                "lookup_key": "<string>",
                "metadata": {},
                "meter": {
                  "aggregation": {
                    "bucket_size": "MINUTE",
                    "field": "<string>",
                    "multiplier": 123,
                    "type": "COUNT"
                  },
                  "created_at": "2024-03-20T15:04:05Z",
                  "event_name": "api_request",
                  "filters": [
                    {
                      "key": "<any>",
                      "values": "<any>"
                    }
                  ],
                  "id": "550e8400-e29b-41d4-a716-446655440000",
                  "name": "API Usage Meter",
                  "reset_usage": "BILLING_PERIOD",
                  "status": "published",
                  "tenant_id": "tenant123",
                  "updated_at": "2024-03-20T15:04:05Z"
                },
                "meter_id": "<string>",
                "parent_price_id": "<string>",
                "plan_id": "<string>",
                "price_unit": "<string>",
                "price_unit_amount": 123,
                "price_unit_id": "<string>",
                "price_unit_tiers": [
                  {
                    "flat_amount": 123,
                    "unit_amount": 123,
                    "up_to": 123
                  }
                ],
                "price_unit_type": "FIAT",
                "pricing_unit": {
                  "base_currency": "<string>",
                  "code": "<string>",
                  "conversion_rate": 123,
                  "created_at": "<string>",
                  "created_by": "<string>",
                  "environment_id": "<string>",
                  "id": "<string>",
                  "name": "<string>",
                  "precision": 123,
                  "status": "published",
                  "symbol": "<string>",
                  "tenant_id": "<string>",
                  "updated_at": "<string>",
                  "updated_by": "<string>"
                },
                "start_date": "<string>",
                "status": "published",
                "tenant_id": "<string>",
                "tier_mode": "VOLUME",
                "tiers": [
                  {
                    "flat_amount": 123,
                    "unit_amount": 123,
                    "up_to": 123
                  }
                ],
                "transform_quantity": {
                  "divide_by": 123,
                  "round": "<string>"
                },
                "trial_period": 123,
                "type": "USAGE",
                "updated_at": "<string>",
                "updated_by": "<string>"
              }
            ],
            "status": "published",
            "tenant_id": "<string>",
            "type": "onetime",
            "updated_at": "<string>",
            "updated_by": "<string>"
          },
          "created_at": "<string>",
          "created_by": "<string>",
          "display_order": 123,
          "entity_id": "<string>",
          "entity_type": "PLAN",
          "environment_id": "<string>",
          "feature": {
            "created_at": "<string>",
            "created_by": "<string>",
            "description": "<string>",
            "environment_id": "<string>",
            "id": "<string>",
            "lookup_key": "<string>",
            "metadata": {},
            "meter": {
              "aggregation": {
                "bucket_size": "MINUTE",
                "field": "<string>",
                "multiplier": 123,
                "type": "COUNT"
              },
              "created_at": "2024-03-20T15:04:05Z",
              "event_name": "api_request",
              "filters": [
                {
                  "key": "<any>",
                  "values": "<any>"
                }
              ],
              "id": "550e8400-e29b-41d4-a716-446655440000",
              "name": "API Usage Meter",
              "reset_usage": "BILLING_PERIOD",
              "status": "published",
              "tenant_id": "tenant123",
              "updated_at": "2024-03-20T15:04:05Z"
            },
            "meter_id": "<string>",
            "name": "<string>",
            "status": "published",
            "tenant_id": "<string>",
            "type": "metered",
            "unit_plural": "<string>",
            "unit_singular": "<string>",
            "updated_at": "<string>",
            "updated_by": "<string>"
          },
          "feature_id": "<string>",
          "feature_type": "metered",
          "id": "<string>",
          "is_enabled": true,
          "is_soft_limit": true,
          "plan": {},
          "plan_id": "<string>",
          "static_value": "<string>",
          "status": "published",
          "tenant_id": "<string>",
          "updated_at": "<string>",
          "updated_by": "<string>",
          "usage_limit": 123,
          "usage_reset_period": "MONTHLY"
        }
      ],
      "environment_id": "<string>",
      "id": "<string>",
      "lookup_key": "<string>",
      "metadata": {},
      "name": "<string>",
      "prices": [
        {
          "amount": 123,
          "billing_cadence": "RECURRING",
          "billing_model": "FLAT_FEE",
          "billing_period": "MONTHLY",
          "billing_period_count": 123,
          "conversion_rate": 123,
          "created_at": "<string>",
          "created_by": "<string>",
          "currency": "<string>",
          "description": "<string>",
          "display_amount": "<string>",
          "display_price_unit_amount": "<string>",
          "end_date": "<string>",
          "entity_id": "<string>",
          "entity_type": "PLAN",
          "environment_id": "<string>",
          "id": "<string>",
          "invoice_cadence": "ARREAR",
          "lookup_key": "<string>",
          "metadata": {},
          "meter": {
            "aggregation": {
              "bucket_size": "MINUTE",
              "field": "<string>",
              "multiplier": 123,
              "type": "COUNT"
            },
            "created_at": "2024-03-20T15:04:05Z",
            "event_name": "api_request",
            "filters": [
              {
                "key": "<any>",
                "values": "<any>"
              }
            ],
            "id": "550e8400-e29b-41d4-a716-446655440000",
            "name": "API Usage Meter",
            "reset_usage": "BILLING_PERIOD",
            "status": "published",
            "tenant_id": "tenant123",
            "updated_at": "2024-03-20T15:04:05Z"
          },
          "meter_id": "<string>",
          "parent_price_id": "<string>",
          "plan_id": "<string>",
          "price_unit": "<string>",
          "price_unit_amount": 123,
          "price_unit_id": "<string>",
          "price_unit_tiers": [
            {
              "flat_amount": 123,
              "unit_amount": 123,
              "up_to": 123
            }
          ],
          "price_unit_type": "FIAT",
          "pricing_unit": {
            "base_currency": "<string>",
            "code": "<string>",
            "conversion_rate": 123,
            "created_at": "<string>",
            "created_by": "<string>",
            "environment_id": "<string>",
            "id": "<string>",
            "name": "<string>",
            "precision": 123,
            "status": "published",
            "symbol": "<string>",
            "tenant_id": "<string>",
            "updated_at": "<string>",
            "updated_by": "<string>"
          },
          "start_date": "<string>",
          "status": "published",
          "tenant_id": "<string>",
          "tier_mode": "VOLUME",
          "tiers": [
            {
              "flat_amount": 123,
              "unit_amount": 123,
              "up_to": 123
            }
          ],
          "transform_quantity": {
            "divide_by": 123,
            "round": "<string>"
          },
          "trial_period": 123,
          "type": "USAGE",
          "updated_at": "<string>",
          "updated_by": "<string>"
        }
      ],
      "status": "published",
      "tenant_id": "<string>",
      "updated_at": "<string>",
      "updated_by": "<string>"
    },
    "plan_id": "<string>",
    "proration_behavior": "create_prorations",
    "schedule": {
      "created_at": "<string>",
      "current_phase_index": 123,
      "end_behavior": "RELEASE",
      "id": "<string>",
      "phases": [
        {
          "commitment_amount": 123,
          "created_at": "<string>",
          "credit_grants": [
            {
              "cadence": "ONETIME",
              "created_at": "<string>",
              "created_by": "<string>",
              "credits": 123,
              "environment_id": "<string>",
              "expiration_duration": 123,
              "expiration_duration_unit": "DAY",
              "expiration_type": "NEVER",
              "id": "<string>",
              "metadata": {},
              "name": "<string>",
              "period": "DAILY",
              "period_count": 123,
              "plan_id": "<string>",
              "priority": 123,
              "scope": "PLAN",
              "status": "published",
              "subscription_id": "<string>",
              "tenant_id": "<string>",
              "updated_at": "<string>",
              "updated_by": "<string>"
            }
          ],
          "end_date": "<string>",
          "id": "<string>",
          "line_items": [
            {
              "billing_period": "MONTHLY",
              "created_at": "<string>",
              "created_by": "<string>",
              "currency": "<string>",
              "customer_id": "<string>",
              "display_name": "<string>",
              "end_date": "<string>",
              "entity_id": "<string>",
              "entity_type": "plan",
              "environment_id": "<string>",
              "id": "<string>",
              "invoice_cadence": "ARREAR",
              "metadata": {},
              "meter_display_name": "<string>",
              "meter_id": "<string>",
              "plan_display_name": "<string>",
              "price_id": "<string>",
              "price_type": "USAGE",
              "price_unit": "<string>",
              "price_unit_id": "<string>",
              "quantity": 123,
              "start_date": "<string>",
              "status": "published",
              "subscription_id": "<string>",
              "tenant_id": "<string>",
              "trial_period": 123,
              "updated_at": "<string>",
              "updated_by": "<string>"
            }
          ],
          "overage_factor": 123,
          "phase_index": 123,
          "schedule_id": "<string>",
          "start_date": "<string>",
          "updated_at": "<string>"
        }
      ],
      "start_date": "<string>",
      "status": "ACTIVE",
      "subscription_id": "<string>",
      "updated_at": "<string>"
    },
    "start_date": "<string>",
    "status": "published",
    "subscription_status": "active",
    "tenant_id": "<string>",
    "trial_end": "<string>",
    "trial_start": "<string>",
    "updated_at": "<string>",
    "updated_by": "<string>",
    "version": 123
  },
  "subscription_id": "<string>",
  "subtotal": 123,
  "taxes": [
    {
      "applied_at": "<string>",
      "created_at": "<string>",
      "created_by": "<string>",
      "currency": "<string>",
      "entity_id": "<string>",
      "entity_type": "customer",
      "environment_id": "<string>",
      "id": "<string>",
      "idempotency_key": "<string>",
      "metadata": {},
      "status": "published",
      "tax_amount": 123,
      "tax_association_id": "<string>",
      "tax_rate": {
        "code": "<string>",
        "created_at": "<string>",
        "created_by": "<string>",
        "description": "<string>",
        "environment_id": "<string>",
        "fixed_value": 123,
        "id": "<string>",
        "metadata": {},
        "name": "<string>",
        "percentage_value": 123,
        "scope": "INTERNAL",
        "status": "published",
        "tax_rate_status": "ACTIVE",
        "tax_rate_type": "percentage",
        "tenant_id": "<string>",
        "updated_at": "<string>",
        "updated_by": "<string>"
      },
      "tax_rate_id": "<string>",
      "taxable_amount": 123,
      "tenant_id": "<string>",
      "updated_at": "<string>",
      "updated_by": "<string>"
    }
  ],
  "tenant_id": "<string>",
  "total": 123,
  "total_discount": 123,
  "total_tax": 123,
  "updated_at": "<string>",
  "updated_by": "<string>",
  "version": 123,
  "voided_at": "<string>"
}

Authorizations

x-api-key
string
header
required

Enter your API key in the format x-api-key <api-key>*

Body

application/json

Invoice details

amount_due
number
required

amount_due is the total amount that needs to be paid for this invoice

currency
string
required

currency is the three-letter ISO currency code (e.g., USD, EUR) for the invoice

customer_id
string
required

customer_id is the unique identifier of the customer this invoice belongs to

subtotal
number
required

subtotal is the amount before taxes and discounts are applied

total
number
required

total is the total amount of the invoice including taxes and discounts

amount_paid
number

amount_paid is the amount that has been paid towards this invoice

billing_period
string

billing_period is the period this invoice covers (e.g., "monthly", "yearly")

billing_reason
enum<string>
Available options:
SUBSCRIPTION_CREATE,
SUBSCRIPTION_CYCLE,
SUBSCRIPTION_UPDATE,
PRORATION,
MANUAL
coupons
string[]

coupons

description
string

description is an optional text description of the invoice

due_date
string

due_date is the date by which payment is expected

environment_id
string

environment_id is the unique identifier of the environment this invoice belongs to

idempotency_key
string

idempotency_key is an optional key used to prevent duplicate invoice creation

invoice_coupons
object[]

Invoice Coupns

invoice_number
string

invoice_number is an optional human-readable identifier for the invoice

invoice_pdf_url
string

invoice_pdf_url is the URL where customers can download the PDF version of this invoice

invoice_status
enum<string>
Available options:
DRAFT,
FINALIZED,
VOIDED
invoice_type
enum<string>
Available options:
SUBSCRIPTION,
ONE_OFF,
CREDIT
line_item_coupons
object[]

Invoice Line Item Coupons

line_items
object[]

line_items contains the individual items that make up this invoice

metadata
object
payment_status
enum<string>
Available options:
INITIATED,
PENDING,
PROCESSING,
SUCCEEDED,
OVERPAID,
FAILED,
REFUNDED,
PARTIALLY_REFUNDED
period_end
string

period_end is the end date of the billing period

period_start
string

period_start is the start date of the billing period

prepared_tax_rates
object[]

prepared_tax_rates contains the tax rates pre-resolved by the caller (e.g., billing service) These are applied at invoice level by the invoice service without further resolution

subscription_id
string

subscription_id is the optional unique identifier of the subscription associated with this invoice

tax_rate_overrides
object[]

tax_rate_overrides is the tax rate overrides to be applied to the invoice

tax_rates
string[]

tax_rates

Response

Created

amount_due
number

amount_due is the total amount that needs to be paid for this invoice

amount_paid
number

amount_paid is the amount that has been paid towards this invoice

amount_remaining
number

amount_remaining is the amount still outstanding on this invoice

billing_period
string

billing_period is the period this invoice covers (e.g., "monthly", "yearly")

billing_reason
string

billing_reason indicates why this invoice was created (subscription_cycle, manual, etc.)

billing_sequence
integer

billing_sequence is the optional sequence number for billing cycles

coupon_applications
object[]

coupon_applications contains the coupon applications associated with this invoice

created_at
string

created_at is the timestamp when this invoice was created

created_by
string

created_by is the identifier of the user who created this invoice

currency
string

currency is the three-letter ISO currency code (e.g., USD, EUR) for the invoice

customer
object

Customer response object containing all customer information

customer_id
string

customer_id is the unique identifier of the customer this invoice belongs to

description
string

description is the optional text description of the invoice

due_date
string

due_date is the date by which payment is expected

finalized_at
string

finalized_at is the timestamp when this invoice was finalized

id
string

id is the unique identifier for this invoice

idempotency_key
string

idempotency_key is the optional key used to prevent duplicate invoice creation

invoice_number
string

invoice_number is the optional human-readable identifier for the invoice

invoice_pdf_url
string

invoice_pdf_url is the optional URL to the PDF version of this invoice

invoice_status
enum<string>
Available options:
DRAFT,
FINALIZED,
VOIDED
invoice_type
enum<string>
Available options:
SUBSCRIPTION,
ONE_OFF,
CREDIT
line_items
object[]

line_items contains the individual items that make up this invoice

metadata
object
overpaid_amount
number

overpaid_amount is the amount overpaid if payment_status is OVERPAID (amount_paid - total)

paid_at
string

paid_at is the timestamp when this invoice was paid

payment_status
enum<string>
Available options:
INITIATED,
PENDING,
PROCESSING,
SUCCEEDED,
OVERPAID,
FAILED,
REFUNDED,
PARTIALLY_REFUNDED
period_end
string

period_end is the end date of the billing period

period_start
string

period_start is the start date of the billing period

status
string

status represents the current status of this invoice

subscription
object
subscription_id
string

subscription_id is the optional unique identifier of the subscription associated with this invoice

subtotal
number

subtotal is the amount before taxes and discounts are applied

taxes
object[]

tax_applied_records contains the tax applied records associated with this invoice

tenant_id
string

tenant_id is the unique identifier of the tenant this invoice belongs to

total
number

total is the total amount of the invoice including taxes and discounts

total_discount
number

total_discount is the total discount amount from coupon applications

total_tax
number

total_tax is the total tax amount for this invoice

updated_at
string

updated_at is the timestamp when this invoice was last updated

updated_by
string

updated_by is the identifier of the user who last updated this invoice

version
integer

version is the version number of this invoice

voided_at
string

voided_at is the timestamp when this invoice was voided