You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ton-pay): streamline on-ramp documentation and remove legacy sections
- Updated the on-ramp documentation to clarify the integration process with MoonPay, enhancing user guidance.
- Removed outdated legacy version sections from the documentation to focus on current practices.
- Added details on regional availability and wallet funding processes to improve clarity for developers.
Copy file name to clipboardExpand all lines: ecosystem/ton-pay/on-ramp.mdx
+25-7Lines changed: 25 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,17 +3,35 @@ title: "On-ramp in TON Pay SDK"
3
3
sidebarTitle: "On-ramp"
4
4
---
5
5
6
-
import { Aside } from'/snippets/aside.jsx';
6
+
import { Aside } from"/snippets/aside.jsx";
7
7
8
-
The TON Pay SDK includes a built-in fiat-to-crypto on-ramp powered by [MoonPay](https://www.moonpay.com/). It allows users to top up their wallets with a bank card directly from the payment modal.
8
+
TON Pay includes a built-in fiat-to-crypto on-ramp powered by [MoonPay](https://www.moonpay.com/). Inside `TonPayWidget`, MoonPay can appear as an embedded top-up step when the user needs additional funds to complete checkout.
9
+
10
+
This lets users buy crypto with a bank card and receive funds directly into the wallet used for the payment flow. The merchant payment is completed only after the funds arrive in the user's wallet and the balance becomes sufficient.
9
11
10
12
## How it works
11
13
12
-
1. The user opens `TonPayWidget`.
13
-
1. TON Pay evaluates the current checkout state inside the hosted flow.
14
-
1. If wallet funding is needed and on-ramp is available for that session, the widget can present a top-up step.
15
-
1. After the top-up flow, the user can continue checkout in the same widget experience.
14
+
When the user opens `TonPayWidget`, TON Pay evaluates the current checkout state. If the wallet balance is not enough to complete the purchase, the hosted flow can offer an on-ramp step.
15
+
16
+
1. Balance check. TON Pay verifies whether the connected wallet has enough funds for the requested payment.
17
+
1. MoonPay availability check. TON Pay checks whether the current session is eligible for MoonPay, including regional availability, supported asset, and provider-side limits.
18
+
1. Amount calculation. TON Pay calculates the top-up amount required to continue checkout.
19
+
1. Widget rendering. If the session is eligible, the MoonPay purchase widget opens inside the hosted TON Pay flow.
20
+
1. Wallet funding. The purchased assets are sent directly to the user's wallet, not to the merchant.
21
+
1. Checkout resume. After the wallet balance becomes sufficient, the user can continue and complete the merchant payment in the same flow.
22
+
23
+
## Regional availability
24
+
25
+
TON Pay offers the on-ramp step only when MoonPay supports purchases in the buyer's region. If MoonPay is unavailable for that region, the widget does not suggest topping up the wallet by card and the user can continue only with funds that are already available in the wallet or added externally.
26
+
27
+
Availability can also depend on provider rules for the selected asset, payment method, and transaction amount.
16
28
17
29
## Merchant integration
18
30
19
-
No dedicated on-ramp props are required in the host app. Render `TonPayWidget` with the checkout parameters and let the hosted flow decide when to surface on-ramp.
31
+
No dedicated on-ramp setup is required in the host app for the default hosted flow. Render [`TonPayWidget`](/ecosystem/ton-pay/ui-integration/button-react) with the checkout parameters, and TON Pay will decide whether to surface the MoonPay top-up step for that specific session.
32
+
33
+
If your integration uses custom server-side flows instead of the hosted widget, see the [server-side integration guide](/ecosystem/ton-pay/payment-integration/payments-server-side) for `@ton-pay/api` usage, including MoonPay-related helper calls outside the widget flow.
34
+
35
+
<Asidetype="note"title="Processing times and provider rules">
36
+
MoonPay purchases are subject to provider-side availability, limits, fees, and confirmation time. TON Pay can continue checkout only after the purchased funds reach the user's wallet.
0 commit comments