Skip to content

Commit d6e368d

Browse files
authored
Merge pull request #523 from a-bahdanau/ton-link-upd
improve ton link invoices block
2 parents 15ba77f + 4e5f780 commit d6e368d

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
@@ -136,13 +136,20 @@ To accept payments based on attached comments, the service should
136136
### Invoices with ton:// link
137137

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

141-
```bash
141+
```text
142142
ton://transfer/<destination-address>?
143-
[nft=<nft-address>&]
144-
[fee-amount=<nanocoins>&]
145-
[forward-amount=<nanocoins>]
143+
[amount=<toncoin-in-nanocoins>&]
144+
[text=<url-encoded-utf8-comment>]
145+
```
146+
147+
Example of ton:// link generation:
148+
149+
```typescript
150+
const tonLink = `ton://transfer/${address.toString({
151+
urlSafe: true,
152+
})}?amount=${amount}${text ? `&text=${encodeURIComponent(text)}` : ''}`;
146153
```
147154

148155
- ✅ Easy integration

0 commit comments

Comments
 (0)