AkashicPay
English
English
  • Introduction
    • Overview
    • Fee Structure
    • Transaction Times
    • Terminology
  • Dashboard
    • Dashboard
    • Account
    • Transfer
    • Settings
    • Developers
  • SDK
    • Getting Started
    • Payment Flow
    • SDKs & Toolkits
    • Functions
      • getDepositAddress
      • getDepositUrl
      • Identifier & ReferenceId
      • Requested amount & currency
      • payout
      • Payout callback
      • Deposit callback
      • getTransfers
      • getBalance
      • getTransactionDetails
      • Errors
    • Supported Currencies
  • Secure Callback Endpoint
  • Guides
    • Quick Guide
    • Recommended integration flow
Powered by GitBook
On this page
  • Important Points
  • Supported Currencies
  • Example

Was this helpful?

  1. SDK
  2. Functions

Requested amount & currency

Requested Amount and Currency allow you to specify the value a deposit should have, in a range of currencies (including fiat).

PreviousIdentifier & ReferenceIdNextpayout

Last updated 4 days ago

Was this helpful?

When using or with a referenceId , you may additionally specify the amount you expect to receive in a range of currencies. If amount-matching is enabled in the Developer-settings on AkashicPay, the referenceId will only be attached to the callback for a deposit matching the requested amount.

Important Points

  • Amount-matching is optional and can be configured on the Dashboard's developer settings.

    • It is enabled by default

  • Amounts are matched up to 2 decimal places.

  • If specifying a currency different from the one of the deposit, the exchange rate at the time of requesting the address/url is used (particularly relevant for amounts in fiat)

  • Callbacks are still sent for all deposit (if the callback URL is correctly configured), regardless of matching or not. The difference is the inclusion of the referenceId and depositRequest fields

    • depositRequest will have the exchangeRate and requestedValue (see for details)

Supported Currencies

You may request an amount in the following fiat currencies:

  • CNY (Renminbi/Chinese Yuan)

  • HKD (Hong Kong dollar)

  • TWD (New Taiwan dollar)

  • USD (United States dollar)

And the following cryptocurrencies:

  • TRX (Tron)

  • ETH (Ethereum)

  • USDT (TRX)

  • USDT (ETH)

  • TRX (Tron)

  • ETH (Ethereum)

  • USDT (TRX)

  • USDT (ETH)

Example

Note: The code on this page should be regarded as pseudocode. Refer to the pages in the documentation describing the specific functions for details in every supported language.

AkashicPay.getDepositAddressWithRequestedValue('TRX', 'user1', 'order-123', 'CNY', '10.00')

In return, you would get an address to supply to the user. You can inform them to deposit an amount of cryptocurrency equivalent to 10 CNY into that address.

{
...,
"referenceId": "order-123",
"depositRequest": {
    "exchangeRate": "2.00"
    "requestedValue": {
        "amount": "10.00",
        "currency": "CNY"
        },
    },
...
}

However, if the user instead deposited e.g. 10 TRX the order would not be satisfied and the above fields would not be included in the callback (though a callback is still sent!). Only upon an exact match will the order be satisfied and the callback populated.

NOTE: Deposit-Requests expire after 1 Day (24hrs)!

  • After 24 hours, a user may still deposit and you will still receive the funds, but the referenceId will have expired and no amount-matching will take place.

The deposit may be settled in any of the :

Let's say you want user user1 to make a deposit with value equivalent to 10 CNY and that you want the user to use the Tron . First, you would ask for a deposit address like so:

At the time of this request, imagine 1 TRX is worth 2 CNY exactly. If the user then makes a deposit of 5 TRX, the order will be satisfied and the callback will include the following extra fields (see for complete callback details):

getDepositAddress
getDepositUrl
Deposit Callback
supported cryptocurrencies
Deposit Callback
Network