Skip to main content
POST
/
accounts
/
{accountId}
/
fiat-to-crypto
/
payment-sessions
Create a fiat-to-crypto payment session
curl --request POST \
  --url https://api.venlyfinance.com/v1/accounts/{accountId}/fiat-to-crypto/payment-sessions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "inAmount": "100.00",
  "inCurrency": "EUR",
  "outCryptocurrency": "USDC",
  "callbackUrl": "https://example.com/webhooks/pay-in",
  "successRedirectUrl": "https://example.com/pay-in/success",
  "failureRedirectUrl": "https://example.com/pay-in/failure",
  "externalRef": "order-67890",
  "idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
'
{
  "success": true,
  "result": {
    "id": "5e6f7081-92a3-4b4c-8d5e-6f708192a3b4",
    "accountId": "b2a1f0e9-8c7d-4e3a-9f21-0a1b2c3d4e5f",
    "status": "CREATED",
    "inAmount": 100,
    "inCurrency": "EUR",
    "outCryptocurrency": "USDC",
    "paymentUrl": "https://pay.example.com/session/5e6f708192a3b4c8",
    "externalRef": "order-67890",
    "walletId": "9f8e7d6c-5b4a-4938-8271-6a5b4c3d2e1f",
    "blockchainTxId": null,
    "cancellable": true,
    "expiresAt": "2026-01-15T10:30:00Z",
    "metadata": {
      "orderId": "67890"
    },
    "idempotencyKey": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "createdAt": "2026-01-15T09:30:00",
    "updatedAt": "2026-01-15T09:30:00"
  }
}
Creates a hosted pay-in session. Redirect the payer to the returned paymentUrl; on completion the fiat is converted to the chosen cryptocurrency and credited to the account’s wallet. Provide a callbackUrl and a unique idempotencyKey (safe retries).
The account must be verified before a pay-in session can be created. See Account verification.

Authorizations

Path Parameters

accountId
string<uuid>
required

Unique account identifier

Body

application/json
inAmount
string
required

Fiat amount to pay in

Pattern: ^\d+(\.\d{1,2})?$
inCurrency
string
required

Fiat currency of the incoming payment (e.g. EUR)

Minimum string length: 1
outCryptocurrency
string
required

Cryptocurrency to convert the incoming fiat to (e.g. USDC)

Minimum string length: 1
callbackUrl
string
required

HTTPS URL to receive payment status callbacks

Pattern: ^https://.*
idempotencyKey
string<uuid>
required

Unique UUID key to prevent duplicate operations on retry

successRedirectUrl
string

URL to redirect the user to on successful payment

failureRedirectUrl
string

URL to redirect the user to on failed payment

externalRef
string

Optional external reference

Maximum string length: 255
metadata
object

Response

Payment session created

success
boolean

Indicates whether the request was successful

result
object