Implementing a payment system

Before to start

In order to create a Payment Gateway, the user's project must have a selected network.
For information on the network selected by Project, refer to Project.

When creating EQ Hub's Payment Gateway service, the service operator can select the type of 'Virtual Account' or 'Smart Contract' that users will use to deposit assets. This guide will walk you through how to create and manage Payment Gateway as a 'Smart Contract' type.

👍

EQ Hub Pay type

The EQ Hub team recommends the 'Smart Contract' type considering the functionality and convenience of the payment system.

This guide will take you through

  • Creating payment gateway
  • Checking payment gateway details
  • Managing deposit details
  • Managing withdrawal history

Creating payment gateway

Click [ Developer ] - [ Payment gateway ] in the menu to enter the Payment Gateway List page. After that, click the [Create Payment Gateway] button to enter the Payment Gateway creation page.

And select the 'Smart Contract' type.

Enter basic information to create a Payment Gateway. The basic information is as follows.

DataDescriptionExample
NameThe name of the Payment Gateway.-
NetworkSelect the network on which the asset to be registered with Payment Gateway was issued.EQBR
CurrencySelect the asset to register with Payment Gateway.EQPT
TypeMeans the type of payment system.
Block Confirmation CountRefers to the number of new blocks added to the blockchain after a transaction has been included in a block. The more confirmations a transaction has, the more secure and permanent it is considered on the network.
Wallet addressMeans the wallet address where the payment amount will be settled when payment is made through the payment system.
Deposit redirect URIThis is the operator server address to be notified when a DApp user deposits network assets into a virtual account.(For payment/transfer features)
Withdrawal redirect URIThis is the operator server address to be notified when refund processing (remittance processing) is completed for the DApp user's refund request. (For refund/cancellation features)

Checking payment gateway details

From the menu bar, click [ Developer ] - [ Payment gateway ] to enter the Payment Gateway list page, and then click the Payment Gateway to enter administrator information to enter the detail page.

The data displayed on the details page includes:

DataDescriptionExample
UUID (payment_gateway_id)A unique ID registered when Payment Gateway was created.-
NameThe name of the Payment Gateway.-
NetworkThe name of the network on which the asset registered to Payment Gateway was issued.EQ Hub Mainnet
CurrencyAsset registered with Payment Gateway.-
TypeMeans the type of Payment system.-
Block Confirmation CountRefers to the number of new blocks added to the blockchain after a transaction has been included in a block. The more confirmations a transaction has, the more secure and permanent it is considered on the network.
Contract addressMeans the address of smart contract for EQ Hub Pay
Merchant AddressPayment Gateway's admin wallet address.-
Deposit redirect uriThis is the operator server address to be notified when a DApp user deposits network assets into a virtual account.-
Withdrawal redirect uriThis is the operator server address to be notified when refund processing (remittance processing) is completed for the DApp user's refund request.-

Managing deposit details

You can manage the user's deposit request and details in the 'Deposit' tab of the Payment Gateway details page.


Searching deposit history

In the search area, you can search by setting the virtual account deposit records of the desired conditions.

  • Date
    You can set the scope of the issuance point of the virtual account.
  • Address
    The wallet address of the virtual account.
  • Deposit
    Indicates the status of whether the user has deposited assets into the virtual account.
Deposit StatusDescription
CompleteThe deposit has been made to the virtual account, and a notification has been successfully sent to the operator's server.
Not confirmedA state in which assets have not been deposited into the virtual account.
Not checkedA deposit has been made to the virtual account, and a notification has been sent to the operator's server, but a response has not been received from the operator's server.
  • Transfer
    This means the status of whether the asset has been transferred from the virtual account to the manager's wallet.
Transfer statusDescription
SuccessThe transfer from the virtual account to the manager's wallet has been completed.
UnsentA state in which the transfer has not been made from the virtual account to the manager's wallet.
FailThe transfer from the virtual account to the manager's wallet has failed.

Checking the deposit history

The information displayed in the deposit history is as follows.

DataDescription
IDThe ID of Deposit request. Payment managers can use this ID value to distinguish payment details.
Purchase IDA value generated and sent by a DApp service (system) linked to EQ Hub Pay.
It plays a role in connecting the 'ID' value above with data within the service.
It mainly uses order numbers or payment numbers from the DApp.
AccountThis is the address of the user account who do the 'deposit'
TimeThe time the deposit request was created
AmountWhen a user deposits assets, the amount of deposited assets is displayed.
Tx HashWhen a user deposits assets, the hash of transaction is displayed
StatusThe status of the deposit request.
The Retry button is activated when the operator is notified of the completion of the deposit to the virtual account, but no response is received from the operator server. You can request notifications to be sent to the operator's server by clicking the button.

Managing withdrawal history

You can manage users' withdrawal requests and details in the 'Withdrawal' tab of the Payment Gateway details page.


Searching withdrawal history

In the search area, you can search for withdrawal requests with the desired conditions.

  • Date
    You can set a range of when withdrawals are requested.
  • Withdrawal
    Means the status of the processing result of the withdrawal request.
Withdrawal statusDescription
WaitThe withdrawal request has been received, and the withdrawal has not yet been processed.
SuccessStatus of successful transfer of assets to the user for a withdrawal request
FailStatus for when the asset was sent to the user for the withdrawal request, but the transaction failed.

Checking withdrawal history

The information displayed in the withdrawal history is as follows.

DataDescription
TimeThe time when the withdrawal request was created.
AccountThe wallet address of the user who requested the withdrawal is displayed.
AmountThe withdrawal amount of coin or token requested by the user is displayed.
WithdrawalThe status of the processing result of the withdrawal request is displayed.

In the Wait state, the Send button is activated, and if you sign the transaction by clicking the Certificate button in the EQ Hub wallet(Chrome Extension) that appears after clicking the button, the transfer request is completed.

In the case of Fail status, the Retry button is activated, and after clicking the button, click the Certificate button in the EQ Hub wallet(Chrome Extension) to sign the transaction, and the transfer request is completed.
CallbackThe status of the notification sent to the operator's server when the withdrawal process was successful is displayed.
If the withdrawal result notification is not normally sent to the operator's server or there is no response from the operator's server, the Retry button is activated. You can click the button to resend a notification about the withdrawal request to the operator's server.