Skip to content

Commit 4e5f780

Browse files
committed
improve ton link invoices block
1 parent 374945b commit 4e5f780

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

docs/develop/dapps/asset-processing/README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,20 @@ To accept payments based on attached comments, the service should
150150
### Invoices with ton:// link
151151

152152
If you need an easy integration for a simple user flow, it is suitable to use the ton:// link.
153-
Best suited for one-time payments and invoices.
153+
Best suited for one-time payments and invoices with Toncoin.
154154

155-
```bash
155+
```text
156156
ton://transfer/<destination-address>?
157-
[nft=<nft-address>&]
158-
[fee-amount=<nanocoins>&]
159-
[forward-amount=<nanocoins>]
157+
[amount=<toncoin-in-nanocoins>&]
158+
[text=<url-encoded-utf8-comment>]
159+
```
160+
161+
Example of ton:// link generation:
162+
163+
```typescript
164+
const tonLink = `ton://transfer/${address.toString({
165+
urlSafe: true,
166+
})}?amount=${amount}${text ? `&text=${encodeURIComponent(text)}` : ''}`;
160167
```
161168

162169
- ✅ Easy integration

0 commit comments

Comments
 (0)