> For the complete documentation index, see [llms.txt](https://dev.hybrid-chain.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev.hybrid-chain.com/guides/financial-infrastructure/crypto-payments-gateway.md).

# Crypto Payments Gateway

If you're currently operating a platform that requires users to fund their accounts on your system (i.e. a Gaming Platform, Loyalty Points, Memberships, etc.) you can easily implement a behind-the-scenes rotation lwallet system, that provides your users with payment wallets, public keys and deposit options.

As you're the operator taking in the funds, the concept is to generate a rotational wallet for every payment request individually, but only show the user the deposit keys in the operator platform when the user wants to initiate a funding operation. The Vault System also has a callback feature, which is used to inform the operator that a new deposit was made. From there, the operator (you) can pull the funds from the payment wallet (rotational wallet) and send them to the master-account. This process is instantateous, and will allow the user to be credited with their deposit.

{% hint style="info" %}
A Merchant is a representation of a store or shop. You can create multiple merchants via the Account Dashboard and configure them individually (store name, background images, accepted currencies, callback links, etc.).\
It's advised to use different merchants for different stores to separate funds and flows from one another for accounting reasons.
{% endhint %}

{% hint style="success" %}
A Rotational Wallet is a specially created wallet under the main account's security framework (master-password and 2FA sub-system). \
Rotational Wallets are used for payments and can be re-used after a certain amount of time. This time-slicing feature is handled by the system automatically and doesn't need any special interaction from the operator or user. The rotational feature allows for direct allocation of a payment by a user, but without the expensive on-chain settlement fees for every deposit. Effectively, using Hybrid-Chain's Rotational Wallet feature, settlement fees can drop by 99%.
{% endhint %}

The Integration path is laid out as follows:

* Register User, Log In, Register 2FA Setup (in this case, the 2FA Initial Key and Master Password must be securely stored by the operator to later generate the 2FA Key on the Secure Send Request).
* In the Account Dashboard, multiple merchants can be configured (a merchant is a representative of a store, or platform, to separate transactions and deposit flows).
* Set the Callback Link per wallet to be informed that there has been an update to the rotational wallet's balance by an on-chain deposit.
* Via the Account Dashboard or the APIs, a new payment link can be generated. This link contains deposit keys for various currencies. They can be shown to the user via an iFrame, or via a custom built interface.

Once a the on-chain payment has been executed by the user, a callback is triggered to the configured URL or API-Endpoint on the operator's system.\
Once the callback is received, the following flow can be executed via API or the Account Dashboard:

* Get the Payment Link and view it's details on the status (PAID) including the amount and currency sent.
* (Optional) Trigger an action on the operator's system, such as sending an email to the user in question and informing them of a successful deposit. Some platforms (Gaming space) may update a user's credits on the platform.
* Get the balance/transaction history of the account, and create a settlement request.
* Initiate a withdrawal via the Secure Send function from the user's wallet to the operator's Master Account (via email). This is done by loading the locally stored 2FA Initial Key and generating the time-based OTP pin for the withdrawal.
* Now that the tunds have moved form the user's wallet to the master account, the user can be credited with the balance (at the latest).
* Optionally, the currency can be converted to a stable-currency if required. In this case a BTC Deposit would be converted to USD, eliminating the volatility and liquidity management concerns for the operator.

Note: the Operator of the Master Account can cash-out their remaining funds directly to their own bank account (EUR within Europe or USD globally). There is no holding period for any funds received, they are disposable instantly.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://dev.hybrid-chain.com/guides/financial-infrastructure/crypto-payments-gateway.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
