Skip to main content

Get Ramp Intent

Retrieve the full details of a ramp intent, including the generated widget URL for embedding. This endpoint also manages automatic status transitions — the intent moves from created to active on the first GET request, and auto-expires if past its expiresAt timestamp.

GEThttps://api.zenpayz.com/payment/api/v1/ramp-intents/:intentId
Bearer · API key

Request

Headers

HeaderDescription
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 frontend or checkout page.

Path Parameters

ParameterTypeDescription
intentId
REQUIRED
stringThe ramp intent ID (e.g. ri_1710345678000_a1b2c3d4e5f6g7h8)

Response

Success (200 OK)

{
"success": true,
"data": {
"intent": {
"intentId": "ri_1710345678000_a1b2c3d4e5f6g7h8",
"type": "buy",
"fiatCurrency": "USD",
"cryptoCurrency": "eth_ethereum",
"amount": 100,
"status": "active",
"kycStatus": "approved",
"cancelReason": null,
"wallets": [
{ "network": "ethereum", "address": "0x742d35Cc6634C0532925a3b844Bc9e7595f2bD28" }
],
"userId": "usr_abc123",
"kycVerified": true,
"successUrl": "https://yourapp.com/success",
"cancelUrl": "https://yourapp.com/cancel",
"expiresAt": "2026-03-15T10:00:00.000Z",
"metadata": {}
},
"widgetUrl": "https://widget.onramper.com/...signed_url..."
},
"message": "Ramp intent retrieved"
}

Response Fields

Intent Object

ParameterTypeDescription
intentId
OPTIONAL
stringUnique intent identifier
type
OPTIONAL
stringbuy or sell
fiatCurrency
OPTIONAL
stringFiat currency code
cryptoCurrency
OPTIONAL
string| nullCrypto identifier
amount
OPTIONAL
number| nullDefault amount
status
OPTIONAL
stringLifecycle state: created, active, completed, expired, or cancelled
kycStatus
OPTIONAL
stringKYC sub-state: pending, in_review, approved, declined, or expired. When KYC is declined, status flips to cancelled and cancelReason='kyc_rejected'.
cancelReason
OPTIONAL
string| nullReason the intent was cancelled. kyc_rejected when KYC was declined; kyc_expired for KYC session expiry. null otherwise.
successUrl
OPTIONAL
string| nullMerchant success redirect URL
cancelUrl
OPTIONAL
string| nullMerchant cancel redirect URL
expiresAt
OPTIONAL
stringExpiry timestamp
metadata
OPTIONAL
objectCustom metadata
wallets
OPTIONAL
arrayArray of { network, address } wallet objects
userId
OPTIONAL
stringMerchant's user identifier (KYC record key)
kycVerified
OPTIONAL
booleanWhether KYC was pre-verified by merchant. Convenience flag — equivalent to kycStatus === 'approved'.
customerEmail
OPTIONAL
string| nullCustomer email if provided

Root Fields

ParameterTypeDescription
widgetUrl
OPTIONAL
string| nullSigned widget URL for iframe embedding. null if expired.
kycRequired
OPTIONAL
boolean| undefinedWhether ZenPays KYC verification is required. Present when kycVerified is false and the user has not yet been verified.
kycVerificationUrl
OPTIONAL
string| nullURL to redirect user for identity verification. null if no verification session has been initiated yet.

KYC Gating

The response shape depends on the user's KYC status:

Scenario 1: KYC pre-verified by merchant (kycVerified: true on the intent)

Widget URL is returned immediately. No KYC prompts.

Scenario 2: KYC verified via ZenPays (kycVerified: false, user already verified)

Widget URL is returned. kycRequired is absent or false.

Scenario 3: KYC required (kycVerified: false, user not verified)

widgetUrl is null, kycRequired is true. If a verification session exists, kycVerificationUrl contains the URL. If not, call initiateKyc (or the equivalent REST endpoint) to create a session.

{
"success": true,
"data": {
"intent": {
"intentId": "ri_1710345678000_a1b2c3d4e5f6g7h8",
"type": "sell",
"fiatCurrency": "INR",
"status": "active",
"wallets": [{ "network": "ethereum", "address": "0x742d..." }],
"userId": "usr_abc123",
"kycVerified": false,
"expiresAt": "2026-03-15T10:00:00.000Z"
},
"widgetUrl": null,
"kycRequired": true,
"kycVerificationUrl": "https://verify.zenpayz.com/session/abc123"
},
"message": "Ramp intent retrieved"
}

Automatic Behaviors

ConditionAction
Intent status is createdAuto-transitions to active on first GET
expiresAt has passedAuto-transitions to expired, returns widgetUrl: null
Widget URL not yet cachedGenerates and caches the widget URL
Intent in awaiting_payout phaseSkips widget URL generation (sell flow Phase 2)

Error Responses

CodeHTTPMessage
NOT_FOUND404Intent with the given ID does not exist

Examples

curl https://api.zenpayz.com/payment/api/v1/ramp-intents/ri_1710345678000_a1b2c3d4e5f6g7h8

Next Steps