getDepositUrl

Get a URL with deposit-addresses for all possible networks for a given identifier

Given a user-identifier, this function will create wallets on all supported networks via AkashicChain for the user to deposit into, and return a URL to display them

  • If you want to track an individual deposit made to any of the generated address, include referenceId

  • If the URL should only display a select choice of currencies, include them in a list as receiveCurrencies

    • If you want to change the type of currencies at a later time, just re-generate the URL via the SDK using the same parameters (but different receiveCurrencies ).

  • If you want precisely specify the amount that should be deposited for tracking purposes, perhaps in a different currency than the deposit will be made in (even fiat), include requestedAmount and requestedCurrency . See more here

Example

Get deposit URL for user123

const depositUrl = await akashicPay.getDepositUrl(
  'user123', // identifier
  'orderId', // optional referenceId
  [Currency.USDT], // optional currencies to be displayed
  "https://example.com" // optional redirectUrl
);

// with requestedAmount, requestedCurrency and markupPercentage
const { address, identifier } = await akashicPay.getDepositUrlWithRequestedValue(
  'user123', // identifier
  'orderId', // referenceId
  Currency.USD, // requested currency
  "1000", // requested amount
  array(CurrencySymbol::USDT), // optional currencies to be displayed
  1, // optional mark up percentage on exchange rate
  "https://example.com" // optional redirectUrl
);

Example deposit URL/QR code view for end-client

Last updated

Was this helpful?