Skip to main content

Create Payment

POST
/payments/create

Creates a new cryptocurrency payment request. This endpoint generates a crypto payment address for your customer to send funds to and initiates payment tracking.

Request Parameters

ParameterTypeDescription
amount requirednumberThe payment amount in the specified currency.
currency requiredstringThe currency code for the payment (e.g., USDTTRC20, BTC, ETH).
wallet_id optionalstringUUID v4 of the wallet to receive the payment. If not provided, payment will go to the main balance.
callback_url optionalstringA URL that will receive payment status updates via webhooks. Must be a valid HTTPS URL.
custom_id optionalstringYour custom identifier for this payment (e.g., an order number). Max 64 characters.
description optionalstringDescription of the payment for your reference.

Example Request

POST /payments/create
Content-Type: application/json
X-API-Key: your_api_key_here

{
"amount": 100.00,
"currency": "USDTTRC20",
"wallet_id": "550e8400-e29b-41d4-a716-446655440000",
"callback_url": "https://your-site.com/payment/callback",
"custom_id": "ORDER-12345",
"description": "Payment for order #12345"
}

Response Parameters

ParameterTypeDescription
payment_idstringUnique UUID v4 identifier for the payment. Use this to check status or reference the payment.
amountnumberThe amount of cryptocurrency to be paid.
currencystringThe currency code used for the payment.
addressstringThe cryptocurrency address where funds should be sent.
expiry_timestringISO 8601 timestamp indicating when the payment request expires.
wallet_idstringThe UUID v4 of the wallet receiving the payment, or null for main balance.
statusstringCurrent status of the payment: "pending", "confirming", "completed", "expired", or "failed".
payment_urlstringOptional URL to a hosted payment page (if available).

Example Response

{
"payment_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"amount": 100.00,
"currency": "USDTTRC20",
"address": "TYN2WuEqttM5JjGk4ynGkxcnMRR9SZcvVx",
"expiry_time": "2025-04-30T14:30:25.123Z",
"wallet_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "pending",
"payment_url": "https://cryptofuse.io/payment/f47ac10b-58cc-4372-a567-0e02b2c3d479"
}

Error Codes

Status CodeError CodeDescription
400invalid_requestThe request was malformed or contained invalid parameters.
401unauthorizedAuthentication failed. Check your API key or OAuth 2.0 access token.
403forbiddenYour API key does not have permission to create payments.
404wallet_not_foundThe specified wallet_id was not found.
422currency_invalidThe specified currency is not supported or not enabled for your account.
429rate_limit_exceededYou have exceeded the rate limit for payment creation.
500server_errorAn error occurred with the payment processor. Contact support if this persists.

Notes

  • Payment requests typically expire after 1 hour if not completed. The exact time is indicated in the expiry_time field.
  • You should store the payment_id in your system to track the payment status.
  • If you provide a callback_url, you will receive payment status updates via webhooks. See the Implementing Callbacks guide for details.
  • If wallet_id is provided, the payment will be credited to that specific wallet. Otherwise, it will go to your main balance.
  • All UUIDs in the system follow the UUID v4 format (e.g., 550e8400-e29b-41d4-a716-446655440000).