Update the payment status of an invoice
curl --request PUT \
--url https://api.cloud.flexprice.io/v1/invoices/{id}/payment \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"payment_status": "INITIATED",
"amount": 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>",
"end_date": "<string>",
"environment_id": "<string>",
"id": "<string>",
"metadata": {},
"start_date": "<string>",
"status": "published",
"subscription_id": "<string>",
"subscription_line_item_id": "<string>",
"subscription_phase_id": "<string>",
"tenant_id": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
}
],
"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>"
}
],
"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>",
"invoicing_customer_id": "<string>",
"latest_invoice": "<unknown>",
"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": {
"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>",
"group_id": "<string>",
"id": "<string>",
"invoice_cadence": "ARREAR",
"lookup_key": "<string>",
"metadata": {},
"meter_id": "<string>",
"parent_price_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",
"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>"
},
"price_id": "<string>",
"price_type": "USAGE",
"price_unit": "<string>",
"price_unit_id": "<string>",
"quantity": 123,
"start_date": "<string>",
"status": "published",
"subscription_id": "<string>",
"subscription_phase_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>",
"phases": [
{
"created_at": "<string>",
"created_by": "<string>",
"end_date": "<string>",
"environment_id": "<string>",
"id": "<string>",
"metadata": {},
"start_date": "<string>",
"status": "published",
"subscription_id": "<string>",
"tenant_id": "<string>",
"updated_at": "<string>",
"updated_by": "<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": "<array>",
"environment_id": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"metadata": {},
"name": "<string>",
"prices": [
{
"addon": "<unknown>",
"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>",
"group": {
"created_at": "<string>",
"entity_ids": [
"<string>"
],
"entity_type": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"metadata": {},
"name": "<string>",
"status": "<string>",
"updated_at": "<string>"
},
"group_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": "<string>",
"values": [
"<string>"
]
}
],
"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": "<unknown>",
"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": {
"alert_settings": {
"alert_enabled": true,
"critical": {
"condition": "above",
"threshold": 123
},
"info": {
"condition": "above",
"threshold": 123
},
"warning": {
"condition": "above",
"threshold": 123
}
},
"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": "<string>",
"values": [
"<string>"
]
}
],
"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,
"parent_entitlement_id": "<string>",
"plan": "<unknown>",
"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": [
{
"addon": "<unknown>",
"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>",
"group": {
"created_at": "<string>",
"entity_ids": [
"<string>"
],
"entity_type": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"metadata": {},
"name": "<string>",
"status": "<string>",
"updated_at": "<string>"
},
"group_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": "<string>",
"values": [
"<string>"
]
}
],
"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": "<unknown>",
"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",
"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>"
}Enter your API key in the format x-api-key <api-key>*
Invoice ID
Payment Status Update Request
OK
amount_due is the total amount that needs to be paid for this invoice
amount_paid is the amount that has been paid towards this invoice
amount_remaining is the amount still outstanding on this invoice
billing_period is the period this invoice covers (e.g., "monthly", "yearly")
billing_reason indicates why this invoice was created (subscription_cycle, manual, etc.)
billing_sequence is the optional sequence number for billing cycles
coupon_applications contains the coupon applications associated with this invoice
Show child attributes
fixed, percentage published, deleted, archived created_at is the timestamp when this invoice was created
created_by is the identifier of the user who created this invoice
currency is the three-letter ISO currency code (e.g., USD, EUR) for the invoice
Customer response object containing all customer information
Show child attributes
AddressCity is the city of the customer's address
AddressCountry is the country of the customer's address (ISO 3166-1 alpha-2)
AddressLine1 is the first line of the customer's address
AddressLine2 is the second line of the customer's address
AddressPostalCode is the postal code of the customer's address
AddressState is the state of the customer's address
Email is the email of the customer
EnvironmentID is the environment identifier for the customer
ExternalID is the external identifier for the customer
ID is the unique identifier for the customer
Name is the name of the customer
published, deleted, archived customer_id is the unique identifier of the customer this invoice belongs to
description is the optional text description of the invoice
due_date is the date by which payment is expected
finalized_at is the timestamp when this invoice was finalized
id is the unique identifier for this invoice
idempotency_key is the optional key used to prevent duplicate invoice creation
invoice_number is the optional human-readable identifier for the invoice
invoice_pdf_url is the optional URL to the PDF version of this invoice
DRAFT, FINALIZED, VOIDED SUBSCRIPTION, ONE_OFF, CREDIT line_items contains the individual items that make up this invoice
Show child attributes
amount is the monetary amount for this line item
created_at is the timestamp when this line item was created
created_by is the identifier of the user who created this line item
currency is the three-letter ISO currency code for this line item
customer_id is the unique identifier of the customer associated with this line item
display_name is the optional human-readable name for this line item
entity_id is the optional unique identifier of the entity associated with this line item
entity_type is the optional type of the entity associated with this line item
id is the unique identifier for this line item
invoice_id is the unique identifier of the invoice this line item belongs to
meter_display_name is the optional human-readable name of the meter
meter_id is the optional unique identifier of the meter used for usage tracking
period_end is the optional end date of the period this line item covers
period_start is the optional start date of the period this line item covers
plan_display_name is the optional human-readable name of the plan
plan_id is the optional unique identifier of the plan associated with this line item
price_id is the optional unique identifier of the price associated with this line item
price_type indicates the type of pricing (fixed, usage, tiered, etc.)
price_unit is the optional 3-digit ISO code of the price unit associated with this line item
price_unit_amount is the optional amount converted to the price unit currency
price_unit_id is the optional unique identifier of the price unit associated with this line item
quantity is the quantity of units for this line item
status represents the current status of this line item
subscription_id is the optional unique identifier of the subscription associated with this line item
tenant_id is the unique identifier of the tenant this line item belongs to
updated_at is the timestamp when this line item was last updated
updated_by is the identifier of the user who last updated this line item
usage_analytics contains usage analytics for this line item (legacy - grouped by source)
Show child attributes
cost is the cost attributed to this source for the line item
event_count is the number of events from this source (optional)
percentage is the percentage of total line item cost from this source (optional)
source is the name of the event source
usage is the total usage amount from this source (optional, for additional context)
usage_breakdown contains flexible usage breakdown for this line item (supports any grouping)
Show child attributes
cost is the cost attributed to this group for the line item
event_count is the number of events from this group (optional)
percentage is the percentage of total line item cost from this group (optional)
usage is the total usage amount from this group (optional, for additional context)
overpaid_amount is the amount overpaid if payment_status is OVERPAID (amount_paid - total)
paid_at is the timestamp when this invoice was paid
INITIATED, PENDING, PROCESSING, SUCCEEDED, OVERPAID, FAILED, REFUNDED, PARTIALLY_REFUNDED period_end is the end date of the billing period
period_start is the start date of the billing period
status represents the current status of this invoice
Show child attributes
ActivePauseID references the current active pause configuration This will be null if no pause is active or scheduled
BillingAnchor is the reference point that aligns future billing cycle dates. It sets the day of week for week intervals, the day of month for month and year intervals, and the month of year for year intervals. The timestamp is in UTC format.
RECURRING, ONETIME anniversary, calendar MONTHLY, ANNUAL, WEEKLY, DAILY, QUARTERLY, HALF_YEARLY BillingPeriodCount is the total number units of the billing period.
CancelAt is the date the subscription will be canceled
CancelAtPeriodEnd is whether the subscription was canceled at the end of the current period
CanceledAt is the date the subscription was canceled
CollectionMethod determines how invoices are collected
CommitmentAmount is the minimum amount a customer commits to paying for a billing period
CouponAssociations are the coupon associations for this subscription
Show child attributes
Show child attributes
once, repeated, forever published, deleted, archived fixed, percentage Optional
published, deleted, archived Mandatory
Optional
Optional
Credit grants are the credit grants for this subscription
Show child attributes
ONETIME, RECURRING DAY, WEEK, MONTH, YEAR NEVER, DURATION, BILLING_CYCLE DAILY, WEEKLY, MONTHLY, ANNUAL, QUARTERLY, HALF_YEARLY PLAN, SUBSCRIPTION published, deleted, archived Currency is the currency of the subscription in lowercase 3 digit ISO codes
CurrentPeriodEnd is the end of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.
CurrentPeriodStart is the end of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created.
Customer response object containing all customer information
Show child attributes
AddressCity is the city of the customer's address
AddressCountry is the country of the customer's address (ISO 3166-1 alpha-2)
AddressLine1 is the first line of the customer's address
AddressLine2 is the second line of the customer's address
AddressPostalCode is the postal code of the customer's address
AddressState is the state of the customer's address
Email is the email of the customer
EnvironmentID is the environment identifier for the customer
ExternalID is the external identifier for the customer
ID is the unique identifier for the customer
Name is the name of the customer
published, deleted, archived CustomerID is the identifier for the customer in our system
EndDate is the end date of the subscription
EnvironmentID is the environment identifier for the subscription
GatewayPaymentMethodID is the gateway payment method ID for this subscription
ID is the unique identifier for the subscription
InvoicingCustomerID is the customer ID to use for invoicing This can differ from the subscription customer (e.g., parent company invoicing for child company)
Show child attributes
MONTHLY, ANNUAL, WEEKLY, DAILY, QUARTERLY, HALF_YEARLY plan, addon ARREAR, ADVANCE Show child attributes
Amount stored in main currency units (e.g., dollars, not cents) For USD: 12.50 means $12.50
RECURRING, ONETIME FLAT_FEE, PACKAGE, TIERED MONTHLY, ANNUAL, WEEKLY, DAILY, QUARTERLY, HALF_YEARLY BillingPeriodCount is the count of the billing period ex 1, 3, 6, 12
ConversionRate is the rate of the price unit to the base currency For BTC: 1 BTC = 100000000 USD
Currency 3 digit ISO currency code in lowercase ex usd, eur, gbp
Description of the price
DisplayAmount is the formatted amount with currency symbol For USD: $12.50
DisplayPriceUnitAmount is the formatted amount with price unit symbol For BTC: 0.00000001 BTC
EndDate is the end date of the price
EntityID holds the value of the "entity_id" field.
PLAN, SUBSCRIPTION, ADDON, PRICE, COSTSHEET EnvironmentID is the environment identifier for the price
GroupID references the group this price belongs to
ID uuid identifier for the price
ARREAR, ADVANCE LookupKey used for looking up the price in the database
MeterID is the id of the meter for usage based pricing
ParentPriceID references the root price (always set for price lineage tracking)
PriceUnit 3 digit ISO currency code in lowercase ex btc For BTC: btc
PriceUnitAmount is the amount stored in price unit For BTC: 0.00000001 means 0.00000001 BTC
PriceUnitID is the id of the price unit
PriceUnitTiers are the tiers for the price unit
Show child attributes
flat_amount is the flat amount for the given tier (optional) Applied on top of unit_amount*quantity. Useful for cases like "2.7$ + 5c"
unit_amount is the amount per unit for the given tier
up_to is the quantity up to which this tier applies. It is null for the last tier. IMPORTANT: Tier boundaries are INCLUSIVE.
FIAT, CUSTOM StartDate is the start date of the price
published, deleted, archived VOLUME, SLAB Show child attributes
flat_amount is the flat amount for the given tier (optional) Applied on top of unit_amount*quantity. Useful for cases like "2.7$ + 5c"
unit_amount is the amount per unit for the given tier
up_to is the quantity up to which this tier applies. It is null for the last tier. IMPORTANT: Tier boundaries are INCLUSIVE.
TrialPeriod is the number of days for the trial period Note: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)
USAGE, FIXED USAGE, FIXED published, deleted, archived LookupKey is the key used to lookup the subscription in our system
OverageFactor is a multiplier applied to usage beyond the commitment amount
none, active, scheduled, completed, cancelled Show child attributes
EnvironmentID is the environment identifier for the pause
ID is the unique identifier for the subscription pause
OriginalPeriodEnd is the end of the billing period when the pause was created
OriginalPeriodStart is the start of the billing period when the pause was created
PauseEnd is when the pause will end (null for indefinite)
immediate, scheduled, period_end PauseStart is when the pause actually started
none, active, scheduled, completed, cancelled Reason is the reason for pausing
immediate, scheduled, auto ResumedAt is when the pause was actually ended (if manually resumed)
published, deleted, archived SubscriptionID is the identifier for the subscription
PaymentBehavior determines how subscription payments are handled
Phases are the subscription phases for this subscription
Show child attributes
EndDate is when the phase ends (nil if phase is still active or indefinite)
EnvironmentID is the environment identifier for the phase
ID is the unique identifier for the subscription phase
StartDate is when the phase starts
published, deleted, archived SubscriptionID is the identifier for the subscription
Show child attributes
Show child attributes
ONETIME, RECURRING DAY, WEEK, MONTH, YEAR NEVER, DURATION, BILLING_CYCLE DAILY, WEEKLY, MONTHLY, ANNUAL, QUARTERLY, HALF_YEARLY PLAN, SUBSCRIPTION published, deleted, archived Show child attributes
Show child attributes
Optional expanded fields
Show child attributes
Amount stored in main currency units (e.g., dollars, not cents) For USD: 12.50 means $12.50
RECURRING, ONETIME FLAT_FEE, PACKAGE, TIERED MONTHLY, ANNUAL, WEEKLY, DAILY, QUARTERLY, HALF_YEARLY BillingPeriodCount is the count of the billing period ex 1, 3, 6, 12
ConversionRate is the rate of the price unit to the base currency For BTC: 1 BTC = 100000000 USD
Currency 3 digit ISO currency code in lowercase ex usd, eur, gbp
Description of the price
DisplayAmount is the formatted amount with currency symbol For USD: $12.50
DisplayPriceUnitAmount is the formatted amount with price unit symbol For BTC: 0.00000001 BTC
EndDate is the end date of the price
EntityID holds the value of the "entity_id" field.
PLAN, SUBSCRIPTION, ADDON, PRICE, COSTSHEET EnvironmentID is the environment identifier for the price
Show child attributes
GroupID references the group this price belongs to
ID uuid identifier for the price
ARREAR, ADVANCE LookupKey used for looking up the price in the database
Show child attributes
Show child attributes
MINUTE, 15MIN, 30MIN, HOUR, 3HOUR, 6HOUR, 12HOUR, DAY, WEEK, MONTH Field is the key in $event.properties on which the aggregation is to be applied For ex if the aggregation type is sum for API usage, the field could be "duration_ms"
Multiplier is the multiplier for the aggregation For ex if the aggregation type is sum_with_multiplier for API usage, the multiplier could be 1000 to scale up by a factor of 1000. If not provided, it will be null.
COUNT, SUM, AVG, COUNT_UNIQUE, LATEST, SUM_WITH_MULTIPLIER, MAX, WEIGHTED_SUM "2024-03-20T15:04:05Z"
"api_request"
Show child attributes
Key is the key for the filter from $event.properties Currently we support only first level keys in the properties and not nested keys
Values are the possible values for the filter to be considered for the meter For ex "model_name" could have values "o1-mini", "gpt-4o" etc
"550e8400-e29b-41d4-a716-446655440000"
"API Usage Meter"
BILLING_PERIOD, NEVER "published"
"tenant123"
"2024-03-20T15:04:05Z"
MeterID is the id of the meter for usage based pricing
ParentPriceID references the root price (always set for price lineage tracking)
TODO: Remove this once we have a proper price entity type
PriceUnit 3 digit ISO currency code in lowercase ex btc For BTC: btc
PriceUnitAmount is the amount stored in price unit For BTC: 0.00000001 means 0.00000001 BTC
PriceUnitID is the id of the price unit
PriceUnitTiers are the tiers for the price unit
Show child attributes
flat_amount is the flat amount for the given tier (optional) Applied on top of unit_amount*quantity. Useful for cases like "2.7$ + 5c"
unit_amount is the amount per unit for the given tier
up_to is the quantity up to which this tier applies. It is null for the last tier. IMPORTANT: Tier boundaries are INCLUSIVE.
FIAT, CUSTOM Show child attributes
published, deleted, archived StartDate is the start date of the price
published, deleted, archived VOLUME, SLAB Show child attributes
flat_amount is the flat amount for the given tier (optional) Applied on top of unit_amount*quantity. Useful for cases like "2.7$ + 5c"
unit_amount is the amount per unit for the given tier
up_to is the quantity up to which this tier applies. It is null for the last tier. IMPORTANT: Tier boundaries are INCLUSIVE.
TrialPeriod is the number of days for the trial period Note: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)
USAGE, FIXED published, deleted, archived onetime PLAN, SUBSCRIPTION, ADDON Show child attributes
Show child attributes
Show child attributes
Show child attributes
MINUTE, 15MIN, 30MIN, HOUR, 3HOUR, 6HOUR, 12HOUR, DAY, WEEK, MONTH Field is the key in $event.properties on which the aggregation is to be applied For ex if the aggregation type is sum for API usage, the field could be "duration_ms"
Multiplier is the multiplier for the aggregation For ex if the aggregation type is sum_with_multiplier for API usage, the multiplier could be 1000 to scale up by a factor of 1000. If not provided, it will be null.
COUNT, SUM, AVG, COUNT_UNIQUE, LATEST, SUM_WITH_MULTIPLIER, MAX, WEIGHTED_SUM "2024-03-20T15:04:05Z"
"api_request"
Show child attributes
Key is the key for the filter from $event.properties Currently we support only first level keys in the properties and not nested keys
Values are the possible values for the filter to be considered for the meter For ex "model_name" could have values "o1-mini", "gpt-4o" etc
"550e8400-e29b-41d4-a716-446655440000"
"API Usage Meter"
BILLING_PERIOD, NEVER "published"
"tenant123"
"2024-03-20T15:04:05Z"
published, deleted, archived metered, boolean, static metered, boolean, static TODO: Remove this once we have a proper entitlement entity type
published, deleted, archived MONTHLY, ANNUAL, WEEKLY, DAILY, QUARTERLY, HALF_YEARLY, NEVER TODO: Add inline addons
Show child attributes
Amount stored in main currency units (e.g., dollars, not cents) For USD: 12.50 means $12.50
RECURRING, ONETIME FLAT_FEE, PACKAGE, TIERED MONTHLY, ANNUAL, WEEKLY, DAILY, QUARTERLY, HALF_YEARLY BillingPeriodCount is the count of the billing period ex 1, 3, 6, 12
ConversionRate is the rate of the price unit to the base currency For BTC: 1 BTC = 100000000 USD
Currency 3 digit ISO currency code in lowercase ex usd, eur, gbp
Description of the price
DisplayAmount is the formatted amount with currency symbol For USD: $12.50
DisplayPriceUnitAmount is the formatted amount with price unit symbol For BTC: 0.00000001 BTC
EndDate is the end date of the price
EntityID holds the value of the "entity_id" field.
PLAN, SUBSCRIPTION, ADDON, PRICE, COSTSHEET EnvironmentID is the environment identifier for the price
Show child attributes
GroupID references the group this price belongs to
ID uuid identifier for the price
ARREAR, ADVANCE LookupKey used for looking up the price in the database
Show child attributes
Show child attributes
MINUTE, 15MIN, 30MIN, HOUR, 3HOUR, 6HOUR, 12HOUR, DAY, WEEK, MONTH Field is the key in $event.properties on which the aggregation is to be applied For ex if the aggregation type is sum for API usage, the field could be "duration_ms"
Multiplier is the multiplier for the aggregation For ex if the aggregation type is sum_with_multiplier for API usage, the multiplier could be 1000 to scale up by a factor of 1000. If not provided, it will be null.
COUNT, SUM, AVG, COUNT_UNIQUE, LATEST, SUM_WITH_MULTIPLIER, MAX, WEIGHTED_SUM "2024-03-20T15:04:05Z"
"api_request"
Show child attributes
Key is the key for the filter from $event.properties Currently we support only first level keys in the properties and not nested keys
Values are the possible values for the filter to be considered for the meter For ex "model_name" could have values "o1-mini", "gpt-4o" etc
"550e8400-e29b-41d4-a716-446655440000"
"API Usage Meter"
BILLING_PERIOD, NEVER "published"
"tenant123"
"2024-03-20T15:04:05Z"
MeterID is the id of the meter for usage based pricing
ParentPriceID references the root price (always set for price lineage tracking)
TODO: Remove this once we have a proper price entity type
PriceUnit 3 digit ISO currency code in lowercase ex btc For BTC: btc
PriceUnitAmount is the amount stored in price unit For BTC: 0.00000001 means 0.00000001 BTC
PriceUnitID is the id of the price unit
PriceUnitTiers are the tiers for the price unit
Show child attributes
flat_amount is the flat amount for the given tier (optional) Applied on top of unit_amount*quantity. Useful for cases like "2.7$ + 5c"
unit_amount is the amount per unit for the given tier
up_to is the quantity up to which this tier applies. It is null for the last tier. IMPORTANT: Tier boundaries are INCLUSIVE.
FIAT, CUSTOM Show child attributes
published, deleted, archived StartDate is the start date of the price
published, deleted, archived VOLUME, SLAB Show child attributes
flat_amount is the flat amount for the given tier (optional) Applied on top of unit_amount*quantity. Useful for cases like "2.7$ + 5c"
unit_amount is the amount per unit for the given tier
up_to is the quantity up to which this tier applies. It is null for the last tier. IMPORTANT: Tier boundaries are INCLUSIVE.
TrialPeriod is the number of days for the trial period Note: This is only applicable for recurring prices (BILLING_CADENCE_RECURRING)
USAGE, FIXED published, deleted, archived PlanID is the identifier for the plan in our system
create_prorations, none StartDate is the start date of the subscription
published, deleted, archived active, paused, cancelled, incomplete, incomplete_expired, past_due, trialing, unpaid, draft TrialEnd is the end date of the trial period
TrialStart is the start date of the trial period
Version is used for optimistic locking
subscription_id is the optional unique identifier of the subscription associated with this invoice
subtotal is the amount before taxes and discounts are applied
tax_applied_records contains the tax applied records associated with this invoice
Show child attributes
customer, subscription, invoice, tenant published, deleted, archived Show child attributes
INTERNAL, EXTERNAL, ONETIME published, deleted, archived ACTIVE, INACTIVE percentage, fixed tenant_id is the unique identifier of the tenant this invoice belongs to
total is the total amount of the invoice including taxes and discounts
total_discount is the total discount amount from coupon applications
total_tax is the total tax amount for this invoice
updated_at is the timestamp when this invoice was last updated
updated_by is the identifier of the user who last updated this invoice
version is the version number of this invoice
voided_at is the timestamp when this invoice was voided
curl --request PUT \
--url https://api.cloud.flexprice.io/v1/invoices/{id}/payment \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"payment_status": "INITIATED",
"amount": 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>",
"end_date": "<string>",
"environment_id": "<string>",
"id": "<string>",
"metadata": {},
"start_date": "<string>",
"status": "published",
"subscription_id": "<string>",
"subscription_line_item_id": "<string>",
"subscription_phase_id": "<string>",
"tenant_id": "<string>",
"updated_at": "<string>",
"updated_by": "<string>"
}
],
"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>"
}
],
"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>",
"invoicing_customer_id": "<string>",
"latest_invoice": "<unknown>",
"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": {
"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>",
"group_id": "<string>",
"id": "<string>",
"invoice_cadence": "ARREAR",
"lookup_key": "<string>",
"metadata": {},
"meter_id": "<string>",
"parent_price_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",
"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>"
},
"price_id": "<string>",
"price_type": "USAGE",
"price_unit": "<string>",
"price_unit_id": "<string>",
"quantity": 123,
"start_date": "<string>",
"status": "published",
"subscription_id": "<string>",
"subscription_phase_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>",
"phases": [
{
"created_at": "<string>",
"created_by": "<string>",
"end_date": "<string>",
"environment_id": "<string>",
"id": "<string>",
"metadata": {},
"start_date": "<string>",
"status": "published",
"subscription_id": "<string>",
"tenant_id": "<string>",
"updated_at": "<string>",
"updated_by": "<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": "<array>",
"environment_id": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"metadata": {},
"name": "<string>",
"prices": [
{
"addon": "<unknown>",
"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>",
"group": {
"created_at": "<string>",
"entity_ids": [
"<string>"
],
"entity_type": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"metadata": {},
"name": "<string>",
"status": "<string>",
"updated_at": "<string>"
},
"group_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": "<string>",
"values": [
"<string>"
]
}
],
"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": "<unknown>",
"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": {
"alert_settings": {
"alert_enabled": true,
"critical": {
"condition": "above",
"threshold": 123
},
"info": {
"condition": "above",
"threshold": 123
},
"warning": {
"condition": "above",
"threshold": 123
}
},
"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": "<string>",
"values": [
"<string>"
]
}
],
"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,
"parent_entitlement_id": "<string>",
"plan": "<unknown>",
"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": [
{
"addon": "<unknown>",
"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>",
"group": {
"created_at": "<string>",
"entity_ids": [
"<string>"
],
"entity_type": "<string>",
"id": "<string>",
"lookup_key": "<string>",
"metadata": {},
"name": "<string>",
"status": "<string>",
"updated_at": "<string>"
},
"group_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": "<string>",
"values": [
"<string>"
]
}
],
"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": "<unknown>",
"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",
"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>"
}