Skip to navigation

Create a commit

Draft scaffold — not implemented or available in the API.

Adds a spend commitment to an active order. An invoicedMinimum adds a true-up line when eligible usage in scope falls short of amount; a prepaid commit is invoiced upfront and drawn down by usage. startsAt and endsAt default to the order’s term. To commit on a draft order, send commits with the order instead.

Authentication

AuthorizationBearer
API Key authentication using Bearer token

Headers

Paid-BetaenumRequired

This endpoint is in the commits=v1 beta. Send this header to use it.

Allowed values:

Request

Body
amountintegerRequired
Committed amount in minor currency units.
currencystringRequiredformat: "^[a-z]{3}$"

Lowercase ISO 4217 currency code, e.g. usd. Must be enabled on your account.

orderstringRequired1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.
periodenumRequired
Reset each cycle or once across the term.
Allowed values:
typeenumRequired

invoicedMinimum: Invoice the minimum shortfall. prepaid: Draw down prepaid money.

Allowed values:
displayNamestring or nullOptional<=250 characters

What your customers see on invoices, credit notes, checkout and the portal; null uses the resource name.

endsAtdatetimeOptional

Commit end; defaults to the order.

invoicedMinimumobjectOptional

Minimum commitment settings. Only when type is invoicedMinimum.

metadatamap from strings to stringsOptional

String key-value pairs of your own, up to 500 characters per value. Always updatable.

namestringOptional1-255 characters
The resource name.
prepaidobjectOptional

Required when type is prepaid.

scopeobjectOptional
Eligible products or prices, never both.
startsAtdatetimeOptional

Commit start; defaults to the order.

taxCodestring or nullOptional1-255 characters

Tax code for the commit’s own charges: a prepaid invoice taxed at purchase and an invoiced minimum’s true-up. Null uses the code every scoped product shares, else the account default.

Response

201
idstring
The Commit ID.
objectenum

The type of object. Always commit.

Allowed values:
createdAtdatetime
When the object was created.
amountinteger
Minor currency units committed.
archivedAtdatetime or null
When this resource was archived, or null.
balanceobject
Commit consumption.
currencystring

Lowercase ISO 4217 currency code, e.g. usd.

customerstring1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.
displayNamestring or null<=250 characters

What your customers see on invoices, credit notes, checkout and the portal; null uses the resource name.

endsAtdatetime
Exclusive end.
invoicedMinimumobject or null

Invoiced-minimum settings: {} on an invoicedMinimum commit, otherwise null.

livemodeboolean

true for an object on a live account, false on a test account.

metadatamap from strings to strings

String key-value pairs of your own, up to 500 characters per value. Always updatable.

namestring1-255 characters
The resource name.
orderstring1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.
periodenum
Commit period.
Allowed values:
prepaidobject

Prepaid settings on a prepaid commit, otherwise null.

proratedAmountstring or nullformat: "^\d+(\.\d{1,15})?$"

The committed amount pro-rated by day after an amendment shortened the order, in minor units of currency, or null until one does. Shown to 15 decimal places, rounded half-up at the 15th ("22580.645161290322581"); the true-up and balance.remaining use the exact fraction. Read-only: amount keeps the integer that was committed.

scopeobject
Scope or null.
startsAtdatetime
Inclusive start.
taxCodestring or null1-255 characters

Tax code for the commit’s own charges: a prepaid invoice taxed at purchase and an invoiced minimum’s true-up. Null uses the code every scoped product shares, else the account default.

typeenum
Commit type.
Allowed values:

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
429
Too Many Requests Error
500
Internal Server Error
501
Not Implemented Error