Skip to navigation

Create a credit currency

Draft scaffold — not implemented or available in the API.

Creates a custom unit, such as credits, that prices and credit grants can be quoted in instead of a currency. key must be unique in the account and cannot be an ISO 4217 currency code. conversion sets what one unit costs in money when usage runs past a customer’s balance; unfundedUsage defaults to overage.

Authentication

AuthorizationBearer
API Key authentication using Bearer token

Headers

Paid-BetaenumRequired

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

Allowed values:

Request

Body
keystringRequiredformat: "^[a-z0-9_]{1,64}$"

Immutable account-wide denomination key; not an ISO currency code.

namestringRequired1-255 characters
The resource name.
conversionobjectOptional
CreditCurrencyConversion.
descriptionstring or nullOptional
What the resource represents.
displayNamestring or nullOptional<=250 characters

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

metadatamap from strings to stringsOptional

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

unfundedUsageenumOptionalDefaults to overage

Behavior before the first grant; defaults to overage.

Allowed values:

Response

201
idstring
The CreditCurrency ID.
objectenum

The type of object. Always creditCurrency.

Allowed values:
createdAtdatetime
When the object was created.
archivedAtdatetime or null
When this resource was archived, or null.
conversionobject
CreditCurrencyConversion.
descriptionstring or null
What the resource represents.
displayNamestring or null<=250 characters

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

keystringformat: "^[a-z0-9_]{1,64}$"

Immutable account-wide denomination key; not an ISO currency code.

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.
unfundedUsageenum
Behavior before the first grant.
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