Skip to content
  • Auto
  • Light
  • Dark
Talk to an expert

Edit

Edit a contract
client.v2.contracts.edit(ContractEditParamsbody, RequestOptionsoptions?): dataIDContractEditResponse
post/v2/contracts/edit

Edit a contract. Contract editing must be enabled to use this endpoint.

Parameters
bodycontract_idstringcustomer_idstringadd_commitsarrayadd_creditsarrayadd_discountsarrayadd_overridesarrayadd_prepaid_balance_threshold_configurationAddPrepaidBalanceThresholdConfigurationadd_professional_servicesarrayadd_recurring_commitsarrayadd_recurring_creditsarrayadd_reseller_royaltiesarrayadd_scheduled_chargesarrayadd_spend_threshold_configurationAddSpendThresholdConfigurationadd_subscriptionsarrayallow_contract_ending_before_finalized_invoicebooleanarchive_commitsarrayarchive_creditsarrayarchive_scheduled_chargesarrayremove_overridesarrayupdate_commitsarrayupdate_contract_end_dateunionupdate_contract_nameunionupdate_creditsarrayupdate_prepaid_balance_threshold_configurationUpdatePrepaidBalanceThresholdConfigurationupdate_recurring_commitsarrayupdate_recurring_creditsarrayupdate_scheduled_chargesarrayupdate_spend_threshold_configurationUpdateSpendThresholdConfigurationupdate_subscriptionsarrayContractEditParams
Hide ParametersShow Parameters
contract_idstring

ID of the contract being edited

formatuuid
customer_idstring

ID of the customer whose contract is being edited

formatuuid
add_commitsarray
optional
Array<AddCommit>
Hide ParametersShow Parameters
product_idstring
formatuuid
typeunion
"PREPAID" | "POSTPAID"
Hide ParametersShow Parameters
"PREPAID"
"POSTPAID"
access_scheduleschedule_itemsarraycredit_type_idstringAccessSchedule
optional

Required: Schedule for distributing the commit to the customer. For "POSTPAID" commits only one schedule item is allowed and amount must match invoice_schedule total.

Hide ParametersShow Parameters
schedule_itemsarray
Hide ParametersShow Parameters
amountnumber
ending_beforestring

RFC 3339 timestamp (exclusive)

formatdate-time
starting_atstring

RFC 3339 timestamp (inclusive)

formatdate-time
credit_type_idstring
optional
formatuuid
amountnumber
optional

(DEPRECATED) Use access_schedule and invoice_schedule instead.

applicable_product_idsarray
optional
Array<string>

Which products the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products.

applicable_product_tagsarray
optional
Array<string>

Which tags the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products.

custom_fieldsRecord<string, string>
optional
descriptionstring
optional

Used only in UI/API. It is not exposed to end customers.

hierarchy_configurationchild_accessunionHierarchyConfiguration
optional

Optional configuration for commit hierarchy access control

Hide ParametersShow Parameters
child_accessunion
Hide ParametersShow Parameters
CommitHierarchyChildAccessAll
Hide ParametersShow Parameters
type"ALL"
Hide ParametersShow Parameters
"ALL"
CommitHierarchyChildAccessNone
Hide ParametersShow Parameters
type"NONE"
Hide ParametersShow Parameters
"NONE"
CommitHierarchyChildAccessContractIDs
Hide ParametersShow Parameters
contract_idsarray
Array<string>
type"CONTRACT_IDS"
Hide ParametersShow Parameters
"CONTRACT_IDS"
invoice_schedulecredit_type_idstringdo_not_invoicebooleanrecurring_scheduleRecurringScheduleschedule_itemsarrayInvoiceSchedule
optional

Required for "POSTPAID" commits: the true up invoice will be generated at this time and only one schedule item is allowed; the total must match access_schedule amount. Optional for "PREPAID" commits: if not provided, this will be a "complimentary" commit with no invoice.

Hide ParametersShow Parameters
credit_type_idstring
optional

Defaults to USD (cents) if not passed.

formatuuid
do_not_invoiceboolean
optional

This field is only applicable to commit invoice schedules. If true, this schedule will not generate an invoice.

recurring_scheduleamount_distributionunionending_beforestringfrequencyunionstarting_atstringamountnumberquantitynumberunit_pricenumberRecurringSchedule
optional

Enter the unit price and quantity for the charge or instead only send the amount. If amount is sent, the unit price is assumed to be the amount and quantity is inferred to be 1.

Hide ParametersShow Parameters
amount_distributionunion
"DIVIDED" | "DIVIDED_ROUNDED" | "EACH"
Hide ParametersShow Parameters
"DIVIDED"
"DIVIDED_ROUNDED"
"EACH"
ending_beforestring

RFC 3339 timestamp (exclusive).

formatdate-time
frequencyunion
"MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | 2 more
Hide ParametersShow Parameters
"MONTHLY"
"QUARTERLY"
"SEMI_ANNUAL"
"ANNUAL"
"WEEKLY"
starting_atstring

RFC 3339 timestamp (inclusive).

formatdate-time
amountnumber
optional

Amount for the charge. Can be provided instead of unit_price and quantity. If amount is sent, the unit_price is assumed to be the amount and quantity is inferred to be 1.

quantitynumber
optional

Quantity for the charge. Will be multiplied by unit_price to determine the amount and must be specified with unit_price. If specified amount cannot be provided.

unit_pricenumber
optional

Unit price for the charge. Will be multiplied by quantity to determine the amount and must be specified with quantity. If specified amount cannot be provided.

schedule_itemsarray
optional

Either provide amount or provide both unit_price and quantity.

Hide ParametersShow Parameters
timestampstring

timestamp of the scheduled event

formatdate-time
amountnumber
optional

Amount for the charge. Can be provided instead of unit_price and quantity. If amount is sent, the unit_price is assumed to be the amount and quantity is inferred to be 1.

quantitynumber
optional

Quantity for the charge. Will be multiplied by unit_price to determine the amount and must be specified with unit_price. If specified amount cannot be provided.

unit_pricenumber
optional

Unit price for the charge. Will be multiplied by quantity to determine the amount and must be specified with quantity. If specified amount cannot be provided.

namestring
optional

displayed on invoices

minLength1
netsuite_sales_order_idstring
optional

This field's availability is dependent on your client's configuration.

payment_gate_configpayment_gate_typeunionprecalculated_tax_configPrecalculatedTaxConfigstripe_configStripeConfigtax_typeunionPaymentGateConfig
optional

optionally payment gate this commit

Hide ParametersShow Parameters
payment_gate_typeunion
"NONE" | "STRIPE" | "EXTERNAL"

Gate access to the commit balance based on successful collection of payment. Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to facilitate payment using your own payment integration. Select NONE if you do not wish to payment gate the commit balance.

Hide ParametersShow Parameters
"NONE"
"STRIPE"
"EXTERNAL"
precalculated_tax_configtax_amountnumbertax_namestringPrecalculatedTaxConfig
optional

Only applicable if using PRECALCULATED as your tax type.

Hide ParametersShow Parameters
tax_amountnumber

Amount of tax to be applied. This should be in the same currency and denomination as the commit's invoice schedule

tax_namestring
optional

Name of the tax to be applied. This may be used in an invoice line item description.

stripe_configpayment_typeunioninvoice_metadataRecord<string, string>StripeConfig
optional

Only applicable if using STRIPE as your payment gateway type.

Hide ParametersShow Parameters
payment_typeunion
"INVOICE" | "PAYMENT_INTENT"

If left blank, will default to INVOICE

Hide ParametersShow Parameters
"INVOICE"
"PAYMENT_INTENT"
invoice_metadataRecord<string, string>
optional

Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as your payment type.

tax_typeunion
optional
"NONE" | "STRIPE" | "ANROK" | "PRECALCULATED"

Stripe tax is only supported for Stripe payment gateway. Select NONE if you do not wish Metronome to calculate tax on your behalf. Leaving this field blank will default to NONE.

Hide ParametersShow Parameters
"NONE"
"STRIPE"
"ANROK"
"PRECALCULATED"
prioritynumber
optional

If multiple commits are applicable, the one with the lower priority will apply first.

rate_typeunion
optional
"COMMIT_RATE" | "LIST_RATE"
Hide ParametersShow Parameters
"COMMIT_RATE"
"LIST_RATE"
rollover_fractionnumber
optional

Fraction of unused segments that will be rolled over. Must be between 0 and 1.

specifiersarray
optional
Array<Specifier>

List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. This field cannot be used together with applicable_product_ids or applicable_product_tags. Instead, to target usage by product or product tag, pass those values in the body of specifiers.

Hide ParametersShow Parameters
presentation_group_valuesRecord<string, string>
optional
pricing_group_valuesRecord<string, string>
optional
product_idstring
optional

If provided, the specifier will only apply to the product with the specified ID.

formatuuid
product_tagsarray
optional
Array<string>

If provided, the specifier will only apply to products with all the specified tags.

temporary_idstring
optional

A temporary ID for the commit that can be used to reference the commit for commit specific overrides.

add_creditsarray
optional
Array<AddCredit>
Hide ParametersShow Parameters
access_scheduleschedule_itemsarraycredit_type_idstringAccessSchedule

Schedule for distributing the credit to the customer.

Hide ParametersShow Parameters
schedule_itemsarray
Hide ParametersShow Parameters
amountnumber
ending_beforestring

RFC 3339 timestamp (exclusive)

formatdate-time
starting_atstring

RFC 3339 timestamp (inclusive)

formatdate-time
credit_type_idstring
optional
formatuuid
product_idstring
formatuuid
applicable_product_idsarray
optional
Array<string>

Which products the credit applies to. If both applicable_product_ids and applicable_product_tags are not provided, the credit applies to all products.

applicable_product_tagsarray
optional
Array<string>

Which tags the credit applies to. If both applicable_product_ids and applicable_product_tags are not provided, the credit applies to all products.

custom_fieldsRecord<string, string>
optional
descriptionstring
optional

Used only in UI/API. It is not exposed to end customers.

hierarchy_configurationchild_accessunionHierarchyConfiguration
optional

Optional configuration for credit hierarchy access control

Hide ParametersShow Parameters
child_accessunion
Hide ParametersShow Parameters
CommitHierarchyChildAccessAll
Hide ParametersShow Parameters
type"ALL"
Hide ParametersShow Parameters
"ALL"
CommitHierarchyChildAccessNone
Hide ParametersShow Parameters
type"NONE"
Hide ParametersShow Parameters
"NONE"
CommitHierarchyChildAccessContractIDs
Hide ParametersShow Parameters
contract_idsarray
Array<string>
type"CONTRACT_IDS"
Hide ParametersShow Parameters
"CONTRACT_IDS"
namestring
optional

displayed on invoices

minLength1
netsuite_sales_order_idstring
optional

This field's availability is dependent on your client's configuration.

prioritynumber
optional

If multiple credits are applicable, the one with the lower priority will apply first.

rate_typeunion
optional
"COMMIT_RATE" | "LIST_RATE"
Hide ParametersShow Parameters
"COMMIT_RATE"
"LIST_RATE"
specifiersarray
optional
Array<Specifier>

List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. This field cannot be used together with applicable_product_ids or applicable_product_tags. Instead, to target usage by product or product tag, pass those values in the body of specifiers.

Hide ParametersShow Parameters
presentation_group_valuesRecord<string, string>
optional
pricing_group_valuesRecord<string, string>
optional
product_idstring
optional

If provided, the specifier will only apply to the product with the specified ID.

formatuuid
product_tagsarray
optional
Array<string>

If provided, the specifier will only apply to products with all the specified tags.

add_discountsarray
optional
Hide ParametersShow Parameters
product_idstring
formatuuid
schedulecredit_type_idstringdo_not_invoicebooleanrecurring_scheduleRecurringScheduleschedule_itemsarraySchedule

Must provide either schedule_items or recurring_schedule.

Hide ParametersShow Parameters
credit_type_idstring
optional

Defaults to USD (cents) if not passed.

formatuuid
do_not_invoiceboolean
optional

This field is only applicable to commit invoice schedules. If true, this schedule will not generate an invoice.

recurring_scheduleamount_distributionunionending_beforestringfrequencyunionstarting_atstringamountnumberquantitynumberunit_pricenumberRecurringSchedule
optional

Enter the unit price and quantity for the charge or instead only send the amount. If amount is sent, the unit price is assumed to be the amount and quantity is inferred to be 1.

Hide ParametersShow Parameters
amount_distributionunion
"DIVIDED" | "DIVIDED_ROUNDED" | "EACH"
Hide ParametersShow Parameters
"DIVIDED"
"DIVIDED_ROUNDED"
"EACH"
ending_beforestring

RFC 3339 timestamp (exclusive).

formatdate-time
frequencyunion
"MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | 2 more
Hide ParametersShow Parameters
"MONTHLY"
"QUARTERLY"
"SEMI_ANNUAL"
"ANNUAL"
"WEEKLY"
starting_atstring

RFC 3339 timestamp (inclusive).

formatdate-time
amountnumber
optional

Amount for the charge. Can be provided instead of unit_price and quantity. If amount is sent, the unit_price is assumed to be the amount and quantity is inferred to be 1.

quantitynumber
optional

Quantity for the charge. Will be multiplied by unit_price to determine the amount and must be specified with unit_price. If specified amount cannot be provided.

unit_pricenumber
optional

Unit price for the charge. Will be multiplied by quantity to determine the amount and must be specified with quantity. If specified amount cannot be provided.

schedule_itemsarray
optional

Either provide amount or provide both unit_price and quantity.

Hide ParametersShow Parameters
timestampstring

timestamp of the scheduled event

formatdate-time
amountnumber
optional

Amount for the charge. Can be provided instead of unit_price and quantity. If amount is sent, the unit_price is assumed to be the amount and quantity is inferred to be 1.

quantitynumber
optional

Quantity for the charge. Will be multiplied by unit_price to determine the amount and must be specified with unit_price. If specified amount cannot be provided.

unit_pricenumber
optional

Unit price for the charge. Will be multiplied by quantity to determine the amount and must be specified with quantity. If specified amount cannot be provided.

custom_fieldsRecord<string, string>
optional
namestring
optional

displayed on invoices

minLength1
netsuite_sales_order_idstring
optional

This field's availability is dependent on your client's configuration.

add_overridesarray
optional
Hide ParametersShow Parameters
starting_atstring

RFC 3339 timestamp indicating when the override will start applying (inclusive)

formatdate-time
applicable_product_tagsarray
optional
Array<string>

tags identifying products whose rates are being overridden

ending_beforestring
optional

RFC 3339 timestamp indicating when the override will stop applying (exclusive)

formatdate-time
entitledboolean
optional
is_commit_specificboolean
optional

Indicates whether the override should only apply to commits. Defaults to false. If true, you can specify relevant commits in override_specifiers by passing commit_ids.

multipliernumber
optional

Required for MULTIPLIER type. Must be >=0.

override_specifiersarray
optional

Cannot be used in conjunction with product_id or applicable_product_tags. If provided, the override will apply to all products with the specified specifiers.

Hide ParametersShow Parameters
billing_frequencyunion
optional
"MONTHLY" | "QUARTERLY" | "ANNUAL" | "WEEKLY"
Hide ParametersShow Parameters
"MONTHLY"
"QUARTERLY"
"ANNUAL"
"WEEKLY"
commit_idsarray
optional
Array<string>

If provided, the override will only apply to the specified commits. Can only be used for commit specific overrides. If not provided, the override will apply to all commits.

presentation_group_valuesRecord<string, string>
optional

A map of group names to values. The override will only apply to line items with the specified presentation group values. Can only be used for multiplier overrides.

pricing_group_valuesRecord<string, string>
optional

A map of pricing group names to values. The override will only apply to products with the specified pricing group values.

product_idstring
optional

If provided, the override will only apply to the product with the specified ID.

formatuuid
product_tagsarray
optional
Array<string>

If provided, the override will only apply to products with all the specified tags.

recurring_commit_idsarray
optional
Array<string>

Can only be used for commit specific overrides. Must be used in conjunction with one of product_id, product_tags, pricing_group_values, or presentation_group_values. If provided, the override will only apply to commits created by the specified recurring commit ids.

recurring_credit_idsarray
optional
Array<string>

Can only be used for commit specific overrides. Must be used in conjunction with one of product_id, product_tags, pricing_group_values, or presentation_group_values. If provided, the override will only apply to commits created by the specified recurring credit ids.

overwrite_raterate_typeunioncredit_type_idstringcustom_rateRecord<string, unknown>is_proratedbooleanpricenumberquantitynumbertiersarrayOverwriteRate
optional

Required for OVERWRITE type.

Hide ParametersShow Parameters
rate_typeunion
"FLAT" | "PERCENTAGE" | "SUBSCRIPTION" | 2 more
Hide ParametersShow Parameters
"FLAT"
"PERCENTAGE"
"SUBSCRIPTION"
"TIERED"
"CUSTOM"
credit_type_idstring
optional
formatuuid
custom_rateRecord<string, unknown>
optional

Only set for CUSTOM rate_type. This field is interpreted by custom rate processors.

is_proratedboolean
optional

Default proration configuration. Only valid for SUBSCRIPTION rate_type. Must be set to true.

pricenumber
optional

Default price. For FLAT rate_type, this must be >=0. For PERCENTAGE rate_type, this is a decimal fraction, e.g. use 0.1 for 10%; this must be >=0 and <=1.

quantitynumber
optional

Default quantity. For SUBSCRIPTION rate_type, this must be >=0.

tiersarray
optional
Array<pricenumbersizenumberTier>

Only set for TIERED rate_type.

Hide ParametersShow Parameters
pricenumber
sizenumber
optional
prioritynumber
optional

Required for EXPLICIT multiplier prioritization scheme and all TIERED overrides. Under EXPLICIT prioritization, overwrites are prioritized first, and then tiered and multiplier overrides are prioritized by their priority value (lowest first). Must be > 0.

product_idstring
optional

ID of the product whose rate is being overridden

formatuuid
targetunion
optional
"COMMIT_RATE" | "LIST_RATE"

Indicates whether the override applies to commit rates or list rates. Can only be used for overrides that have is_commit_specific set to true. Defaults to "LIST_RATE".

Hide ParametersShow Parameters
"COMMIT_RATE"
"LIST_RATE"
tiersarray
optional
Array<Tier>

Required for TIERED type. Must have at least one tier.

Hide ParametersShow Parameters
multipliernumber
sizenumber
optional
typeunion
optional
"OVERWRITE" | "MULTIPLIER" | "TIERED"

Overwrites are prioritized over multipliers and tiered overrides.

Hide ParametersShow Parameters
"OVERWRITE"
"MULTIPLIER"
"TIERED"
add_prepaid_balance_threshold_configurationAddPrepaidBalanceThresholdConfiguration
optional
Hide ParametersShow Parameters
commitproduct_idstringapplicable_product_idsarrayapplicable_product_tagsarraydescriptionstringnamestringspecifiersarrayCommit
Hide ParametersShow Parameters
product_idstring

The commit product that will be used to generate the line item for commit payment.

applicable_product_idsarray
optional
Array<string>

Which products the threshold commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products.

applicable_product_tagsarray
optional
Array<string>

Which tags the threshold commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products.

descriptionstring
optional
namestring
optional

Specify the name of the line item for the threshold charge. If left blank, it will default to the commit product name.

specifiersarray
optional
Array<Specifier>

List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. This field cannot be used together with applicable_product_ids or applicable_product_tags. Instead, to target usage by product or product tag, pass those values in the body of specifiers.

Hide ParametersShow Parameters
presentation_group_valuesRecord<string, string>
optional
pricing_group_valuesRecord<string, string>
optional
product_idstring
optional

If provided, the specifier will only apply to the product with the specified ID.

formatuuid
product_tagsarray
optional
Array<string>

If provided, the specifier will only apply to products with all the specified tags.

is_enabledboolean

When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state.

payment_gate_configpayment_gate_typeunionprecalculated_tax_configPrecalculatedTaxConfigstripe_configStripeConfigtax_typeunionPaymentGateConfig
Hide ParametersShow Parameters
payment_gate_typeunion
"NONE" | "STRIPE" | "EXTERNAL"

Gate access to the commit balance based on successful collection of payment. Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to facilitate payment using your own payment integration. Select NONE if you do not wish to payment gate the commit balance.

Hide ParametersShow Parameters
"NONE"
"STRIPE"
"EXTERNAL"
precalculated_tax_configtax_amountnumbertax_namestringPrecalculatedTaxConfig
optional

Only applicable if using PRECALCULATED as your tax type.

Hide ParametersShow Parameters
tax_amountnumber

Amount of tax to be applied. This should be in the same currency and denomination as the commit's invoice schedule

tax_namestring
optional

Name of the tax to be applied. This may be used in an invoice line item description.

stripe_configpayment_typeunioninvoice_metadataRecord<string, string>StripeConfig
optional

Only applicable if using STRIPE as your payment gateway type.

Hide ParametersShow Parameters
payment_typeunion
"INVOICE" | "PAYMENT_INTENT"

If left blank, will default to INVOICE

Hide ParametersShow Parameters
"INVOICE"
"PAYMENT_INTENT"
invoice_metadataRecord<string, string>
optional

Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as your payment type.

tax_typeunion
optional
"NONE" | "STRIPE" | "ANROK" | "PRECALCULATED"

Stripe tax is only supported for Stripe payment gateway. Select NONE if you do not wish Metronome to calculate tax on your behalf. Leaving this field blank will default to NONE.

Hide ParametersShow Parameters
"NONE"
"STRIPE"
"ANROK"
"PRECALCULATED"
recharge_to_amountnumber

Specify the amount the balance should be recharged to.

threshold_amountnumber

Specify the threshold amount for the contract. Each time the contract's balance lowers to this amount, a threshold charge will be initiated.

custom_credit_type_idstring
optional

If provided, the threshold, recharge-to amount, and the resulting threshold commit amount will be in terms of this credit type instead of the fiat currency.

formatuuid
add_professional_servicesarray
optional

This field's availability is dependent on your client's configuration.

Hide ParametersShow Parameters
max_amountnumber

Maximum amount for the term.

product_idstring
formatuuid
quantitynumber

Quantity for the charge. Will be multiplied by unit_price to determine the amount.

unit_pricenumber

Unit price for the charge. Will be multiplied by quantity to determine the amount and must be specified.

custom_fieldsRecord<string, string>
optional
descriptionstring
optional
netsuite_sales_order_idstring
optional

This field's availability is dependent on your client's configuration.

add_recurring_commitsarray
optional
Hide ParametersShow Parameters
access_amountcredit_type_idstringunit_pricenumberquantitynumberAccessAmount

The amount of commit to grant.

Hide ParametersShow Parameters
credit_type_idstring
formatuuid
unit_pricenumber
quantitynumber
optional

This field is required unless a subscription is attached via subscription_config.

commit_durationvaluenumberunit"PERIODS"CommitDuration

Defines the length of the access schedule for each created commit/credit. The value represents the number of units. Unit defaults to "PERIODS", where the length of a period is determined by the recurrence_frequency.

Hide ParametersShow Parameters
valuenumber
unit"PERIODS"
optional
Hide ParametersShow Parameters
"PERIODS"
prioritynumber

Will be passed down to the individual commits

product_idstring
formatuuid
starting_atstring

determines the start time for the first commit

formatdate-time
applicable_product_idsarray
optional
Array<string>

Will be passed down to the individual commits

applicable_product_tagsarray
optional
Array<string>

Will be passed down to the individual commits

descriptionstring
optional

Will be passed down to the individual commits

ending_beforestring
optional

Determines when the contract will stop creating recurring commits. optional

formatdate-time
hierarchy_configurationchild_accessunionHierarchyConfiguration
optional

Optional configuration for recurring credit hierarchy access control

Hide ParametersShow Parameters
child_accessunion
Hide ParametersShow Parameters
CommitHierarchyChildAccessAll
Hide ParametersShow Parameters
type"ALL"
Hide ParametersShow Parameters
"ALL"
CommitHierarchyChildAccessNone
Hide ParametersShow Parameters
type"NONE"
Hide ParametersShow Parameters
"NONE"
CommitHierarchyChildAccessContractIDs
Hide ParametersShow Parameters
contract_idsarray
Array<string>
type"CONTRACT_IDS"
Hide ParametersShow Parameters
"CONTRACT_IDS"
invoice_amountcredit_type_idstringquantitynumberunit_pricenumberInvoiceAmount
optional

The amount the customer should be billed for the commit. Not required.

Hide ParametersShow Parameters
credit_type_idstring
formatuuid
quantitynumber
unit_pricenumber
namestring
optional

displayed on invoices. will be passed through to the individual commits

minLength1
netsuite_sales_order_idstring
optional

Will be passed down to the individual commits

prorationunion
optional
"NONE" | "FIRST" | "LAST" | "FIRST_AND_LAST"

Determines whether the first and last commit will be prorated. If not provided, the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).

Hide ParametersShow Parameters
"NONE"
"FIRST"
"LAST"
"FIRST_AND_LAST"
rate_typeunion
optional
"COMMIT_RATE" | "LIST_RATE"

Whether the created commits will use the commit rate or list rate

Hide ParametersShow Parameters
"COMMIT_RATE"
"LIST_RATE"
recurrence_frequencyunion
optional
"MONTHLY" | "QUARTERLY" | "ANNUAL" | "WEEKLY"

The frequency at which the recurring commits will be created. If not provided: - The commits will be created on the usage invoice frequency. If provided: - The period defined in the duration will correspond to this frequency. - Commits will be created aligned with the recurring commit's starting_at rather than the usage invoice dates.

Hide ParametersShow Parameters
"MONTHLY"
"QUARTERLY"
"ANNUAL"
"WEEKLY"
rollover_fractionnumber
optional

Will be passed down to the individual commits. This controls how much of an individual unexpired commit will roll over upon contract transition. Must be between 0 and 1.

specifiersarray
optional
Array<Specifier>

List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. This field cannot be used together with applicable_product_ids or applicable_product_tags. Instead, to target usage by product or product tag, pass those values in the body of specifiers.

Hide ParametersShow Parameters
presentation_group_valuesRecord<string, string>
optional
pricing_group_valuesRecord<string, string>
optional
product_idstring
optional

If provided, the specifier will only apply to the product with the specified ID.

formatuuid
product_tagsarray
optional
Array<string>

If provided, the specifier will only apply to products with all the specified tags.

subscription_configapply_seat_increase_configApplySeatIncreaseConfigsubscription_idstringallocation"POOLED"SubscriptionConfig
optional

Attach a subscription to the recurring commit/credit.

Hide ParametersShow Parameters
apply_seat_increase_configis_proratedbooleanApplySeatIncreaseConfig
Hide ParametersShow Parameters
is_proratedboolean

Indicates whether a mid-period seat increase should be prorated.

subscription_idstring

ID of the subscription to configure on the recurring commit/credit.

allocation"POOLED"
optional

If set to POOLED, allocation added per seat is pooled across the account.

Hide ParametersShow Parameters
"POOLED"
temporary_idstring
optional

A temporary ID that can be used to reference the recurring commit for commit specific overrides.

add_recurring_creditsarray
optional
Hide ParametersShow Parameters
access_amountcredit_type_idstringunit_pricenumberquantitynumberAccessAmount

The amount of commit to grant.

Hide ParametersShow Parameters
credit_type_idstring
formatuuid
unit_pricenumber
quantitynumber
optional

This field is required unless a subscription is attached via subscription_config.

commit_durationvaluenumberunit"PERIODS"CommitDuration

Defines the length of the access schedule for each created commit/credit. The value represents the number of units. Unit defaults to "PERIODS", where the length of a period is determined by the recurrence_frequency.

Hide ParametersShow Parameters
valuenumber
unit"PERIODS"
optional
Hide ParametersShow Parameters
"PERIODS"
prioritynumber

Will be passed down to the individual commits

product_idstring
formatuuid
starting_atstring

determines the start time for the first commit

formatdate-time
applicable_product_idsarray
optional
Array<string>

Will be passed down to the individual commits

applicable_product_tagsarray
optional
Array<string>

Will be passed down to the individual commits

descriptionstring
optional

Will be passed down to the individual commits

ending_beforestring
optional

Determines when the contract will stop creating recurring commits. optional

formatdate-time
hierarchy_configurationchild_accessunionHierarchyConfiguration
optional

Optional configuration for recurring credit hierarchy access control

Hide ParametersShow Parameters
child_accessunion
Hide ParametersShow Parameters
CommitHierarchyChildAccessAll
Hide ParametersShow Parameters
type"ALL"
Hide ParametersShow Parameters
"ALL"
CommitHierarchyChildAccessNone
Hide ParametersShow Parameters
type"NONE"
Hide ParametersShow Parameters
"NONE"
CommitHierarchyChildAccessContractIDs
Hide ParametersShow Parameters
contract_idsarray
Array<string>
type"CONTRACT_IDS"
Hide ParametersShow Parameters
"CONTRACT_IDS"
namestring
optional

displayed on invoices. will be passed through to the individual commits

minLength1
netsuite_sales_order_idstring
optional

Will be passed down to the individual commits

prorationunion
optional
"NONE" | "FIRST" | "LAST" | "FIRST_AND_LAST"

Determines whether the first and last commit will be prorated. If not provided, the default is FIRST_AND_LAST (i.e. prorate both the first and last commits).

Hide ParametersShow Parameters
"NONE"
"FIRST"
"LAST"
"FIRST_AND_LAST"
rate_typeunion
optional
"COMMIT_RATE" | "LIST_RATE"

Whether the created commits will use the commit rate or list rate

Hide ParametersShow Parameters
"COMMIT_RATE"
"LIST_RATE"
recurrence_frequencyunion
optional
"MONTHLY" | "QUARTERLY" | "ANNUAL" | "WEEKLY"

The frequency at which the recurring commits will be created. If not provided: - The commits will be created on the usage invoice frequency. If provided: - The period defined in the duration will correspond to this frequency. - Commits will be created aligned with the recurring commit's starting_at rather than the usage invoice dates.

Hide ParametersShow Parameters
"MONTHLY"
"QUARTERLY"
"ANNUAL"
"WEEKLY"
rollover_fractionnumber
optional

Will be passed down to the individual commits. This controls how much of an individual unexpired commit will roll over upon contract transition. Must be between 0 and 1.

specifiersarray
optional
Array<Specifier>

List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. This field cannot be used together with applicable_product_ids or applicable_product_tags. Instead, to target usage by product or product tag, pass those values in the body of specifiers.

Hide ParametersShow Parameters
presentation_group_valuesRecord<string, string>
optional
pricing_group_valuesRecord<string, string>
optional
product_idstring
optional

If provided, the specifier will only apply to the product with the specified ID.

formatuuid
product_tagsarray
optional
Array<string>

If provided, the specifier will only apply to products with all the specified tags.

subscription_configapply_seat_increase_configApplySeatIncreaseConfigsubscription_idstringallocation"POOLED"SubscriptionConfig
optional

Attach a subscription to the recurring commit/credit.

Hide ParametersShow Parameters
apply_seat_increase_configis_proratedbooleanApplySeatIncreaseConfig
Hide ParametersShow Parameters
is_proratedboolean

Indicates whether a mid-period seat increase should be prorated.

subscription_idstring

ID of the subscription to configure on the recurring commit/credit.

allocation"POOLED"
optional

If set to POOLED, allocation added per seat is pooled across the account.

Hide ParametersShow Parameters
"POOLED"
temporary_idstring
optional

A temporary ID that can be used to reference the recurring commit for commit specific overrides.

add_reseller_royaltiesarray
optional
Hide ParametersShow Parameters
reseller_typeunion
"AWS" | "AWS_PRO_SERVICE" | "GCP" | "GCP_PRO_SERVICE"
Hide ParametersShow Parameters
"AWS"
"AWS_PRO_SERVICE"
"GCP"
"GCP_PRO_SERVICE"
applicable_product_idsarray
optional
Array<string>

Must provide at least one of applicable_product_ids or applicable_product_tags.

applicable_product_tagsarray
optional
Array<string>

Must provide at least one of applicable_product_ids or applicable_product_tags.

aws_optionsaws_account_numberstringaws_offer_idstringaws_payer_reference_idstringAwsOptions
optional
Hide ParametersShow Parameters
aws_account_numberstring
optional
aws_offer_idstring
optional
aws_payer_reference_idstring
optional
ending_beforeunion
optional
string | null

Use null to indicate that the existing end timestamp should be removed.

formatdate-time
fractionnumber
optional
gcp_optionsgcp_account_idstringgcp_offer_idstringGcpOptions
optional
Hide ParametersShow Parameters
gcp_account_idstring
optional
gcp_offer_idstring
optional
netsuite_reseller_idstring
optional
reseller_contract_valuenumber
optional
starting_atstring
optional
formatdate-time
add_scheduled_chargesarray
optional
Hide ParametersShow Parameters
product_idstring
formatuuid
schedulecredit_type_idstringdo_not_invoicebooleanrecurring_scheduleRecurringScheduleschedule_itemsarraySchedule

Must provide either schedule_items or recurring_schedule.

Hide ParametersShow Parameters
credit_type_idstring
optional

Defaults to USD (cents) if not passed.

formatuuid
do_not_invoiceboolean
optional

This field is only applicable to commit invoice schedules. If true, this schedule will not generate an invoice.

recurring_scheduleamount_distributionunionending_beforestringfrequencyunionstarting_atstringamountnumberquantitynumberunit_pricenumberRecurringSchedule
optional

Enter the unit price and quantity for the charge or instead only send the amount. If amount is sent, the unit price is assumed to be the amount and quantity is inferred to be 1.

Hide ParametersShow Parameters
amount_distributionunion
"DIVIDED" | "DIVIDED_ROUNDED" | "EACH"
Hide ParametersShow Parameters
"DIVIDED"
"DIVIDED_ROUNDED"
"EACH"
ending_beforestring

RFC 3339 timestamp (exclusive).

formatdate-time
frequencyunion
"MONTHLY" | "QUARTERLY" | "SEMI_ANNUAL" | 2 more
Hide ParametersShow Parameters
"MONTHLY"
"QUARTERLY"
"SEMI_ANNUAL"
"ANNUAL"
"WEEKLY"
starting_atstring

RFC 3339 timestamp (inclusive).

formatdate-time
amountnumber
optional

Amount for the charge. Can be provided instead of unit_price and quantity. If amount is sent, the unit_price is assumed to be the amount and quantity is inferred to be 1.

quantitynumber
optional

Quantity for the charge. Will be multiplied by unit_price to determine the amount and must be specified with unit_price. If specified amount cannot be provided.

unit_pricenumber
optional

Unit price for the charge. Will be multiplied by quantity to determine the amount and must be specified with quantity. If specified amount cannot be provided.

schedule_itemsarray
optional

Either provide amount or provide both unit_price and quantity.

Hide ParametersShow Parameters
timestampstring

timestamp of the scheduled event

formatdate-time
amountnumber
optional

Amount for the charge. Can be provided instead of unit_price and quantity. If amount is sent, the unit_price is assumed to be the amount and quantity is inferred to be 1.

quantitynumber
optional

Quantity for the charge. Will be multiplied by unit_price to determine the amount and must be specified with unit_price. If specified amount cannot be provided.

unit_pricenumber
optional

Unit price for the charge. Will be multiplied by quantity to determine the amount and must be specified with quantity. If specified amount cannot be provided.

namestring
optional

displayed on invoices

minLength1
netsuite_sales_order_idstring
optional

This field's availability is dependent on your client's configuration.

add_spend_threshold_configurationAddSpendThresholdConfiguration
optional
Hide ParametersShow Parameters
commitproduct_idstringdescriptionstringnamestringCommit
Hide ParametersShow Parameters
product_idstring

The commit product that will be used to generate the line item for commit payment.

descriptionstring
optional
namestring
optional

Specify the name of the line item for the threshold charge. If left blank, it will default to the commit product name.

is_enabledboolean

When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state.

payment_gate_configpayment_gate_typeunionprecalculated_tax_configPrecalculatedTaxConfigstripe_configStripeConfigtax_typeunionPaymentGateConfig
Hide ParametersShow Parameters
payment_gate_typeunion
"NONE" | "STRIPE" | "EXTERNAL"

Gate access to the commit balance based on successful collection of payment. Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to facilitate payment using your own payment integration. Select NONE if you do not wish to payment gate the commit balance.

Hide ParametersShow Parameters
"NONE"
"STRIPE"
"EXTERNAL"
precalculated_tax_configtax_amountnumbertax_namestringPrecalculatedTaxConfig
optional

Only applicable if using PRECALCULATED as your tax type.

Hide ParametersShow Parameters
tax_amountnumber

Amount of tax to be applied. This should be in the same currency and denomination as the commit's invoice schedule

tax_namestring
optional

Name of the tax to be applied. This may be used in an invoice line item description.

stripe_configpayment_typeunioninvoice_metadataRecord<string, string>StripeConfig
optional

Only applicable if using STRIPE as your payment gateway type.

Hide ParametersShow Parameters
payment_typeunion
"INVOICE" | "PAYMENT_INTENT"

If left blank, will default to INVOICE

Hide ParametersShow Parameters
"INVOICE"
"PAYMENT_INTENT"
invoice_metadataRecord<string, string>
optional

Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as your payment type.

tax_typeunion
optional
"NONE" | "STRIPE" | "ANROK" | "PRECALCULATED"

Stripe tax is only supported for Stripe payment gateway. Select NONE if you do not wish Metronome to calculate tax on your behalf. Leaving this field blank will default to NONE.

Hide ParametersShow Parameters
"NONE"
"STRIPE"
"ANROK"
"PRECALCULATED"
threshold_amountnumber

Specify the threshold amount for the contract. Each time the contract's usage hits this amount, a threshold charge will be initiated.

add_subscriptionsarray
optional

Optional list of subscriptions to add to the contract.

Hide ParametersShow Parameters
collection_scheduleunion
"ADVANCE" | "ARREARS"
Hide ParametersShow Parameters
"ADVANCE"
"ARREARS"
initial_quantitynumber
prorationinvoice_behaviorunionis_proratedbooleanProration
Hide ParametersShow Parameters
invoice_behaviorunion
optional
"BILL_IMMEDIATELY" | "BILL_ON_NEXT_COLLECTION_DATE"

Indicates how mid-period quantity adjustments are invoiced. BILL_IMMEDIATELY: Only available when collection schedule is ADVANCE. The quantity increase will be billed immediately on the scheduled date. BILL_ON_NEXT_COLLECTION_DATE: The quantity increase will be billed for in-arrears at the end of the period.

Hide ParametersShow Parameters
"BILL_IMMEDIATELY"
"BILL_ON_NEXT_COLLECTION_DATE"
is_proratedboolean
optional

Indicates if the partial period will be prorated or charged a full amount.

subscription_ratebilling_frequencyunionproduct_idstringSubscriptionRate
Hide ParametersShow Parameters
billing_frequencyunion
"MONTHLY" | "QUARTERLY" | "ANNUAL" | "WEEKLY"

Frequency to bill subscription with. Together with product_id, must match existing rate on the rate card.

Hide ParametersShow Parameters
"MONTHLY"
"QUARTERLY"
"ANNUAL"
"WEEKLY"
product_idstring

Must be subscription type product

formatuuid
custom_fieldsRecord<string, string>
optional
descriptionstring
optional
ending_beforestring
optional

Exclusive end time for the subscription. If not provided, subscription inherits contract end date.

formatdate-time
namestring
optional
starting_atstring
optional

Inclusive start time for the subscription. If not provided, defaults to contract start date

formatdate-time
temporary_idstring
optional

A temporary ID used to reference the subscription in recurring commit/credit subscription configs created within the same payload.

allow_contract_ending_before_finalized_invoiceboolean
optional

If true, allows setting the contract end date earlier than the end_timestamp of existing finalized invoices. Finalized invoices will be unchanged; if you want to incorporate the new end date, you can void and regenerate finalized usage invoices. Defaults to true.

archive_commitsarray
optional

IDs of commits to archive

Hide ParametersShow Parameters
idstring
formatuuid
archive_creditsarray
optional

IDs of credits to archive

Hide ParametersShow Parameters
idstring
formatuuid
archive_scheduled_chargesarray
optional

IDs of scheduled charges to archive

Hide ParametersShow Parameters
idstring
formatuuid
remove_overridesarray
optional

IDs of overrides to remove

Hide ParametersShow Parameters
idstring
formatuuid
update_commitsarray
optional
Hide ParametersShow Parameters
commit_idstring
formatuuid
access_scheduleadd_schedule_itemsarrayremove_schedule_itemsarrayupdate_schedule_itemsarrayAccessSchedule
optional
Hide ParametersShow Parameters
add_schedule_itemsarray
optional
Hide ParametersShow Parameters
amountnumber
ending_beforestring
formatdate-time
starting_atstring
formatdate-time
remove_schedule_itemsarray
optional
Hide ParametersShow Parameters
idstring
formatuuid
update_schedule_itemsarray
optional
Hide ParametersShow Parameters
idstring
formatuuid
amountnumber
optional
ending_beforestring
optional
formatdate-time
starting_atstring
optional
formatdate-time
applicable_product_idsunion
optional
Array<string> | null

Which products the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products.

applicable_product_tagsunion
optional
Array<string> | null

Which tags the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products.

hierarchy_configurationchild_accessunionHierarchyConfiguration
optional

Optional configuration for commit hierarchy access control

Hide ParametersShow Parameters
child_accessunion
Hide ParametersShow Parameters
CommitHierarchyChildAccessAll
Hide ParametersShow Parameters
type"ALL"
Hide ParametersShow Parameters
"ALL"
CommitHierarchyChildAccessNone
Hide ParametersShow Parameters
type"NONE"
Hide ParametersShow Parameters
"NONE"
CommitHierarchyChildAccessContractIDs
Hide ParametersShow Parameters
contract_idsarray
Array<string>
type"CONTRACT_IDS"
Hide ParametersShow Parameters
"CONTRACT_IDS"
invoice_scheduleadd_schedule_itemsarrayremove_schedule_itemsarrayupdate_schedule_itemsarrayInvoiceSchedule
optional
Hide ParametersShow Parameters
add_schedule_itemsarray
optional
Hide ParametersShow Parameters
timestampstring
formatdate-time
amountnumber
optional
quantitynumber
optional
unit_pricenumber
optional
remove_schedule_itemsarray
optional
Hide ParametersShow Parameters
idstring
formatuuid
update_schedule_itemsarray
optional
Hide ParametersShow Parameters
idstring
formatuuid
amountnumber
optional
quantitynumber
optional
timestampstring
optional
formatdate-time
unit_pricenumber
optional
netsuite_sales_order_idunion
optional
string | null
priorityunion
optional
number | null
product_idstring
optional
formatuuid
rollover_fractionunion
optional
number | null
update_contract_end_dateunion
optional
string | null

RFC 3339 timestamp indicating when the contract will end (exclusive).

formatdate-time
update_contract_nameunion
optional
string | null

Value to update the contract name to. If not provided, the contract name will remain unchanged.

update_creditsarray
optional
Hide ParametersShow Parameters
credit_idstring
formatuuid
access_scheduleadd_schedule_itemsarrayremove_schedule_itemsarrayupdate_schedule_itemsarrayAccessSchedule
optional
Hide ParametersShow Parameters
add_schedule_itemsarray
optional
Hide ParametersShow Parameters
amountnumber
ending_beforestring
formatdate-time
starting_atstring
formatdate-time
remove_schedule_itemsarray
optional
Hide ParametersShow Parameters
idstring
formatuuid
update_schedule_itemsarray
optional
Hide ParametersShow Parameters
idstring
formatuuid
amountnumber
optional
ending_beforestring
optional
formatdate-time
starting_atstring
optional
formatdate-time
applicable_product_idsunion
optional
Array<string> | null

Which products the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products.

applicable_product_tagsunion
optional
Array<string> | null

Which tags the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products.

hierarchy_configurationchild_accessunionHierarchyConfiguration
optional

Optional configuration for commit hierarchy access control

Hide ParametersShow Parameters
child_accessunion
Hide ParametersShow Parameters
CommitHierarchyChildAccessAll
Hide ParametersShow Parameters
type"ALL"
Hide ParametersShow Parameters
"ALL"
CommitHierarchyChildAccessNone
Hide ParametersShow Parameters
type"NONE"
Hide ParametersShow Parameters
"NONE"
CommitHierarchyChildAccessContractIDs
Hide ParametersShow Parameters
contract_idsarray
Array<string>
type"CONTRACT_IDS"
Hide ParametersShow Parameters
"CONTRACT_IDS"
netsuite_sales_order_idunion
optional
string | null
priorityunion
optional
number | null
product_idstring
optional
formatuuid
update_prepaid_balance_threshold_configurationUpdatePrepaidBalanceThresholdConfiguration
optional
Hide ParametersShow Parameters
commitapplicable_product_idsunionapplicable_product_tagsuniondescriptionstringnamestringproduct_idstringspecifiersunionCommit
optional
Hide ParametersShow Parameters
applicable_product_idsunion
optional
Array<string> | null

Which products the threshold commit applies to. If both applicable_product_ids and applicable_product_tags are not provided, the commit applies to all products.

applicable_product_tagsunion
optional
Array<string> | null

Which tags the threshold commit applies to. If both applicable_product_ids and applicable_product_tags are not provided, the commit applies to all products.

descriptionstring
optional
namestring
optional

Specify the name of the line item for the threshold charge. If left blank, it will default to the commit product name.

product_idstring
optional

The commit product that will be used to generate the line item for commit payment.

specifiersunion
optional
Array<Specifier> | null

List of filters that determine what kind of customer usage draws down a commit or credit. A customer's usage needs to meet the condition of at least one of the specifiers to contribute to a commit's or credit's drawdown. This field cannot be used together with applicable_product_ids or applicable_product_tags. Instead, to target usage by product or product tag, pass those values in the body of specifiers.

Hide ParametersShow Parameters
presentation_group_valuesRecord<string, string>
optional
pricing_group_valuesRecord<string, string>
optional
product_idstring
optional

If provided, the specifier will only apply to the product with the specified ID.

formatuuid
product_tagsarray
optional
Array<string>

If provided, the specifier will only apply to products with all the specified tags.

custom_credit_type_idunion
optional
string | null

If provided, the threshold, recharge-to amount, and the resulting threshold commit amount will be in terms of this credit type instead of the fiat currency.

formatuuid
is_enabledboolean
optional

When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state.

payment_gate_configpayment_gate_typeunionprecalculated_tax_configPrecalculatedTaxConfigstripe_configStripeConfigtax_typeunionPaymentGateConfig
optional
Hide ParametersShow Parameters
payment_gate_typeunion
"NONE" | "STRIPE" | "EXTERNAL"

Gate access to the commit balance based on successful collection of payment. Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to facilitate payment using your own payment integration. Select NONE if you do not wish to payment gate the commit balance.

Hide ParametersShow Parameters
"NONE"
"STRIPE"
"EXTERNAL"
precalculated_tax_configtax_amountnumbertax_namestringPrecalculatedTaxConfig
optional

Only applicable if using PRECALCULATED as your tax type.

Hide ParametersShow Parameters
tax_amountnumber

Amount of tax to be applied. This should be in the same currency and denomination as the commit's invoice schedule

tax_namestring
optional

Name of the tax to be applied. This may be used in an invoice line item description.

stripe_configpayment_typeunioninvoice_metadataRecord<string, string>StripeConfig
optional

Only applicable if using STRIPE as your payment gateway type.

Hide ParametersShow Parameters
payment_typeunion
"INVOICE" | "PAYMENT_INTENT"

If left blank, will default to INVOICE

Hide ParametersShow Parameters
"INVOICE"
"PAYMENT_INTENT"
invoice_metadataRecord<string, string>
optional

Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as your payment type.

tax_typeunion
optional
"NONE" | "STRIPE" | "ANROK" | "PRECALCULATED"

Stripe tax is only supported for Stripe payment gateway. Select NONE if you do not wish Metronome to calculate tax on your behalf. Leaving this field blank will default to NONE.

Hide ParametersShow Parameters
"NONE"
"STRIPE"
"ANROK"
"PRECALCULATED"
recharge_to_amountnumber
optional

Specify the amount the balance should be recharged to.

threshold_amountnumber
optional

Specify the threshold amount for the contract. Each time the contract's balance lowers to this amount, a threshold charge will be initiated.

update_recurring_commitsarray
optional

Edits to these recurring commits will only affect commits whose access schedules has not started. Expired commits, and commits with an active access schedule will remain unchanged.

Hide ParametersShow Parameters
recurring_commit_idstring
formatuuid
access_amountquantitynumberunit_pricenumberAccessAmount
optional
Hide ParametersShow Parameters
quantitynumber
optional
unit_pricenumber
optional
ending_beforeunion
optional
string | null
formatdate-time
invoice_amountquantitynumberunit_pricenumberInvoiceAmount
optional
Hide ParametersShow Parameters
quantitynumber
optional
unit_pricenumber
optional
update_recurring_creditsarray
optional

Edits to these recurring credits will only affect credits whose access schedules has not started. Expired credits, and credits with an active access schedule will remain unchanged.

Hide ParametersShow Parameters
recurring_credit_idstring
formatuuid
access_amountquantitynumberunit_pricenumberAccessAmount
optional
Hide ParametersShow Parameters
quantitynumber
optional
unit_pricenumber
optional
ending_beforeunion
optional
string | null
formatdate-time
update_scheduled_chargesarray
optional
Hide ParametersShow Parameters
scheduled_charge_idstring
formatuuid
invoice_scheduleadd_schedule_itemsarrayremove_schedule_itemsarrayupdate_schedule_itemsarrayInvoiceSchedule
optional
Hide ParametersShow Parameters
add_schedule_itemsarray
optional
Hide ParametersShow Parameters
timestampstring
formatdate-time
amountnumber
optional
quantitynumber
optional
unit_pricenumber
optional
remove_schedule_itemsarray
optional
Hide ParametersShow Parameters
idstring
formatuuid
update_schedule_itemsarray
optional
Hide ParametersShow Parameters
idstring
formatuuid
amountnumber
optional
quantitynumber
optional
timestampstring
optional
formatdate-time
unit_pricenumber
optional
netsuite_sales_order_idunion
optional
string | null
update_spend_threshold_configurationUpdateSpendThresholdConfiguration
optional
Hide ParametersShow Parameters
commitdescriptionstringnamestringproduct_idstringCommit
optional
Hide ParametersShow Parameters
descriptionstring
optional
namestring
optional

Specify the name of the line item for the threshold charge. If left blank, it will default to the commit product name.

product_idstring
optional

The commit product that will be used to generate the line item for commit payment.

is_enabledboolean
optional

When set to false, the contract will not be evaluated against the threshold_amount. Toggling to true will result an immediate evaluation, regardless of prior state.

payment_gate_configpayment_gate_typeunionprecalculated_tax_configPrecalculatedTaxConfigstripe_configStripeConfigtax_typeunionPaymentGateConfig
optional
Hide ParametersShow Parameters
payment_gate_typeunion
"NONE" | "STRIPE" | "EXTERNAL"

Gate access to the commit balance based on successful collection of payment. Select STRIPE for Metronome to facilitate payment via Stripe. Select EXTERNAL to facilitate payment using your own payment integration. Select NONE if you do not wish to payment gate the commit balance.

Hide ParametersShow Parameters
"NONE"
"STRIPE"
"EXTERNAL"
precalculated_tax_configtax_amountnumbertax_namestringPrecalculatedTaxConfig
optional

Only applicable if using PRECALCULATED as your tax type.

Hide ParametersShow Parameters
tax_amountnumber

Amount of tax to be applied. This should be in the same currency and denomination as the commit's invoice schedule

tax_namestring
optional

Name of the tax to be applied. This may be used in an invoice line item description.

stripe_configpayment_typeunioninvoice_metadataRecord<string, string>StripeConfig
optional

Only applicable if using STRIPE as your payment gateway type.

Hide ParametersShow Parameters
payment_typeunion
"INVOICE" | "PAYMENT_INTENT"

If left blank, will default to INVOICE

Hide ParametersShow Parameters
"INVOICE"
"PAYMENT_INTENT"
invoice_metadataRecord<string, string>
optional

Metadata to be added to the Stripe invoice. Only applicable if using INVOICE as your payment type.

tax_typeunion
optional
"NONE" | "STRIPE" | "ANROK" | "PRECALCULATED"

Stripe tax is only supported for Stripe payment gateway. Select NONE if you do not wish Metronome to calculate tax on your behalf. Leaving this field blank will default to NONE.

Hide ParametersShow Parameters
"NONE"
"STRIPE"
"ANROK"
"PRECALCULATED"
threshold_amountnumber
optional

Specify the threshold amount for the contract. Each time the contract's usage hits this amount, a threshold charge will be initiated.

update_subscriptionsarray
optional

Optional list of subscriptions to update.

Hide ParametersShow Parameters
subscription_idstring
formatuuid
ending_beforeunion
optional
string | null
formatdate-time
quantity_updatesarray
optional

Quantity changes are applied on the effective date based on the order which they are sent. For example, if I scheduled the quantity to be 12 on May 21 and then scheduled a quantity delta change of -1, the result from that day would be 11.

Hide ParametersShow Parameters
starting_atstring
formatdate-time
quantitynumber
optional

The new quantity for the subscription. Must be provided if quantity_delta is not provided. Must be non-negative.

quantity_deltanumber
optional

The delta to add to the subscription's quantity. Must be provided if quantity is not provided. Can't be zero. It also can't result in a negative quantity on the subscription.

Returns
ContractEditResponse
Hide ParametersShow Parameters
dataidstringID
import Metronome from '@metronome/sdk';

const client = new Metronome({
  bearerToken: 'My Bearer Token',
});

const response = await client.v2.contracts.edit({
  contract_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
  customer_id: '13117714-3f05-48e5-a6e9-a66093f13b4d',
  add_overrides: [
    {
      type: 'MULTIPLIER',
      starting_at: '2024-11-02T00:00:00Z',
      product_id: 'd4fc086c-d8e5-4091-a235-fbba5da4ec14',
      multiplier: 2,
      priority: 100,
    },
  ],
  add_scheduled_charges: [
    {
      product_id: '2e30f074-d04c-412e-a134-851ebfa5ceb2',
      schedule: {
        schedule_items: [{ timestamp: '2020-02-15T00:00:00.000Z', unit_price: 1000000, quantity: 1 }],
      },
    },
  ],
});

console.log(response.data);
200 Example
{
  "data": {
    "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
  }
}