Skip to main content

Generate New Payment

This endpoint generates a new payment request (including deposit address) for a specific wallet and cryptocurrency.

Request

POST /wallets/payment

Request Body

ParameterTypeRequiredDescription
wallet_idstringYesThe ID of the wallet to generate payment for
currencystringYesThe currency code for the payment (e.g., "USDTTRC20", "BTC")
amountstringNoThe amount expected in the payment
is_fixed_ratebooleanNoIf true, fixes the exchange rate at the time of generation
is_fee_paid_by_userbooleanNoIf true, the user pays the transaction fee
callback_urlstringNoURL to receive asynchronous payment notifications

Authentication

This endpoint requires authentication using one of the following methods:

  • API Key: X-API-Key header
  • OAuth 2.0: Authorization: Bearer {access_token} header

Example Request

curl -X POST "https://api.cryptofuse.io/wallets/payment" \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"wallet_id": "0d773ede-3a32-454e-8554-13f37eaa2f2a",
"currency": "eth",
"amount": "0.1",
"is_fixed_rate": true,
"is_fee_paid_by_user": false,
"callback_url": "https://yourdomain.com/wallets/callback/"
}'

Response

A successful response returns the details of the newly created payment, including the deposit address.

Example Response

{
"address": {
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"wallet_id": "550e8400-e29b-41d4-a716-446655440000",
"wallet_name": "Trading Wallet",
"currency": "USDTTRC20",
"address": "TYN2WuEqttM5JjGk4ynGkxcnMRR9SZcvVx",
"created_at": "2025-04-30T12:34:56.789Z"
}
}

Response Fields

FieldTypeDescription
address.idstringUnique identifier for the payment address
address.wallet_idstringID of the wallet
address.wallet_namestringName of the wallet
address.currencystringPayment currency
address.addressstringBlockchain deposit address
address.created_atstringISO 8601 timestamp of payment creation

Error Responses

Status CodeError CodeDescription
400invalid_requestInvalid request or missing parameters
401unauthorizedAuthentication failed
403forbiddenUser lacks required permissions
404wallet_not_foundWallet not found
422currency_invalidInvalid or unsupported currency
500server_errorInternal server error

Notes

  • Wallet ID must be valid and previously created.
  • This endpoint is used to initiate a payment and return an address for it.
  • Multiple payments can be generated for the same wallet and currency.
  • Some blockchains may require additional fields (e.g., memo, tag).