Skip to main content
POST
Create a cash-in deposit code

Authorizations

Authorization
string
header
required

Token from POST /auth/token

Headers

Idempotency-Key
string
required

Required on POST and PUT requests. Use a unique value per logical mutation attempt, for example a UUID.

Body

application/json

Request body for creating a cash-in. Names the customer, the cash source location, and the crypto destination.

customerId
string
required

The customer depositing cash (cst_ prefix).

source
object
required

Where the customer will deposit cash.

destination
object
required

Crypto instrument to deliver to (walletOms or walletExternal).

cash
object
required

The cash amount to deposit.

sponsorGas
boolean

When true, OMS absorbs the on-chain gas cost for the destination delivery. Only true is currently supported.

metadata
object

Free-form key-value pairs stored on the resource and echoed back on reads.

Response

201 - application/json

The request has succeeded and a new resource has been created as a result.

A code-based cash deposit. The customer takes the issued code to a retail location and deposits cash, which OMS converts to crypto and delivers to the destination. Amounts start as estimates and are finalized once the cash is deposited.

id
string
required

Cash-in ID (ci_ prefix).

Pattern: ^[a-z]+_([0-9a-hjkmnp-tv-z]{26}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$
type
enum<string>
required

Cash-in flavor.

Available options:
cryptoToCrypto,
fiatToCrypto,
cryptoToFiat
status
enum<string>
required

Current lifecycle status of the cash-in.

Available options:
pending,
processing,
completed,
failed,
expired
customerId
string
required

The OMS customer that owns this record (cst_ prefix).

Pattern: ^[a-z]+_([0-9a-hjkmnp-tv-z]{26}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$
source
object
required

Where the customer deposits cash: the provider and location.

destination
object
required

Crypto instrument the converted funds are delivered to.

cash
object
required

The cash amount to be deposited.

location
object
required

Resolved detail of the chosen cash location.

createdAt
string<date-time>
required

When the cash-in was created.

updatedAt
string<date-time>
required

When the cash-in was last updated.

object
enum<string>

Resource type discriminator. Always "cashIn".

Available options:
cashIn
subStatus
enum<string>

Granular sub-status adding detail behind status.

Available options:
order_reserved,
settled,
cash_deposit_expired,
cash_deposit_failed,
provider_order_failed,
provider_order_template_error
fixedAmountSide
enum<string>

The side the amount was fixed on when creating the cash-in. OMS calculated the other side.

Available options:
source,
destination
depositInstructions
object

The deposit code and instructions the customer presents at the retail location.

rates
object

Exchange and effective rates applied to this cash-in.

sponsorGasCost
string

USD cost of gas absorbed by the developer when sponsoring gas. Always "0" in alpha - gas is sponsored. Spec § 4.1.

omsFeeSchedule
object

OMS fee schedule applied to this cash-in.

transactionId
string

The Transaction produced once the cash-in completes. Null while pending.

Pattern: ^[a-z]+_([0-9a-hjkmnp-tv-z]{26}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$
sponsorGas
boolean

When true, OMS absorbs the on-chain gas cost for the destination delivery. Only true is currently supported.

metadata
object

Free-form key-value pairs supplied at creation or update.

developerFees
object[]

Developer fee entries echoed back from the request. Omitted in alpha - request side is stripped per spec § 2. The field stays on the schema so it can be reintroduced without a breaking change when developer fees ship.

completedAt
string<date-time>

When the cash-in reached a terminal state. Null while in progress.

expiresAt
string<date-time>

When the issued deposit code expires. Single source of truth for cash-in expiry (#2144); the per-instruction expiresAt was removed in favor of this.