Crypto Deposit Workflow


Crypto Deposit
Following are the three roles involved in the crypto deposit workflow.
  1. SecretPay
    • A service provider offering various payment services to merchants.
  2. Merchant
    • A party that integrates the SECRETPAY service into its site.
  3. Customer
    • A client of merchant who uses merchant’s services.
To integrate crypto deposit workflow, SecretPay offers two sets crypto deposit workflows: one with exchange rate and another without exchange rate. Merchant can choose the workflow based on their specific requirements.

Crypto deposit service without exchange rate

  1. Customer visits merchant's site.
  2. Customer chooses to make a crypto deposit transaction using the merchant’s service.
  3. Merchant creates a transaction by calling the SECRETPAY Crypto Deposit API. Please refer Crypto Deposit API to the documentation available at https://document.secretpay.io/crypto/crypto-deposit.
  4. If a transaction is successfully generated, the API returns a document no (docNo) and transaction URL (depositURL).
  5. When the Customer clicks on the transaction URL, a new window will pop up, displaying the details of the crypto deposit transaction. This includes the SECRETPAY receiver account address individualized for the Customer during a specific timeframe.
  6. Subsequently, the Customer transfers tokens, like USDT, using a third-party website or extension such as TronLink or MetaMask to the address.
  7. If the transaction is successfully submitted to the blockchain network and confirmed, SECRETPAY will callback the transaction status to the Merchant. Please note that a valid merchant callback URL must be provided by the Merchant for the successful callback process.

Crypto deposit service with exchange rate

  1. Customer visits merchant's site.
  2. Customer check exchange rate on the Merchant side by calling SECRETPAY exchange rate API. The API response shows the ‘buy_price’, which represents the exchange rate. Please refer exchange rate to the documentation available at https://document.secretpay.io/exchange-rate.
  3. If the Customer is satisfied with the exchange rate, they then proceed to make a crypto deposit transaction using the merchant’s service.
  4. Merchant creates a transaction by calling the SECRETPAY Crypto Deposit API. Please refer Crypto Deposit API to the documentation available at https://document.secretpay.io/crypto/crypto-deposit.
  5. If a transaction is successfully generated, the API returns a document no (docNo) and transaction URL (depositURL).
  6. When the Customer clicks on the transaction URL, a new window will pop up, displaying the details of the crypto deposit transaction. This includes the SECRETPAY receiver account address individualized for the Customer during a specific timeframe.
  7. Subsequently, the Customer transfers tokens, like USDT, using a third-party website or extension such as TronLink or MetaMask to the address.
  8. If the transaction is successfully submitted to the blockchain network and confirmed, SECRETPAY will callback the transaction status to the Merchant. Please note that a valid merchant callback URL must be provided by the Merchant for the successful callback process.

Merchant Callback URL Integration in Crypto Deposit Callback API on Merchant side

  1. To integrate merchant callback url in Crypto Deposit Callback API, please refer to the documentation available at https://document.secretpay.io/crypto/crypto-deposit-callback.
  2. Upon receiving the API callback from SECRETPAY, Merchant initiates the X-Signature verification process to confirm the identity of sender which is SECRETPAY. It uses the shared key and same algorithm used by SECRETPAY to verify the authencity and integrity of the received ‘X-Signature’ (xSignature). To learn more about X-Signature: https://document.secretpay.io/x-signature.
  3. Then, Merchant sends a response containing R-Sign (rSign) to SECRETPAY via the merchant callback URL, which enables SECRETPAY to verify the identity of merchant. To learn more about R-Sign: https://document.secretpay.io/r-sign.
Orphan Case
In SECRETPAY Crypto Deposit, the term of ‘Orphan Case’ refers to situation where the Customer directly transfers tokens to the SECRETPAY receiver account address, which they had previously stored, without using merchant’s service to initial crypto deposit transaction.

Orphan case without exchange rate

  1. First, Customer needs to notify the Merchant when this occurs.
  2. Due to the orphan case where the transaction was not initiated using the merchant's service, SECRETPAY cannot callback to the merchant, as there is no record of the transaction and merchant callback URL received.
  3. Thus, Merchant contacts SECRETPAY operator and provides transaction details to perform manual verification.
  4. SECRETPAY operator proceeds verify with transaction details given by Merchant. Please note that Merchant needs to provide Crypto Deposit Orphan Callback URL to SECRETPAY admin for setting up callback merchant when orphan case occurs. The Crypto Deposit Orphan Callback URL request format is same as Crypto Deposit Callback request format.
  5. The transaction status will callback to Merchant when the transaction is verified success.

Orphan case with exchange rate

  1. First, Customer needs to notify the Merchant when this occurs.
  2. Due to the orphan case where the transaction was not initiated using the merchant's service, SECRETPAY cannot callback to the merchant, as there is no record of the transaction and merchant callback URL received.
  3. Thus, Merchant contacts SECRETPAY operator and provides transaction details to perform manual verification.
  4. SECRETPAY operator proceeds verify with transaction details given by Merchant. Please note that Merchant needs to provide Crypto Deposit Orphan Callback URL to SECRETPAY admin for setting up callback merchant when orphan case occurs. The Crypto Deposit Orphan Callback URL request format is same as Crypto Deposit Callback request format.
  5. If Merchant requires the exchange rate, they retrieve the "buy_price" as the exchange rate by calling SECRETPAY exchange rate API upon receiving Crypto Deposit Orphan Callback from SECRETPAY.
  6. The transaction status will callback to Merchant when the transaction is verified success.

Updated over 0 months Ago