Skip to content

Commit f54476e

Browse files
committed
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.
1 parent fb4d3c1 commit f54476e

6 files changed

Lines changed: 29 additions & 289 deletions

File tree

docs.json

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -244,13 +244,6 @@
244244
"ecosystem/ton-pay/ui-integration/button-js"
245245
]
246246
},
247-
{
248-
"group": "Legacy versions",
249-
"pages": [
250-
"ecosystem/ton-pay/legacy/overview",
251-
"ecosystem/ton-pay/legacy/react-integration"
252-
]
253-
},
254247
"ecosystem/ton-pay/api-reference"
255248
]
256249
},

ecosystem/ton-pay/legacy/overview.mdx

Lines changed: 0 additions & 37 deletions
This file was deleted.

ecosystem/ton-pay/legacy/react-integration.mdx

Lines changed: 0 additions & 236 deletions
This file was deleted.

ecosystem/ton-pay/on-ramp.mdx

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,35 @@ title: "On-ramp in TON Pay SDK"
33
sidebarTitle: "On-ramp"
44
---
55

6-
import { Aside } from '/snippets/aside.jsx';
6+
import { Aside } from "/snippets/aside.jsx";
77

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.
911

1012
## How it works
1113

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.
1628

1729
## Merchant integration
1830

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+
<Aside type="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.
37+
</Aside>

ecosystem/ton-pay/overview.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ The UI components provide a complete checkout experience for most web applicatio
103103
1. TON Pay backend generates a transaction message.
104104
1. The user reviews and signs the transaction in the wallet.
105105
1. The transaction is executed and confirmed on the TON blockchain.
106+
1. After the payment is submitted for signing, the SDK lets the application track completion by `reference` or `bodyBase64Hash`.
106107

107108
## Security
108109

@@ -116,4 +117,4 @@ Install the [SDK](https://www.npmjs.com/package/@ton-pay/api) and configure the
116117

117118
<sub>
118119
TON Pay SDK is open source software licensed under the Apache License 2.0.
119-
</sub>
120+
</sub>

ecosystem/ton-pay/quick-start.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ import { Aside } from "/snippets/aside.jsx";
1818
```
1919

2020
<Aside type="tip">
21-
`TonPayWidget` does not require `@ton-pay/api`. Install it only for server-side.
21+
`TonPayWidget` does not require `@ton-pay/api`. Install it separately only
22+
for server-side helpers or for flows that do not use the TON Pay UI.
2223
</Aside>
2324
</Step>
2425

0 commit comments

Comments
 (0)