> ## Documentation Index
> Fetch the complete documentation index at: https://lnurl.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# LUD-19: Pay link discoverable from withdraw link.

> Display inline code and code blocks

`author: akumaigorodski` `discussion: https://t.me/lnurl/12568`

***

## Merging "pay" and "withdraw" related to a same `SERVICE` in a `WALLET`

LNURL-withdraw may contain a `payLink` in its JSON response. This is done to recognize a fact that `SERVICE` may want to allow both deposits and withdrawals to user account and as such make a static payment link easily discoverable from withdraw link.

When `WALLET` sees this it may store and show a compound item to user which would allow to both deposit and withdraw (and also to show an up-to-date `SERVICE` balance if LNURL-withdraw contains a `balanceCheck` field).

Modification required in `SERVICE` callback JSON of LNURL-withdraw:

```diff theme={null}
 {
   "tag": "withdrawRequest",
   "callback": string,
   "k1": string,
   "defaultDescription": string,
   "minWithdrawable": number,
   "maxWithdrawable": number,
   "balanceCheck": string,
+  "payLink": string
 }
```

`payLink` is raw URL (not bech32-encoded) as described in [LUD-17](https://github.com/lnurl/luds/blob/luds/17.md).
