Crypto Payments

Initiate Crypto Charge: Creates a transaction and returns a dedicated receiving address for the customer to send crypto to. The customer pays in the selected crypto coin

Endpoint:POST /initiate-crypto

Parameters (JSON body):

  • public_key (required, string): Merchant Public API Key.
  • amount (required, number): Amount  to charge User (this will depend if fiat_currency is used or not).
  • crypto_coin (optional, string): Coin identifier, e.g. USDT.TRC20, BTC, LTC, ETH. Defaults to USDT.TRC20.
    fiat_currency (optional, string): Only USD Is Supported.
  • network (optional, string): Deprecated — use crypto_coin with the full identifier instead.
  • ipn_url (optional, string): HTTPS URL that will receive crypto payment confirmation.
  • success_url (optional, string): URL to redirect the payer after successful payment.
  • cancel_url (optional, string): URL to redirect the payer if payment is cancelled or fails.
  • identifier (optional, string): Your own order reference used later for IPN verification.
  • accept_percentage (optional, number): Minimum percentage of the amount to accept (1–100). Defaults to 100. For example, 50 means the payment is accepted even if the customer sends only 50% of the requested USD amount.

Example Request:

curl -X POST "https://umva.net/api/server-api-payment/initiate-crypto" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d "{
\"public_key\": \"PUB-LIVE-XXX\",
\"amount\": 100.50,
\"crypto_coin\": \"USDT.TRC20\",
\"ipn_url\": \"https://yoursite.com/ipn\",
\"success_url\": \"https://yoursite.com/success\",
\"cancel_url\": \"https://yoursite.com/cancel\",
\"identifier\": \"ORD-67890\",
\"accept_percentage\": 50
}"

Success Response Example (HTTP 200):

{
"status": "success",
"message": "Crypto transaction created",
"data": {
"identifier": "ORD-67890",
"trx": "UMV-TRX-C91FA42",
"wallet_address": "TMuA6YqfpeoQ1...",
"amount": 100.50,
"crypto_amount": 100.50,
"crypto_coin": "USDT.TRC20",
"network": "TRC20",
"txn_id": "CPKE...",
"success_url": "https://yoursite.com/success",
"cancel_url": "https://yoursite.com/cancel"
}
}


Partial Payment Acceptance: Use the accept_percentage parameter to control how much of the amount must be paid. For example, accept_percentage: 50 means the payment is accepted even if only 50% of the USD amount is received (useful for rate fluctuations or network fees).

Client Instructions: Display the wallet_address, crypto_amount, and crypto_coin to the customer so they know exactly how much to send and where. Use the trx field to track the payment in your system.

Crypto IPN Payload: When ipn_url is provided, UMVA sends a POST when the crypto payment is confirmed. The payload is similar to fiat but with payment_type set to "api_crypto". Verify the HMAC signature in the same way as fiat IPNs.