createCryptoDotComPayment
Creates a Crypto.com payment for purchasing cryptocurrency with fiat. This returns a payment URL that you can display in an iframe within your app or open in a new window.Usage
Parameters
| Parameter | Type | Description |
|---|---|---|
walletAddress | string | The wallet address to receive the purchased crypto. |
chain | string | The blockchain (e.g., EVM). |
networkId | string | The network ID (e.g., 1 for Ethereum mainnet, 137 for Polygon). |
currency | string | The fiat currency for payment (e.g., USD, EUR). |
amount | number | The amount in fiat currency to spend. |
merchantName | string | Your app or merchant name shown to the user. |
client | DynamicClient (optional) | The Dynamic client instance. Only required when using multiple clients. |
Returns
Promise<CryptoDotComPaymentResponse> - A promise that resolves to the payment details:
Examples
Embedded iframe experience
Open in new window
With network selection
Related functions
- getCoinbaseBuyUrl - Get Coinbase buy URL (redirect flow)
- createCoinbaseOnrampOrder - Create Coinbase order (embedded flow)