Stripe: Billing schemas
27 Stripe schemas with complete fields and constraints.
← Billing operations · All schemas
Create a billing alert — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests. |
alert_type | string | Required within parent | Defines the type of the alert. Known values: usage_threshold |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
livemode | boolean | Required within parent | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: billing.alert |
status | JSON | Optional | |
status (anyOf 1) | string | Alternative | Status of the alert. This can be active, inactive or archived. Known values: active, archived, inactive |
status (anyOf 2) | null | Alternative | |
title | string | Required within parent | Title of the alert. Maximum length: 5000 |
usage_threshold | JSON | Optional | |
usage_threshold (anyOf 1) | JSON | Alternative | Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://docs.stripe.com/api/billing/meter). |
usage_threshold (anyOf 1) (anyOf 1) | Model | Alternative | Expand Create a billing alert — response body — usage_threshold / value / recurrence: one time |
usage_threshold (anyOf 2) | null | Alternative |
Referenced models: Create a billing alert — response body — usage_threshold / value / recurrence: one time
Create a billing alert — response body — usage_threshold / value / recurrence: one time
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | The usage threshold alert configuration enables setting up alerts for when a certain usage threshold on a specific meter is crossed. |
filters | JSON | Optional | |
filters (anyOf 1) | array | Alternative | The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time. |
filters (anyOf 1)[] | Model | Each item | Expand Create a billing alert — response body — usage_threshold / value / recurrence: one time filters array item |
filters (anyOf 2) | null | Alternative | |
gte | JSON | Required within parent | |
gte (anyOf 1) | integer | Alternative | The value at which this alert will trigger. |
gte (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
meter | JSON | Required within parent | The [Billing Meter](/api/billing/meter) ID whose usage is monitored. |
meter (anyOf 1) | string | Alternative | Maximum length: 5000 |
meter (anyOf 2) | Model | Alternative | Expand Create a billing meter — response body |
recurrence | string | Required within parent | Defines how the alert will behave. Known values: one_time |
Referenced models: Create a billing meter — response body, Create a billing alert — response body — usage_threshold / value / recurrence: one time filters array item
Create a billing alert — response body — usage_threshold / value / recurrence: one time filters array item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
customer | JSON | Optional | |
customer (anyOf 1) | JSON | Alternative | Limit the scope of the alert to this customer ID |
customer (anyOf 1) (anyOf 1) | string | Alternative | Maximum length: 5000 |
customer (anyOf 1) (anyOf 2) | Model | Alternative | Expand Create a customer — response body |
customer (anyOf 2) | null | Alternative | |
type | string | Required within parent | Known values: customer |
Referenced models: Create a customer — response body
Create a billing meter event adjustment — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A billing meter event adjustment is a resource that allows you to cancel a meter event. For example, you might create a billing meter event adjustment to cancel a meter event that was created in error or attached to the wrong customer. |
cancel | JSON | Optional | |
cancel (anyOf 1) | JSON | Alternative | Specifies which event to cancel. |
cancel (anyOf 1) (anyOf 1) | Model | Alternative | Expand Create a billing meter event adjustment — response body — cancel Specifies which event to cancel identifier |
cancel (anyOf 2) | null | Alternative | |
event_name | string | Required within parent | The name of the meter event. Corresponds with the `event_name` field on a meter. Maximum length: 100 |
livemode | boolean | Required within parent | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: billing.meter_event_adjustment |
status | string | Required within parent | The meter event adjustment's status. Known values: complete, pending |
type | string | Required within parent | Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. Known values: cancel |
Referenced models: Create a billing meter event adjustment — response body — cancel Specifies which event to cancel identifier
Create a billing meter event adjustment — response body — cancel Specifies which event to cancel identifier
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
identifier | JSON | Optional | |
identifier (anyOf 1) | string | Alternative | Unique identifier for the event. Maximum length: 100 |
identifier (anyOf 2) | null | Alternative |
Create a billing meter event — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Meter events represent actions that customers take in your system. You can use meter events to bill a customer based on their usage. Meter events are associated with billing meters, which define both the contents of the event’s payload and how to aggregate those events. |
created | JSON | Required within parent | |
created (anyOf 1) | integer | Alternative | Time at which the object was created. Measured in seconds since the Unix epoch. Format: unix-time |
created (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
event_name | string | Required within parent | The name of the meter event. Corresponds with the `event_name` field on a meter. Maximum length: 100 |
identifier | string | Required within parent | A unique identifier for the event. Maximum length: 5000 |
livemode | boolean | Required within parent | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: billing.meter_event |
payload | object | Required within parent | The payload of the event. This contains the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://docs.stripe.com/billing/subscriptions/usage-based/meters/configure#meter-configuration-attributes). Additional keys: see wildcard field |
payload.* | string | Additional keys | Maximum length: 100 |
timestamp | JSON | Required within parent | |
timestamp (anyOf 1) | integer | Alternative | The timestamp passed in when creating the event. Measured in seconds since the Unix epoch. Format: unix-time |
timestamp (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Create a billing meter — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Meters specify how to aggregate meter events over a billing period. Meter events represent the actions that customers take in your system. Meters attach to prices and form the basis of the bill. Related guide: [Usage based billing](https://docs.stripe.com/billing/subscriptions/usage-based) |
created | JSON | Required within parent | |
created (anyOf 1) | integer | Alternative | Time at which the object was created. Measured in seconds since the Unix epoch. Format: unix-time |
created (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
customer_mapping | Model | Required within parent | Expand Create a billing meter — response body — customer mapping |
default_aggregation | Model | Required within parent | Expand Create a billing meter — response body — default aggregation |
display_name | string | Required within parent | The meter's name. Maximum length: 5000 |
event_name | string | Required within parent | The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. Maximum length: 5000 |
event_time_window | JSON | Optional | |
event_time_window (anyOf 1) | string | Alternative | The time window which meter events have been pre-aggregated for, if any. Known values: day, hour |
event_time_window (anyOf 2) | null | Alternative | |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
livemode | boolean | Required within parent | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: billing.meter |
status | string | Required within parent | The meter's status. Known values: active, inactive |
status_transitions | Model | Required within parent | Expand Create a billing meter — response body — status transitions |
updated | JSON | Required within parent | |
updated (anyOf 1) | integer | Alternative | Time at which the object was last updated. Measured in seconds since the Unix epoch. Format: unix-time |
updated (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
value_settings | Model | Required within parent | Expand Create a billing meter — response body — value settings |
Referenced models: Create a billing meter — response body — default aggregation, Create a billing meter — response body — status transitions, Create a billing meter — response body — value settings, Create a billing meter — response body — customer mapping
Create a billing meter — response body — customer mapping
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
event_payload_key | string | Required within parent | The key in the meter event payload to use for mapping the event to a customer. Maximum length: 5000 |
type | string | Required within parent | The method for mapping a meter event to a customer. Known values: by_id |
Create a billing meter — response body — default aggregation
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
formula | string | Required within parent | Specifies how events are aggregated. Known values: count, last, sum |
Create a billing meter — response body — status transitions
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
deactivated_at | JSON | Optional | |
deactivated_at (anyOf 1) | JSON | Alternative | |
deactivated_at (anyOf 1) (anyOf 1) | integer | Alternative | The time the meter was deactivated, if any. Measured in seconds since Unix epoch. Format: unix-time |
deactivated_at (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
deactivated_at (anyOf 2) | null | Alternative |
Create a billing meter — response body — value settings
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
event_payload_key | string | Required within parent | The key in the meter event payload to use as the value for this meter. Maximum length: 5000 |
Create a feedback option — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A feedback option is a reason you can present to customers when they cancel a subscription through the customer portal. Configure the set of options a customer can choose from on a [portal configuration](/api/customer_portal/configuration). Related guide: [Customer management](/customer-management) |
description | string | Required within parent | An arbitrary string attached to the object. Often useful for displaying to users. Maximum length: 5000 |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
livemode | boolean | Required within parent | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: billing.feedback_option |
status | string | Required within parent | The feedback option's status. Known values: active, inactive |
status_transitions | Model | Required within parent | Expand Create a feedback option — response body — status transitions |
Referenced models: Create a feedback option — response body — status transitions
Create a feedback option — response body — status transitions
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
deactivated_at | JSON | Optional | |
deactivated_at (anyOf 1) | JSON | Alternative | |
deactivated_at (anyOf 1) (anyOf 1) | integer | Alternative | The time the feedback option was deactivated, if any. Measured in seconds since Unix epoch. Format: unix-time |
deactivated_at (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
deactivated_at (anyOf 2) | null | Alternative |
List billing meter event summaries — response body — data item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A billing meter event summary represents an aggregated view of a customer's billing meter events within a specified timeframe. It indicates how much usage was accrued by a customer for that period. Note: Meters events are aggregated asynchronously so the meter event summaries provide an eventually consistent view of the reported usage. |
aggregated_value | JSON | Required within parent | |
aggregated_value (anyOf 1) | number | Alternative | Aggregated value of all the events within `start_time` (inclusive) and `end_time` (inclusive). The aggregation strategy is defined on meter via `default_aggregation`. |
aggregated_value (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
end_time | JSON | Required within parent | |
end_time (anyOf 1) | integer | Alternative | End timestamp for this event summary (exclusive). Must be aligned with minute boundaries. Format: unix-time |
end_time (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
livemode | boolean | Required within parent | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
meter | string | Required within parent | The meter associated with this event summary. Maximum length: 5000 |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: billing.meter_event_summary |
start_time | JSON | Required within parent | |
start_time (anyOf 1) | integer | Alternative | Start timestamp for this event summary (inclusive). Must be aligned with minute boundaries. Format: unix-time |
start_time (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Retrieve a credit balance transaction — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A credit balance transaction is a resource representing a transaction (either a credit or a debit) against an existing credit grant. |
created | JSON | Required within parent | |
created (anyOf 1) | integer | Alternative | Time at which the object was created. Measured in seconds since the Unix epoch. Format: unix-time |
created (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
credit | JSON | Optional | |
credit (anyOf 1) | JSON | Alternative | Credit details for this credit balance transaction. Only present if type is `credit`. |
credit (anyOf 1) (anyOf 1) | Model | Alternative | Expand Retrieve a credit balance transaction — response body — credit / value / type: credits application invoice voided, credits granted |
credit (anyOf 2) | null | Alternative | |
credit_grant | JSON | Required within parent | The credit grant associated with this credit balance transaction. |
credit_grant (anyOf 1) | string | Alternative | Maximum length: 5000 |
credit_grant (anyOf 2) | Model | Alternative | Expand Void a credit grant — response body |
debit | JSON | Optional | |
debit (anyOf 1) | JSON | Alternative | Debit details for this credit balance transaction. Only present if type is `debit`. |
debit (anyOf 1) (anyOf 1) | Model | Alternative | Expand Retrieve a credit balance transaction — response body — debit / value / type: credits applied, credits expired, credits voided |
debit (anyOf 2) | null | Alternative | |
effective_at | JSON | Required within parent | |
effective_at (anyOf 1) | integer | Alternative | The effective time of this credit balance transaction. Format: unix-time |
effective_at (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
livemode | boolean | Required within parent | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: billing.credit_balance_transaction |
test_clock | JSON | Optional | |
test_clock (anyOf 1) | JSON | Alternative | ID of the test clock this credit balance transaction belongs to. |
test_clock (anyOf 1) (anyOf 1) | string | Alternative | Maximum length: 5000 |
test_clock (anyOf 1) (anyOf 2) | Model | Alternative | Expand Create a test clock — response body |
test_clock (anyOf 2) | null | Alternative | |
type | JSON | Optional | |
type (anyOf 1) | string | Alternative | The type of credit balance transaction (credit or debit). Known values: credit, debit |
type (anyOf 2) | null | Alternative |
Referenced models: Void a credit grant — response body, Retrieve a credit balance transaction — response body — credit / value / type: credits application invoice voided, credits granted, Retrieve a credit balance transaction — response body — debit / value / type: credits applied, credits expired, credits voided, Create a test clock — response body
Retrieve a credit balance transaction — response body — credit / value / type: credits application invoice voided, credits granted
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
amount | Model | Required within parent | Expand Void a credit grant — response body — amount |
credits_application_invoice_voided | JSON | Optional | |
credits_application_invoice_voided (anyOf 1) | JSON | Alternative | Details of the invoice to which the reinstated credits were originally applied. Only present if `type` is `credits_application_invoice_voided`. |
credits_application_invoice_voided (anyOf 1) (anyOf 1) | Model | Alternative | Expand Retrieve a credit balance transaction — response body — credit / value / type: credits application invoice voided, credits granted credits application invoice voided value invoice, invoice line item |
credits_application_invoice_voided (anyOf 2) | null | Alternative | |
type | string | Required within parent | The type of credit transaction. Known values: credits_application_invoice_voided, credits_granted |
Referenced models: Void a credit grant — response body — amount, Retrieve a credit balance transaction — response body — credit / value / type: credits application invoice voided, credits granted credits application invoice voided value invoice, invoice line item
Retrieve a credit balance transaction — response body — credit / value / type: credits application invoice voided, credits granted credits application invoice voided value invoice, invoice line item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
invoice | JSON | Required within parent | The invoice to which the reinstated billing credits were originally applied. |
invoice (anyOf 1) | string | Alternative | Maximum length: 5000 |
invoice (anyOf 2) | Model | Alternative | Expand Pay an invoice — response body |
invoice_line_item | string | Required within parent | The invoice line item to which the reinstated billing credits were originally applied. Maximum length: 5000 |
Referenced models: Pay an invoice — response body
Retrieve a credit balance transaction — response body — debit / value / type: credits applied, credits expired, credits voided
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
amount | Model | Required within parent | Expand Void a credit grant — response body — amount |
credits_applied | JSON | Optional | |
credits_applied (anyOf 1) | JSON | Alternative | Details of how the billing credits were applied to an invoice. Only present if `type` is `credits_applied`. |
credits_applied (anyOf 1) (anyOf 1) | Model | Alternative | Expand Retrieve a credit balance transaction — response body — debit / value / type: credits applied, credits expired, credits voided credits applied value invoice, invoice line item |
credits_applied (anyOf 2) | null | Alternative | |
type | string | Required within parent | The type of debit transaction. Known values: credits_applied, credits_expired, credits_voided |
Referenced models: Void a credit grant — response body — amount, Retrieve a credit balance transaction — response body — debit / value / type: credits applied, credits expired, credits voided credits applied value invoice, invoice line item
Retrieve a credit balance transaction — response body — debit / value / type: credits applied, credits expired, credits voided credits applied value invoice, invoice line item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
invoice | JSON | Required within parent | The invoice to which the billing credits were applied. |
invoice (anyOf 1) | string | Alternative | Maximum length: 5000 |
invoice (anyOf 2) | Model | Alternative | Expand Pay an invoice — response body |
invoice_line_item | string | Required within parent | The invoice line item to which the billing credits were applied. Maximum length: 5000 |
Referenced models: Pay an invoice — response body
Retrieve the credit balance summary for a customer — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Indicates the billing credit balance for billing credits granted to a customer. |
balances | array | Required within parent | The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry. |
balances[] | Model | Each item | Expand Retrieve the credit balance summary for a customer — response body — balances item |
customer | JSON | Required within parent | The customer the balance is for. |
customer (anyOf 1) | string | Alternative | Maximum length: 5000 |
customer (anyOf 2) | Model | Alternative | Expand Create a customer — response body |
customer (anyOf 3) | Model | Alternative | Expand Delete a customer — response body |
customer_account | JSON | Optional | |
customer_account (anyOf 1) | string | Alternative | The account the balance is for. Maximum length: 5000 |
customer_account (anyOf 2) | null | Alternative | |
livemode | boolean | Required within parent | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: billing.credit_balance_summary |
Referenced models: Retrieve the credit balance summary for a customer — response body — balances item, Create a customer — response body, Delete a customer — response body
Retrieve the credit balance summary for a customer — response body — balances item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
available_balance | Model | Required within parent | Expand Void a credit grant — response body — amount |
ledger_balance | Model | Required within parent | Expand Void a credit grant — response body — amount |
Referenced models: Void a credit grant — response body — amount
Void a credit grant — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | A credit grant is an API resource that documents the allocation of some billing credits to a customer. Related guide: [Billing credits](https://docs.stripe.com/billing/subscriptions/usage-based/billing-credits) |
amount | Model | Required within parent | Expand Void a credit grant — response body — amount |
applicability_config | Model | Required within parent | Expand Void a credit grant — response body — applicability config |
category | string | Required within parent | The category of this credit grant. This is for tracking purposes and isn't displayed to the customer. Known values: paid, promotional |
created | JSON | Required within parent | |
created (anyOf 1) | integer | Alternative | Time at which the object was created. Measured in seconds since the Unix epoch. Format: unix-time |
created (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
customer | JSON | Required within parent | ID of the customer receiving the billing credits. |
customer (anyOf 1) | string | Alternative | Maximum length: 5000 |
customer (anyOf 2) | Model | Alternative | Expand Create a customer — response body |
customer (anyOf 3) | Model | Alternative | Expand Delete a customer — response body |
customer_account | JSON | Optional | |
customer_account (anyOf 1) | string | Alternative | ID of the account representing the customer receiving the billing credits Maximum length: 5000 |
customer_account (anyOf 2) | null | Alternative | |
effective_at | JSON | Optional | |
effective_at (anyOf 1) | JSON | Alternative | |
effective_at (anyOf 1) (anyOf 1) | integer | Alternative | The time when the billing credits become effective-when they're eligible for use. Format: unix-time |
effective_at (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
effective_at (anyOf 2) | null | Alternative | |
expires_at | JSON | Optional | |
expires_at (anyOf 1) | JSON | Alternative | |
expires_at (anyOf 1) (anyOf 1) | integer | Alternative | The time when the billing credits expire. If not present, the billing credits don't expire. Format: unix-time |
expires_at (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
expires_at (anyOf 2) | null | Alternative | |
id | string | Required within parent | Unique identifier for the object. Maximum length: 5000 |
livemode | boolean | Required within parent | If the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`. |
metadata | object | Required within parent | Set of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Additional keys: see wildcard field |
metadata.* | string | Additional keys | Maximum length: 500 |
name | JSON | Optional | |
name (anyOf 1) | string | Alternative | A descriptive name shown in dashboard. Maximum length: 5000 |
name (anyOf 2) | null | Alternative | |
object | string | Required within parent | String representing the object's type. Objects of the same type share the same value. Known values: billing.credit_grant |
priority | JSON | Optional | |
priority (anyOf 1) | JSON | Alternative | |
priority (anyOf 1) (anyOf 1) | integer | Alternative | The priority for applying this credit grant. The highest priority is 0 and the lowest is 100. |
priority (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
priority (anyOf 2) | null | Alternative | |
test_clock | JSON | Optional | |
test_clock (anyOf 1) | JSON | Alternative | ID of the test clock this credit grant belongs to. |
test_clock (anyOf 1) (anyOf 1) | string | Alternative | Maximum length: 5000 |
test_clock (anyOf 1) (anyOf 2) | Model | Alternative | Expand Create a test clock — response body |
test_clock (anyOf 2) | null | Alternative | |
updated | JSON | Required within parent | |
updated (anyOf 1) | integer | Alternative | Time at which the object was last updated. Measured in seconds since the Unix epoch. Format: unix-time |
updated (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
voided_at | JSON | Optional | |
voided_at (anyOf 1) | JSON | Alternative | |
voided_at (anyOf 1) (anyOf 1) | integer | Alternative | The time when this credit grant was voided. If not present, the credit grant hasn't been voided. Format: unix-time |
voided_at (anyOf 1) (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
voided_at (anyOf 2) | null | Alternative |
Referenced models: Void a credit grant — response body — amount, Void a credit grant — response body — applicability config, Create a customer — response body, Delete a customer — response body, Create a test clock — response body
Void a credit grant — response body — amount
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
monetary | JSON | Optional | |
monetary (anyOf 1) | JSON | Alternative | The monetary amount. |
monetary (anyOf 1) (anyOf 1) | Model | Alternative | Expand Void a credit grant — response body — amount monetary The monetary amount currency, value |
monetary (anyOf 2) | null | Alternative | |
type | string | Required within parent | The type of this amount. We currently only support `monetary` billing credits. Known values: monetary |
Referenced models: Void a credit grant — response body — amount monetary The monetary amount currency, value
Void a credit grant — response body — amount monetary The monetary amount currency, value
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
currency | string | Required within parent | Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Maximum length: 5000 |
value | JSON | Required within parent | |
value (anyOf 1) | integer | Alternative | A positive integer representing the amount. |
value (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Void a credit grant — response body — applicability config
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
scope | Model | Required within parent | Expand Void a credit grant — response body — applicability config scope |
Referenced models: Void a credit grant — response body — applicability config scope
Void a credit grant — response body — applicability config scope
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
price_type | string | Optional | The price type that credit grants can apply to. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. Cannot be used in combination with `prices`. Known values: metered |
prices | array | Optional | The prices that credit grants can apply to. We currently only support `metered` prices. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. Cannot be used in combination with `price_type`. |
prices[] | Model | Each item | Expand Void a credit grant — response body — applicability config scope prices item |
Referenced models: Void a credit grant — response body — applicability config scope prices item
Void a credit grant — response body — applicability config scope prices item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
id | JSON | Optional | |
id (anyOf 1) | string | Alternative | Unique identifier for the object. Maximum length: 5000 |
id (anyOf 2) | null | Alternative |