Skip to main content

Get Payout Preview (Phase 2a)

Before submitting a sell payout, call this endpoint to discover which beneficiary fields are required for the destination currency and country. The response contains dynamic form field definitions that your frontend should render for the customer to fill in.

GEThttps://api.zenpayz.com/payment/api/v1/off-ramp/sell/payout-preview
Bearer · API key

Request

Headers

HeaderDescription
x-request-id
OPTIONAL
Custom request ID for tracing
Public Endpoint

This endpoint does not require authentication headers.

Query Parameters

ParameterTypeDescription
intentId
REQUIRED
stringRamp intent ID
fiatCurrency
REQUIRED
stringTarget fiat currency (e.g. USD)
country
OPTIONAL
stringUSISO country code for the payout destination
payoutType
OPTIONAL
stringbank_transferPayout method
Prerequisite

The crypto deposit for this intent must be in confirmed or matched status. If the deposit hasn't been confirmed yet, this endpoint returns a 400 error.

Response

Success (200 OK)

{
"success": true,
"data": {
"selectedTsp": "zenpay_routing",
"tspDisplayName": "ZenPays",
"requiredFields": [
{
"fieldName": "receiverFirstName",
"label": "First Name",
"type": "text",
"required": true,
"placeholder": "Enter first name"
},
{
"fieldName": "receiverLastName",
"label": "Last Name",
"type": "text",
"required": true,
"placeholder": "Enter last name"
},
{
"fieldName": "receiverAccountNumber",
"label": "Account Number",
"type": "text",
"required": true,
"placeholder": "Enter account number"
},
{
"fieldName": "receiverCountry",
"label": "Country",
"type": "text",
"required": true,
"placeholder": "ISO country code (e.g. US)"
},
{
"fieldName": "receiverBankName",
"label": "Bank Name",
"type": "text",
"required": true,
"placeholder": "Enter bank name"
}
],
"optionalFields": [
{
"fieldName": "receiverEmail",
"label": "Email",
"type": "email",
"required": false,
"placeholder": "Enter email address"
},
{
"fieldName": "receiverPhone",
"label": "Phone",
"type": "tel",
"required": false,
"placeholder": "Enter phone number"
}
],
"oneOfGroups": [
["receiverBankCode", "receiverBankName"]
],
"fiatAmount": 19.78,
"fiatCurrency": "USD",
"fees": {
"platform": 0.62,
"network": 0,
"total": 0.62
}
},
"message": "Payout preview retrieved"
}

Response Fields

ParameterTypeDescription
selectedTsp
OPTIONAL
stringSelected payout provider
tspDisplayName
OPTIONAL
stringHuman-readable provider name
requiredFields
OPTIONAL
arrayFields that must be provided
optionalFields
OPTIONAL
arrayFields that can optionally be provided
oneOfGroups
OPTIONAL
array| nullGroups where at least one field must be filled
fiatAmount
OPTIONAL
numberCalculated fiat payout amount
fiatCurrency
OPTIONAL
stringFiat currency
fees
OPTIONAL
objectFee breakdown

Field Definition Object

ParameterTypeDescription
fieldName
OPTIONAL
stringKey to use in beneficiaryDetails when submitting payout
label
OPTIONAL
stringHuman-readable label for the form field
type
OPTIONAL
stringInput type: text, email, tel, number, or select
required
OPTIONAL
booleanWhether the field is mandatory
placeholder
OPTIONAL
stringPlaceholder text
pattern
OPTIONAL
string| nullRegex validation pattern
validationMessage
OPTIONAL
string| nullError message for failed validation
options
OPTIONAL
array| nullOptions for select type fields
minLength
OPTIONAL
number| nullMinimum character length
maxLength
OPTIONAL
number| nullMaximum character length

Fees Object

ParameterTypeDescription
platform
OPTIONAL
numberPlatform fee
network
OPTIONAL
numberNetwork/gas fee
total
OPTIONAL
numberTotal fees
Dynamic Form Rendering

Use the requiredFields and optionalFields arrays to dynamically build your payout form. Each field includes validation constraints (pattern, minLength, maxLength) so you can validate client-side before submitting.

For oneOfGroups, at least one field from each group must be provided. For example, ["receiverBankCode", "receiverBankName"] means you need either the SWIFT/BIC code or the bank name.

Error Responses

CodeHTTPMessage
BAD_REQUEST400Deposit not yet confirmed, or invalid intent
NOT_FOUND404Intent not found
SELL_PAYOUT_PREVIEW_FAILED500Failed to generate preview

Examples

curl "https://api.zenpayz.com/payment/api/v1/off-ramp/sell/payout-preview?intentId=ri_1710345678000_a1b2c3d4e5f6g7h8&fiatCurrency=USD&country=US"

Next Steps