{"id":"17eb2b686204b55509b4692d6010372b211e7d82b0ca105ce92c9285cf0f697f","pubkey":"d1678e7ef965374bbea308a1215609a78376dc158277a7d657680f9d5efd5c38","created_at":1741211928,"kind":30817,"tags":[["d","nut-15"],["title","NUT-15: Partial multi-path payments"],["summary","Paying one Lightning invoice from several mints at once, all of them or none."],["s","optional"],["t","cashu"],["t","ecash"],["t","nut"],["alt","A specification: NUT-15: Partial multi-path payments"],["client","openspecs-import"],["published_at","1713949538"],["proxy","https://github.com/cashubtc/nuts/blob/a845dfc998abae501fc3419592d53dc995d34b12/15.md","web"],["x","2ad9ecc80a00ed7e3842a2c0e80c0fa46487169f0145b6dc48d244a7a2fd56b3"]],"content":"# NUT-15: Partial multi-path payments\n\n`optional`\n\n`depends on: NUT-05`\n\n---\n\nIn this document, we describe how wallets can instruct multiple mints to each pay a partial amount of a bolt11 Lightning invoice. The full payment is composed of partial payments (MPP) from multiple multi-path payments from different Lightning nodes. This way, wallets can pay a larger Lightning invoice combined from multiple smaller balances on different mints. Due to the atomic nature of MPP, either all payments will be successful or all of them will fail.\n\nThe Lightning backend of the mint must support paying a partial amount of an Invoice and multi-path payments (MPP, see [BOLT 4](https://github.com/lightning/bolts/blob/master/04-onion-routing.md)). For example, the mint's Lightning node must be able to pay 50 sats of a 100 sat bolt11 invoice. The receiving Lightning node must support receiving multi-path payments as well.\n\n## Multimint payment execution\n\n`Alice`'s wallet coordinates multiple MPPs on different mints that support the feature (see below for the indicated setting). For a given Lightning invoice of `amount_total`, `Alice` splits the total amount into several partial amounts `amount_total = amount_1 + amount_2 + ...` that each must be covered by her individual balances on the mints she wants to use for the payment. She constructs multiple `PostMeltQuoteBolt11Request`'s that each include the corresponding partial amount in the payment option (see below) that she sends to all mints she wants to use for the payment. The mints then respond with a normal `PostMeltQuoteBolt11Response` (see [NUT-05][05]). `Alice` proceeds to pay the melt requests at each mint simultaneously. When all mints have sent out the partial Lightning payment, she receives a successful response from all mints individually.\n\n## Melt quote\n\nTo request a melt quote with a partial `amount`, the wallet of `Alice` makes a `POST /v1/melt/quote/bolt11` similar to [NUT-05][05].\n\n```http\nPOST https://mint.host:3338/v1/melt/quote/bolt11\n```\n\nThe wallet `Alice` includes the following `PostMeltQuoteBolt11Request` data in its request which includes an additional (and optional) `options` object compared to the standard request in [NUT-05][05]:\n\n```json\n{\n  \"request\": <str>,\n  \"unit\": <str_enum[\"sat\"]>,\n  \"options\": {\n    \"mpp\": {\n      \"amount\": <int>\n    }\n  }\n}\n```\n\nHere, `request` is the bolt11 Lightning invoice to be paid, `unit` is the unit the wallet would like to pay with. `amount` is the partial amount for the requested payment in millisats (msat). The wallet then pays the returned melt quote the same way as in [NUT-05][05].\n\n## Mint info setting\n\nThe settings returned in the info endpoint ([NUT-06][06]) indicate that a mint supports this NUT. The mint MUST indicate each `method` and `unit` that supports mpp. It can indicate this in an array of objects for multiple `method` and `unit` pairs.\n\n`MultipathPaymentSetting` is of the form:\n\n```json\n{\n  [\n    {\n      \"method\": <str>,\n      \"unit\": <str>\n    },\n    ...\n  ]\n}\n```\n\nExample `MultipathPaymentSetting`:\n\n```json\n{\n  \"15\": {\n    \"methods\": [\n      {\n        \"method\": \"bolt11\",\n        \"unit\": \"sat\"\n      },\n      {\n        \"method\": \"bolt11\",\n        \"unit\": \"usd\"\n      }\n    ]\n  }\n}\n```\n\n[05]: nostr:naddr1qvzqqqrcvypzp5t83el0jefhfwl2xz9py9tqnfurwmwptqnh5lt9w6q0n4006hpcqqrxuat595cr2dsg4q4\n[06]: nostr:naddr1qvzqqqrcvypzp5t83el0jefhfwl2xz9py9tqnfurwmwptqnh5lt9w6q0n4006hpcqqrxuat595crv3ltsuz\n","sig":"ec63467493f6769ba147aafc3c8107ac5dbd686b113880675d43e8c1808e0d1cab2d36705afc4ca94150fc09ab21dc608308ef3d5708d49b0b2201ae33d90f07"}