Skip to main content

Create Sell Deposit (Phase 1)

Phase 1 of the two-phase off-ramp (sell) flow. Generates a crypto deposit address where the customer sends their crypto. The system monitors the address for incoming deposits and confirms receipt automatically.

This endpoint is idempotent — calling it again with the same intentId returns the existing deposit instead of creating a new one.

POSThttps://api.zenpayz.com/payment/api/v1/off-ramp/sell/checkout
Bearer · API key

Request

Headers

HeaderDescription
Content-Type
REQUIRED
application/json
x-request-id
OPTIONAL
Custom request ID for tracing
Public Endpoint

This endpoint does not require authentication headers. It is designed to be called from your checkout or widget page.

Body Parameters

ParameterTypeDescription
intentId
REQUIRED
stringRamp intent ID (from Create Ramp Intent)
cryptoCurrency
REQUIRED
stringCrypto to deposit (e.g. USDT)
chain
REQUIRED
stringBlockchain network (e.g. tron, ethereum)
fiatCurrency
REQUIRED
stringTarget fiat currency (e.g. USD)
cryptoAmount
REQUIRED
numberAmount of crypto to send
fiatAmount
REQUIRED
numberExpected fiat payout (from quote)
rate
REQUIRED
numberLocked exchange rate (from quote)
totalFee
REQUIRED
numberTotal fees (from quote)
quoteId
OPTIONAL
stringReference to the quote used
onramp
OPTIONAL
stringQuote provider identifier
Use Quote Values

Pass the rate, fiatAmount, and totalFee directly from a Sell Quote response to ensure consistent pricing.

Response

Success (200 OK)

{
"success": true,
"data": {
"intentId": "ri_1710345678000_a1b2c3d4e5f6g7h8",
"depositAddress": "TLfMkVBKQSy7gzP7x9URJp6ZLXyWGZbwDs",
"memo": null,
"currency": "USDT",
"chain": "tron",
"expectedCryptoAmount": 20,
"fiatAmount": 19.78,
"fiatCurrency": "USD",
"rate": 0.999,
"cryptoDepositId": "d4e5f6a7-b8c9-1234-5678-abcdef012345",
"expiresAt": "2026-03-15T10:00:00.000Z",
},
"message": "Sell checkout created"
}

Response Fields

ParameterTypeDescription
intentId
OPTIONAL
stringThe ramp intent ID
depositAddress
OPTIONAL
stringCrypto address to send funds to
memo
OPTIONAL
string| nullMemo/tag (required for XRP, XLM, etc.)
currency
OPTIONAL
stringCrypto currency (e.g. USDT)
chain
OPTIONAL
stringBlockchain network
expectedCryptoAmount
OPTIONAL
numberAmount the customer should send
fiatAmount
OPTIONAL
numberExpected fiat payout
fiatCurrency
OPTIONAL
stringFiat currency code
rate
OPTIONAL
numberLocked exchange rate
cryptoDepositId
OPTIONAL
stringDeposit tracking ID (needed for Phase 2)
expiresAt
OPTIONAL
stringDeposit expiry timestamp
Save the cryptoDepositId

You will need cryptoDepositId when submitting the payout in Phase 2. Store it alongside the intentId.

Error Responses

CodeHTTPMessage
BAD_REQUEST400Invalid or inactive intent
SELL_CHECKOUT_FAILED500Failed to generate deposit address

Examples

curl -X POST https://api.zenpayz.com/payment/api/v1/off-ramp/sell/checkout \
-H "Content-Type: application/json" \
-d '{
"intentId": "ri_1710345678000_a1b2c3d4e5f6g7h8",
"cryptoCurrency": "USDT",
"chain": "tron",
"fiatCurrency": "USD",
"cryptoAmount": 20,
"fiatAmount": 19.78,
"rate": 0.999,
"totalFee": 0.62
}'

Two-Phase Sell Flow

Phase 1 (this endpoint)          Phase 2
┌──────────────────────┐ ┌──────────────────────┐
│ POST sell/checkout │ │ GET payout-preview │
│ → deposit address │ │ → required fields │
│ │ │ │
│ Customer sends crypto│ ──► │ POST sell/payout │
│ System confirms │ │ → fiat transfer │
└──────────────────────┘ └──────────────────────┘

Next Steps