Skip to content

Commit 22e0e29

Browse files
committed
docs(ton-pay): tighten MoonPay wording and complete button prop tables
- on-ramp.mdx: drop the "MoonPay-related helper calls" phrasing that @ton-pay/api doesn't actually expose; describe the package's real scope (transfer creation, status lookups, reconciliation). - button-react.mdx, button-js.mdx: add referenceId to the checkout props tables so the merchant-side reconciliation field is discoverable alongside the TonPayWidgetProps type in api-reference.mdx. - button-js.mdx: add disabled, isLoading, className, and style to the button options table to match the React integration. - button-js.mdx: clarify that CDN TonPay.render / TonPay.createWidget map to the ESM named exports, so readers moving between Option 1 and Option 2 don't read the rename as a different API surface.
1 parent c117151 commit 22e0e29

3 files changed

Lines changed: 18 additions & 12 deletions

File tree

ecosystem/ton-pay/on-ramp.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Availability also depends on provider rules for the selected asset, payment meth
3030

3131
No additional on-ramp setup is required for the default hosted flow. Render [`TonPayWidget`](/ecosystem/ton-pay/ui-integration/button-react) with the checkout parameters, and TON Pay determines whether to show the MoonPay top-up step.
3232

33-
For [custom server-side flows](/ecosystem/ton-pay/payment-integration/payments-server-side) instead of the hosted widget, use `@ton-pay/api`, including MoonPay-related helper calls outside the widget flow.
33+
For [custom server-side flows](/ecosystem/ton-pay/payment-integration/payments-server-side) instead of the hosted widget, use `@ton-pay/api` for transfer creation, status lookups, and merchant-side reconciliation.
3434

3535
<Aside
3636
type="note"

ecosystem/ton-pay/ui-integration/button-js.mdx

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Or load the browser bundle directly:
3434
```
3535

3636
<Aside type="note">
37-
The CDN bundle exposes `window.TonPay`. Bundler users import the same API from `@ton-pay/ui`.
37+
The CDN bundle exposes `window.TonPay`, while bundler users import the same API from `@ton-pay/ui`. Calls such as `TonPay.render(...)` in the examples below map to the named ESM export `render(...)`, and the same applies to `createWidget` and other APIs.
3838
</Aside>
3939

4040
## Option 1: render the built-in button from a script tag
@@ -147,19 +147,24 @@ const widget = TonPay.createWidget({
147147
| `asset` | `string` | `currency ?? "TON"` | Asset identifier, including jettons. |
148148
| `itemTitle` | `string` | - | UI-only text displayed in the widget. |
149149
| `comment` | `string` | - | Payment comment added to the blockchain transaction. It maps to `commentToRecipient`. |
150+
| `referenceId` | `string` | - | Merchant-defined identifier passed through the checkout and echoed back in `onSuccess` payloads for reconciliation. |
150151

151152
### Button options
152153

153-
| Option | Type | Default | Description |
154-
| -------------- | ------------------- | ----------- | ---------------------------------- |
155-
| `variant` | `"long" \| "short"` | `"long"` | Button label variant. |
156-
| `text` | `string` | - | Override the default button label. |
157-
| `bgColor` | `string` | `"#0098EA"` | Button background color. |
158-
| `textColor` | `string` | `"#FFFFFF"` | Button text color. |
159-
| `borderRadius` | `number \| string` | `8` | Button border radius. |
160-
| `width` | `number \| string` | `"100%"` | Button width. |
161-
| `height` | `number \| string` | `44` | Button height. |
162-
| `fontFamily` | `string` | `"inherit"` | Button font family. |
154+
| Option | Type | Default | Description |
155+
| -------------- | --------------------------- | ----------- | ---------------------------------------- |
156+
| `variant` | `"long" \| "short"` | `"long"` | Button label variant. |
157+
| `text` | `string` | - | Override the default button label. |
158+
| `bgColor` | `string` | `"#0098EA"` | Button background color. |
159+
| `textColor` | `string` | `"#FFFFFF"` | Button text color. |
160+
| `borderRadius` | `number \| string` | `8` | Button border radius. |
161+
| `width` | `number \| string` | `"100%"` | Button width. |
162+
| `height` | `number \| string` | `44` | Button height. |
163+
| `fontFamily` | `string` | `"inherit"` | Button font family. |
164+
| `disabled` | `boolean` | `false` | Disable the button. |
165+
| `isLoading` | `boolean` | `false` | Force a loading state from the host app. |
166+
| `className` | `string` | - | Extra button class name. |
167+
| `style` | `Partial<CSSStyleDeclaration>` | - | Extra inline styles for the button. |
163168

164169
### Lifecycle callbacks
165170

ecosystem/ton-pay/ui-integration/button-react.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ With `TonPayWidget`, the host app passes checkout parameters and TON Pay handles
6767
| `asset` | `string` | `currency ?? "TON"` | Asset identifier, including jetton master addresses. |
6868
| `itemTitle` | `string` | - | UI-only text displayed in the widget. |
6969
| `comment` | `string` | - | Payment comment added to the blockchain transaction. It maps to `commentToRecipient`. |
70+
| `referenceId` | `string` | - | Merchant-defined identifier passed through the checkout and echoed back in `onSuccess` payloads for reconciliation. |
7071

7172
### Button props
7273

0 commit comments

Comments
 (0)