Skip to navigation

Create a credit hold

Draft scaffold — not implemented or available in the API.

Reserves amount credits in creditCurrency on the customer’s balance before the work that spends them runs. The check and reservation are atomic, so concurrent holds cannot both claim the same credits; if the spendable balance does not cover amount the call fails with insufficient_credits and nothing is reserved. A hold lasts 15 minutes by default (expiresAfter, 1 minute to 24 hours) and is settled by the usage event that names it in creditHold.

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
amountstringRequiredformat: "[1-9]"
A positive exact credit amount, up to 15 fractional places.
creditCurrencystringRequired1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.
customerstringRequired1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.
correlationIdstring or nullOptional1-255 characters
Your stable identifier, 1 to 255 characters.
expiresAfterobjectOptional

Hold lifetime; defaults to 15 minutes, between 1 minute and 24 hours.

metadatamap from strings to stringsOptional

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

productstring or nullOptional1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.
seatstring or nullOptional1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.

Response

201
idstring
The CreditHold ID.
objectenum

The type of object. Always creditHold.

Allowed values:
createdAtdatetime
When the object was created.
amountstringformat: "^\d+(\.\d{1,15})?$"

An exact non-negative credit amount, up to 15 fractional places.

capturedAtdatetime or null
When an event captured the hold.
capturedBystring or null1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.
correlationIdstring or null1-255 characters
Your stable identifier, 1 to 255 characters.
creditCurrencystring1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.
customerstring1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.
expiresAtdatetime
When an uncaptured hold expires.
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.

productstring or null1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.
releasedAtdatetime or null
When the hold was released.
seatstring or null1-255 characters
A Paid ID, external ID or resource key, as supported by the referenced resource.
statusenum
Reservation lifecycle status.
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