Skip to content

Commit

Permalink
Merge pull request #523 from a-bahdanau/ton-link-upd
Browse files Browse the repository at this point in the history
improve ton link invoices block
  • Loading branch information
reveloper authored Apr 30, 2024
2 parents 15ba77f + 4e5f780 commit d6e368d
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions docs/develop/dapps/asset-processing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,20 @@ To accept payments based on attached comments, the service should
### Invoices with ton:// link

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

```bash
```text
ton://transfer/<destination-address>?
[nft=<nft-address>&]
[fee-amount=<nanocoins>&]
[forward-amount=<nanocoins>]
[amount=<toncoin-in-nanocoins>&]
[text=<url-encoded-utf8-comment>]
```

Example of ton:// link generation:

```typescript
const tonLink = `ton://transfer/${address.toString({
urlSafe: true,
})}?amount=${amount}${text ? `&text=${encodeURIComponent(text)}` : ''}`;
```

- ✅ Easy integration
Expand Down

0 comments on commit d6e368d

Please sign in to comment.