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": "<string>",
  "inCurrency": "EUR",
  "outCryptocurrency": "USDC",
  "callbackUrl": "<string>",
  "idempotencyKey": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "successRedirectUrl": "<string>",
  "failureRedirectUrl": "<string>",
  "externalRef": "<string>",
  "metadata": {}
}
'
{
  "success": true,
  "result": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "paymentUrl": "<string>",
    "externalRef": "<string>",
    "status": "CREATED",
    "walletId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "blockchainTxId": "<string>",
    "failureReason": "<string>",
    "failureCode": "<unknown>",
    "cancellable": true,
    "expiresAt": "2023-11-07T05:31:56Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.venlyfinance.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Path Parameters

accountId
string<uuid>
required

Body

application/json
inAmount
string
required

Fiat amount to pay in

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

Fiat currency of the incoming payment

Available options:
EUR,
GBP,
USD
outCryptocurrency
enum<string>
required

Cryptocurrency to convert the incoming fiat to

Available options:
USDC,
EURC,
USDT
callbackUrl
string
required

HTTPS URL to receive payment status callbacks

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

Unique 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