[{"data":1,"prerenderedAt":1598},["ShallowReactive",2],{"\u002Fpayments":3},{"id":4,"title":5,"body":6,"description":1590,"extension":1591,"meta":1592,"navigation":1593,"path":1594,"seo":1595,"stem":1596,"__hash__":1597},"content\u002Fpayments.md","Payments",{"type":7,"value":8,"toc":1561},"minimark",[9,14,18,34,56,60,71,130,196,220,223,252,262,266,270,273,320,324,327,355,363,367,370,384,388,391,395,513,516,594,597,601,822,834,838,841,864,874,877,881,887,890,970,973,1089,1232,1235,1239,1242,1249,1252,1255,1258,1261,1265,1268,1272,1280,1283,1314,1317,1325,1328,1332,1340,1350,1354,1360,1364,1367,1473,1476,1480,1506,1510,1557],[10,11,13],"h2",{"id":12},"scope","Scope",[15,16,17],"p",{},"Open Markets separates four concerns:",[19,20,21,25,28,31],"ol",{},[22,23,24],"li",{},"An offer states a price.",[22,26,27],{},"An order proposes a purchase.",[22,29,30],{},"A payment request states what the merchant will accept for that order.",[22,32,33],{},"A payment receipt carries evidence that the buyer paid.",[15,35,36,37,42,43,47,48,51,52,55],{},"Payment messages are private unsigned rumors transported with the envelope defined in ",[38,39,41],"a",{"href":40},"\u002Forders#private-transport","Orders",". This specification preserves Gamma's deployed wire allocation: payment requests are kind ",[44,45,46],"code",{},"16",", type ",[44,49,50],{},"2","; payment receipts are kind ",[44,53,54],{},"17",".",[10,57,59],{"id":58},"merchant-preferences","Merchant preferences",[15,61,62,63,66,67,70],{},"A merchant MAY publish one ",[44,64,65],{},"payment_preference"," tag in their kind ",[44,68,69],{},"0"," profile:",[72,73,78],"pre",{"className":74,"code":75,"language":76,"meta":77,"style":77},"language-json shiki shiki-themes github-light github-dark","[\"payment_preference\", \"manual\"]\n[\"payment_preference\", \"ecash\"]\n[\"payment_preference\", \"lud16\"]\n","json","",[44,79,80,102,116],{"__ignoreMap":77},[81,82,85,89,93,96,99],"span",{"class":83,"line":84},"line",1,[81,86,88],{"class":87},"sVt8B","[",[81,90,92],{"class":91},"sZZnC","\"payment_preference\"",[81,94,95],{"class":87},", ",[81,97,98],{"class":91},"\"manual\"",[81,100,101],{"class":87},"]\n",[81,103,105,107,109,111,114],{"class":83,"line":104},2,[81,106,88],{"class":87},[81,108,92],{"class":91},[81,110,95],{"class":87},[81,112,113],{"class":91},"\"ecash\"",[81,115,101],{"class":87},[81,117,119,121,123,125,128],{"class":83,"line":118},3,[81,120,88],{"class":87},[81,122,92],{"class":91},[81,124,95],{"class":87},[81,126,127],{"class":91},"\"lud16\"",[81,129,101],{"class":87},[131,132,133,146],"table",{},[134,135,136],"thead",{},[137,138,139,143],"tr",{},[140,141,142],"th",{},"Value",[140,144,145],{},"Meaning",[147,148,149,158,168,178,188],"tbody",{},[137,150,151,155],{},[152,153,154],"td",{},"absent",[152,156,157],{},"Use the manual flow",[137,159,160,165],{},[152,161,162],{},[44,163,164],{},"manual",[152,166,167],{},"Wait for a merchant-authored payment request",[137,169,170,175],{},[152,171,172],{},[44,173,174],{},"ecash",[152,176,177],{},"A direct eCash flow may be offered",[137,179,180,185],{},[152,181,182],{},[44,183,184],{},"lud16",[152,186,187],{},"A direct LNURL\u002FLightning flow may be offered",[137,189,190,193],{},[152,191,192],{},"unknown",[152,194,195],{},"Do not guess; fall back to manual",[15,197,198,199,205,206,95,209,212,213,216,217,219],{},"Open ",[38,200,204],{"href":201,"rel":202},"https:\u002F\u002Fgithub.com\u002FGammaMarkets\u002Fmarket-spec\u002Fpull\u002F2",[203],"nofollow","Gamma PR #2"," proposed replacing these values with ",[44,207,208],{},"service",[44,210,211],{},"lightning",", and ",[44,214,215],{},"bitcoin",", changing the default, and moving receipts into kind ",[44,218,46],{},". Open Markets incorporates its useful three-flow model but rejects those incompatible wire changes.",[15,221,222],{},"Before checkout, a client SHOULD automatically resolve:",[224,225,226,232,239,246],"ul",{},[22,227,228,229,231],{},"the merchant's kind ",[44,230,69],{}," payment preference;",[22,233,234,235,238],{},"merchant-authored NIP-89 kind ",[44,236,237],{},"31989"," application recommendations;",[22,240,241,242,245],{},"the referenced kind ",[44,243,244],{},"31990"," application descriptor;",[22,247,248,249,251],{},"required payment metadata such as ",[44,250,184],{}," or preferred Cashu mint information.",[15,253,254,255,257,258,261],{},"The merchant's signature on kind ",[44,256,237],{}," establishes a recommendation. A standalone application descriptor or ",[44,259,260],{},"client"," tag does not. Recommendations affect routing and UX; they do not authorize software to sign for either party.",[10,263,265],{"id":264},"processing-flows","Processing flows",[267,268,269],"h3",{"id":164},"Manual",[15,271,272],{},"Manual is the default and most compatible flow:",[19,274,275,284,290,297,300,306,309],{},[22,276,277,278,47,280,283],{},"Buyer sends a kind ",[44,279,46],{},[44,281,282],{},"1"," order.",[22,285,286,287,55],{},"Merchant MAY acknowledge it as ",[44,288,289],{},"pending",[22,291,292,293,47,295,55],{},"Merchant calculates the final amount and sends kind ",[44,294,46],{},[44,296,50],{},[22,298,299],{},"Buyer validates and pays one option.",[22,301,302,303,305],{},"Buyer sends kind ",[44,304,54],{}," with payment evidence.",[22,307,308],{},"Merchant verifies the proof independently.",[22,310,311,312,47,314,95,317,55],{},"Merchant sends kind ",[44,313,46],{},[44,315,316],{},"3",[44,318,319],{},"confirmed",[267,321,323],{"id":322},"direct","Direct",[15,325,326],{},"Direct payment is available only when the merchant has published sufficient compatible payment information:",[19,328,329,338,341,344,350],{},[22,330,331,332,334,335,337],{},"Buyer resolves ",[44,333,174],{}," or ",[44,336,184],{}," preference data.",[22,339,340],{},"Buyer creates the order and obtains or constructs valid payment material.",[22,342,343],{},"Buyer pays without waiting for a merchant-authored request.",[22,345,346,347,349],{},"Buyer sends a normal kind ",[44,348,54],{}," receipt.",[22,351,352,353,55],{},"Merchant verifies payment and sends ",[44,354,319],{},[15,356,357,359,360,362],{},[44,358,322],{}," is a flow classification, not a ",[44,361,65],{}," wire value.",[267,364,366],{"id":365},"service-assisted","Service-assisted",[15,368,369],{},"A merchant-recommended application MAY facilitate either flow. The service can calculate totals, construct a payment request, monitor payment, or help construct a receipt. The user remains the author of user-authored rumors unless separate explicit authority exists.",[15,371,372,373,375,376,380,381,383],{},"A buyer-authored type ",[44,374,50],{}," rumor is permitted only as ",[377,378,379],"strong",{},"service-assisted payment initiation"," when the merchant has explicitly recommended the service, the kind ",[44,382,244],{}," handler declares compatible support, and the merchant can independently validate its amount and payment details. It MUST NOT be presented as a merchant-authored request.",[10,385,387],{"id":386},"payment-request","Payment request",[15,389,390],{},"A payment request is normally authored by the merchant and addressed to the buyer.",[267,392,394],{"id":393},"schema","Schema",[131,396,397,410],{},[134,398,399],{},[137,400,401,404,408],{},[140,402,403],{},"Tag",[140,405,407],{"align":406},"right","Cardinality",[140,409,145],{},[147,411,412,424,439,452,464,476,489,502],{},[137,413,414,418,421],{},[152,415,416],{},[44,417,15],{},[152,419,420],{"align":406},"exactly 1",[152,422,423],{},"Buyer public key",[137,425,426,431,433],{},[152,427,428],{},[44,429,430],{},"subject",[152,432,420],{"align":406},[152,434,435,436],{},"Recommended value ",[44,437,438],{},"order-payment",[137,440,441,446,448],{},[152,442,443],{},[44,444,445],{},"type",[152,447,420],{"align":406},[152,449,450],{},[44,451,50],{},[137,453,454,459,461],{},[152,455,456],{},[44,457,458],{},"order",[152,460,420],{"align":406},[152,462,463],{},"Original order identifier",[137,465,466,471,473],{},[152,467,468],{},[44,469,470],{},"amount",[152,472,420],{"align":406},[152,474,475],{},"Final total in integer satoshis",[137,477,478,483,486],{},[152,479,480],{},[44,481,482],{},"payment",[152,484,485],{"align":406},"1 or more",[152,487,488],{},"Alternative payment option",[137,490,491,496,499],{},[152,492,493],{},[44,494,495],{},"expiration",[152,497,498],{"align":406},"0 or 1",[152,500,501],{},"Request expiry in Unix seconds",[137,503,504,508,510],{},[152,505,506],{},[44,507,260],{},[152,509,498],{"align":406},[152,511,512],{},"Optional NIP-89 attribution",[15,514,515],{},"Supported payment option shapes include:",[72,517,519],{"className":74,"code":518,"language":76,"meta":77,"style":77},"[\"payment\", \"lightning\", \"\u003Cbolt11-invoice-or-lud16>\"]\n[\"payment\", \"bitcoin\", \"\u003Cbitcoin-address>\"]\n[\"payment\", \"ecash\", \"\u003Ccashu-payment-request>\"]\n[\"payment\", \"\u003Cmedium>\", \"\u003Cmedium-specific-request>\"]\n",[44,520,521,540,558,575],{"__ignoreMap":77},[81,522,523,525,528,530,533,535,538],{"class":83,"line":84},[81,524,88],{"class":87},[81,526,527],{"class":91},"\"payment\"",[81,529,95],{"class":87},[81,531,532],{"class":91},"\"lightning\"",[81,534,95],{"class":87},[81,536,537],{"class":91},"\"\u003Cbolt11-invoice-or-lud16>\"",[81,539,101],{"class":87},[81,541,542,544,546,548,551,553,556],{"class":83,"line":104},[81,543,88],{"class":87},[81,545,527],{"class":91},[81,547,95],{"class":87},[81,549,550],{"class":91},"\"bitcoin\"",[81,552,95],{"class":87},[81,554,555],{"class":91},"\"\u003Cbitcoin-address>\"",[81,557,101],{"class":87},[81,559,560,562,564,566,568,570,573],{"class":83,"line":118},[81,561,88],{"class":87},[81,563,527],{"class":91},[81,565,95],{"class":87},[81,567,113],{"class":91},[81,569,95],{"class":87},[81,571,572],{"class":91},"\"\u003Ccashu-payment-request>\"",[81,574,101],{"class":87},[81,576,578,580,582,584,587,589,592],{"class":83,"line":577},4,[81,579,88],{"class":87},[81,581,527],{"class":91},[81,583,95],{"class":87},[81,585,586],{"class":91},"\"\u003Cmedium>\"",[81,588,95],{"class":87},[81,590,591],{"class":91},"\"\u003Cmedium-specific-request>\"",[81,593,101],{"class":87},[15,595,596],{},"Repeated payment tags are alternatives. This protocol does not define split payment across them.",[267,598,600],{"id":599},"example","Example",[72,602,604],{"className":74,"code":603,"language":76,"meta":77,"style":77},"{\n  \"id\": \"\u003Crumor-id>\",\n  \"pubkey\": \"\u003Cmerchant-pubkey>\",\n  \"created_at\": 1786953600,\n  \"kind\": 16,\n  \"tags\": [\n    [\"p\", \"\u003Cbuyer-pubkey>\"],\n    [\"subject\", \"order-payment\"],\n    [\"type\", \"2\"],\n    [\"order\", \"a47e7fbb3a8f4f98a31d88b3f7703567\"],\n    [\"amount\", \"21000\"],\n    [\"payment\", \"lightning\", \"lnbc210u1...\"],\n    [\"payment\", \"bitcoin\", \"bc1q...\"],\n    [\"expiration\", \"1786954500\"]\n  ],\n  \"content\": \"Choose one payment option before the request expires.\"\n}\n",[44,605,606,611,626,638,650,662,671,688,703,718,733,748,766,784,799,805,816],{"__ignoreMap":77},[81,607,608],{"class":83,"line":84},[81,609,610],{"class":87},"{\n",[81,612,613,617,620,623],{"class":83,"line":104},[81,614,616],{"class":615},"sj4cs","  \"id\"",[81,618,619],{"class":87},": ",[81,621,622],{"class":91},"\"\u003Crumor-id>\"",[81,624,625],{"class":87},",\n",[81,627,628,631,633,636],{"class":83,"line":118},[81,629,630],{"class":615},"  \"pubkey\"",[81,632,619],{"class":87},[81,634,635],{"class":91},"\"\u003Cmerchant-pubkey>\"",[81,637,625],{"class":87},[81,639,640,643,645,648],{"class":83,"line":577},[81,641,642],{"class":615},"  \"created_at\"",[81,644,619],{"class":87},[81,646,647],{"class":615},"1786953600",[81,649,625],{"class":87},[81,651,653,656,658,660],{"class":83,"line":652},5,[81,654,655],{"class":615},"  \"kind\"",[81,657,619],{"class":87},[81,659,46],{"class":615},[81,661,625],{"class":87},[81,663,665,668],{"class":83,"line":664},6,[81,666,667],{"class":615},"  \"tags\"",[81,669,670],{"class":87},": [\n",[81,672,674,677,680,682,685],{"class":83,"line":673},7,[81,675,676],{"class":87},"    [",[81,678,679],{"class":91},"\"p\"",[81,681,95],{"class":87},[81,683,684],{"class":91},"\"\u003Cbuyer-pubkey>\"",[81,686,687],{"class":87},"],\n",[81,689,691,693,696,698,701],{"class":83,"line":690},8,[81,692,676],{"class":87},[81,694,695],{"class":91},"\"subject\"",[81,697,95],{"class":87},[81,699,700],{"class":91},"\"order-payment\"",[81,702,687],{"class":87},[81,704,706,708,711,713,716],{"class":83,"line":705},9,[81,707,676],{"class":87},[81,709,710],{"class":91},"\"type\"",[81,712,95],{"class":87},[81,714,715],{"class":91},"\"2\"",[81,717,687],{"class":87},[81,719,721,723,726,728,731],{"class":83,"line":720},10,[81,722,676],{"class":87},[81,724,725],{"class":91},"\"order\"",[81,727,95],{"class":87},[81,729,730],{"class":91},"\"a47e7fbb3a8f4f98a31d88b3f7703567\"",[81,732,687],{"class":87},[81,734,736,738,741,743,746],{"class":83,"line":735},11,[81,737,676],{"class":87},[81,739,740],{"class":91},"\"amount\"",[81,742,95],{"class":87},[81,744,745],{"class":91},"\"21000\"",[81,747,687],{"class":87},[81,749,751,753,755,757,759,761,764],{"class":83,"line":750},12,[81,752,676],{"class":87},[81,754,527],{"class":91},[81,756,95],{"class":87},[81,758,532],{"class":91},[81,760,95],{"class":87},[81,762,763],{"class":91},"\"lnbc210u1...\"",[81,765,687],{"class":87},[81,767,769,771,773,775,777,779,782],{"class":83,"line":768},13,[81,770,676],{"class":87},[81,772,527],{"class":91},[81,774,95],{"class":87},[81,776,550],{"class":91},[81,778,95],{"class":87},[81,780,781],{"class":91},"\"bc1q...\"",[81,783,687],{"class":87},[81,785,787,789,792,794,797],{"class":83,"line":786},14,[81,788,676],{"class":87},[81,790,791],{"class":91},"\"expiration\"",[81,793,95],{"class":87},[81,795,796],{"class":91},"\"1786954500\"",[81,798,101],{"class":87},[81,800,802],{"class":83,"line":801},15,[81,803,804],{"class":87},"  ],\n",[81,806,808,811,813],{"class":83,"line":807},16,[81,809,810],{"class":615},"  \"content\"",[81,812,619],{"class":87},[81,814,815],{"class":91},"\"Choose one payment option before the request expires.\"\n",[81,817,819],{"class":83,"line":818},17,[81,820,821],{"class":87},"}\n",[15,823,824,825,827,828,833],{},"The optional ",[44,826,495],{}," tag is retained from merged ",[38,829,832],{"href":830,"rel":831},"https:\u002F\u002Fgithub.com\u002FGammaMarkets\u002Fmarket-spec\u002Fpull\u002F4",[203],"Gamma PR #4",". A client MUST NOT pay an expired request. When native payment material expires earlier, such as a BOLT11 invoice, the earlier expiry wins.",[267,835,837],{"id":836},"request-validation","Request validation",[15,839,840],{},"Before presenting or paying a request, a client MUST:",[19,842,843,846,852,855,858,861],{},[22,844,845],{},"Validate the NIP-17 envelope, author, recipient, order identity, and tag cardinality.",[22,847,848,849,851],{},"Require ",[44,850,470],{}," to be a non-negative base-10 integer in satoshis.",[22,853,854],{},"Confirm that the request corresponds to an existing order between the same buyer and merchant.",[22,856,857],{},"Display material differences between the order proposal and payment request.",[22,859,860],{},"Validate each payment option before use.",[22,862,863],{},"Reject expired requests.",[15,865,866,867,870,871,873],{},"For BOLT11, the encoded amount MUST equal ",[44,868,869],{},"amount × 1000"," millisatoshis when the invoice specifies an amount. For ",[44,872,184],{},", the client MUST resolve LNURL-pay and validate the returned invoice. A Lightning address is a destination, not an amount-bound invoice.",[15,875,876],{},"A newer payment request does not automatically invalidate every earlier request. Clients SHOULD detect multiple valid requests for one order and require confirmation when their amount or destination differs.",[10,878,880],{"id":879},"payment-receipt","Payment receipt",[15,882,883,884,886],{},"A receipt is a kind ",[44,885,54],{}," rumor authored by the buyer and addressed to the merchant. It is a payment claim with evidence, not settlement by itself.",[267,888,394],{"id":889},"schema-1",[131,891,892,902],{},[134,893,894],{},[137,895,896,898,900],{},[140,897,403],{},[140,899,407],{"align":406},[140,901,145],{},[147,903,904,915,928,938,949,960],{},[137,905,906,910,912],{},[152,907,908],{},[44,909,15],{},[152,911,420],{"align":406},[152,913,914],{},"Merchant public key",[137,916,917,921,923],{},[152,918,919],{},[44,920,430],{},[152,922,420],{"align":406},[152,924,435,925],{},[44,926,927],{},"order-receipt",[137,929,930,934,936],{},[152,931,932],{},[44,933,458],{},[152,935,420],{"align":406},[152,937,463],{},[137,939,940,944,946],{},[152,941,942],{},[44,943,470],{},[152,945,420],{"align":406},[152,947,948],{},"Amount paid in integer satoshis",[137,950,951,955,957],{},[152,952,953],{},[44,954,482],{},[152,956,485],{"align":406},[152,958,959],{},"Payment proof",[137,961,962,966,968],{},[152,963,964],{},[44,965,260],{},[152,967,498],{"align":406},[152,969,512],{},[15,971,972],{},"Proof forms:",[72,974,976],{"className":74,"code":975,"language":76,"meta":77,"style":77},"[\"payment\", \"lightning\", \"\u003Cinvoice>\", \"\u003Cpreimage>\"]\n[\"payment\", \"bitcoin\", \"\u003Creceiving-address>\", \"\u003Ctransaction-id>\"]\n[\"payment\", \"ecash\", \"\u003Cmint-url>\", \"\u003Ctoken-or-proof>\"]\n[\"payment\", \"fiat\", \"\u003Cprovider-reference>\", \"\u003Cprovider-proof>\"]\n[\"payment\", \"\u003Cmedium>\", \"\u003Cmedium-reference>\", \"\u003Cproof>\"]\n",[44,977,978,1000,1022,1044,1067],{"__ignoreMap":77},[81,979,980,982,984,986,988,990,993,995,998],{"class":83,"line":84},[81,981,88],{"class":87},[81,983,527],{"class":91},[81,985,95],{"class":87},[81,987,532],{"class":91},[81,989,95],{"class":87},[81,991,992],{"class":91},"\"\u003Cinvoice>\"",[81,994,95],{"class":87},[81,996,997],{"class":91},"\"\u003Cpreimage>\"",[81,999,101],{"class":87},[81,1001,1002,1004,1006,1008,1010,1012,1015,1017,1020],{"class":83,"line":104},[81,1003,88],{"class":87},[81,1005,527],{"class":91},[81,1007,95],{"class":87},[81,1009,550],{"class":91},[81,1011,95],{"class":87},[81,1013,1014],{"class":91},"\"\u003Creceiving-address>\"",[81,1016,95],{"class":87},[81,1018,1019],{"class":91},"\"\u003Ctransaction-id>\"",[81,1021,101],{"class":87},[81,1023,1024,1026,1028,1030,1032,1034,1037,1039,1042],{"class":83,"line":118},[81,1025,88],{"class":87},[81,1027,527],{"class":91},[81,1029,95],{"class":87},[81,1031,113],{"class":91},[81,1033,95],{"class":87},[81,1035,1036],{"class":91},"\"\u003Cmint-url>\"",[81,1038,95],{"class":87},[81,1040,1041],{"class":91},"\"\u003Ctoken-or-proof>\"",[81,1043,101],{"class":87},[81,1045,1046,1048,1050,1052,1055,1057,1060,1062,1065],{"class":83,"line":577},[81,1047,88],{"class":87},[81,1049,527],{"class":91},[81,1051,95],{"class":87},[81,1053,1054],{"class":91},"\"fiat\"",[81,1056,95],{"class":87},[81,1058,1059],{"class":91},"\"\u003Cprovider-reference>\"",[81,1061,95],{"class":87},[81,1063,1064],{"class":91},"\"\u003Cprovider-proof>\"",[81,1066,101],{"class":87},[81,1068,1069,1071,1073,1075,1077,1079,1082,1084,1087],{"class":83,"line":652},[81,1070,88],{"class":87},[81,1072,527],{"class":91},[81,1074,95],{"class":87},[81,1076,586],{"class":91},[81,1078,95],{"class":87},[81,1080,1081],{"class":91},"\"\u003Cmedium-reference>\"",[81,1083,95],{"class":87},[81,1085,1086],{"class":91},"\"\u003Cproof>\"",[81,1088,101],{"class":87},[72,1090,1092],{"className":74,"code":1091,"language":76,"meta":77,"style":77},"{\n  \"id\": \"\u003Crumor-id>\",\n  \"pubkey\": \"\u003Cbuyer-pubkey>\",\n  \"created_at\": 1786953660,\n  \"kind\": 17,\n  \"tags\": [\n    [\"p\", \"\u003Cmerchant-pubkey>\"],\n    [\"subject\", \"order-receipt\"],\n    [\"order\", \"a47e7fbb3a8f4f98a31d88b3f7703567\"],\n    [\"amount\", \"21000\"],\n    [\"payment\", \"lightning\", \"lnbc210u1...\", \"\u003C32-byte-preimage-hex>\"]\n  ],\n  \"content\": \"Lightning payment completed.\"\n}\n",[44,1093,1094,1098,1108,1118,1129,1139,1145,1157,1170,1182,1194,1215,1219,1228],{"__ignoreMap":77},[81,1095,1096],{"class":83,"line":84},[81,1097,610],{"class":87},[81,1099,1100,1102,1104,1106],{"class":83,"line":104},[81,1101,616],{"class":615},[81,1103,619],{"class":87},[81,1105,622],{"class":91},[81,1107,625],{"class":87},[81,1109,1110,1112,1114,1116],{"class":83,"line":118},[81,1111,630],{"class":615},[81,1113,619],{"class":87},[81,1115,684],{"class":91},[81,1117,625],{"class":87},[81,1119,1120,1122,1124,1127],{"class":83,"line":577},[81,1121,642],{"class":615},[81,1123,619],{"class":87},[81,1125,1126],{"class":615},"1786953660",[81,1128,625],{"class":87},[81,1130,1131,1133,1135,1137],{"class":83,"line":652},[81,1132,655],{"class":615},[81,1134,619],{"class":87},[81,1136,54],{"class":615},[81,1138,625],{"class":87},[81,1140,1141,1143],{"class":83,"line":664},[81,1142,667],{"class":615},[81,1144,670],{"class":87},[81,1146,1147,1149,1151,1153,1155],{"class":83,"line":673},[81,1148,676],{"class":87},[81,1150,679],{"class":91},[81,1152,95],{"class":87},[81,1154,635],{"class":91},[81,1156,687],{"class":87},[81,1158,1159,1161,1163,1165,1168],{"class":83,"line":690},[81,1160,676],{"class":87},[81,1162,695],{"class":91},[81,1164,95],{"class":87},[81,1166,1167],{"class":91},"\"order-receipt\"",[81,1169,687],{"class":87},[81,1171,1172,1174,1176,1178,1180],{"class":83,"line":705},[81,1173,676],{"class":87},[81,1175,725],{"class":91},[81,1177,95],{"class":87},[81,1179,730],{"class":91},[81,1181,687],{"class":87},[81,1183,1184,1186,1188,1190,1192],{"class":83,"line":720},[81,1185,676],{"class":87},[81,1187,740],{"class":91},[81,1189,95],{"class":87},[81,1191,745],{"class":91},[81,1193,687],{"class":87},[81,1195,1196,1198,1200,1202,1204,1206,1208,1210,1213],{"class":83,"line":735},[81,1197,676],{"class":87},[81,1199,527],{"class":91},[81,1201,95],{"class":87},[81,1203,532],{"class":91},[81,1205,95],{"class":87},[81,1207,763],{"class":91},[81,1209,95],{"class":87},[81,1211,1212],{"class":91},"\"\u003C32-byte-preimage-hex>\"",[81,1214,101],{"class":87},[81,1216,1217],{"class":83,"line":750},[81,1218,804],{"class":87},[81,1220,1221,1223,1225],{"class":83,"line":768},[81,1222,810],{"class":615},[81,1224,619],{"class":87},[81,1226,1227],{"class":91},"\"Lightning payment completed.\"\n",[81,1229,1230],{"class":83,"line":786},[81,1231,821],{"class":87},[15,1233,1234],{},"Receiving a syntactically valid receipt MUST NOT automatically confirm the order. The merchant confirms only after independent verification.",[10,1236,1238],{"id":1237},"proof-verification","Proof verification",[267,1240,1241],{"id":211},"Lightning",[15,1243,1244,1245,1248],{},"The merchant MUST decode the invoice, verify its network and amount, calculate ",[44,1246,1247],{},"SHA256(preimage)",", and require it to equal the invoice payment hash. A preimage is stronger evidence than a screenshot or a receipt event alone.",[267,1250,1251],{"id":215},"Bitcoin",[15,1253,1254],{},"The merchant MUST verify the transaction on the intended network, destination output, amount, transaction status, and application-defined confirmation depth. A transaction ID without a matching output is insufficient.",[267,1256,1257],{"id":174},"Ecash",[15,1259,1260],{},"Cashu material is bearer value. The merchant MUST validate and redeem proofs with the intended mint and MUST prevent replay. Merely receiving an ecash string does not establish settlement.",[267,1262,1264],{"id":1263},"fiat","Fiat",[15,1266,1267],{},"Open Markets defines no universal fiat proof. The merchant MUST verify the provider reference with the provider or another trusted settlement source. Opaque text and screenshots are not machine-verifiable proof.",[10,1269,1271],{"id":1270},"nostr-wallet-connect","Nostr Wallet Connect",[15,1273,1274,1279],{},[38,1275,1278],{"href":1276,"rel":1277},"https:\u002F\u002Fgithub.com\u002Fnostr-protocol\u002Fnips\u002Fblob\u002Fmaster\u002F47.md",[203],"NIP-47"," controls the payer's wallet; it does not replace an Open Markets payment request or receipt.",[15,1281,1282],{},"For Lightning execution:",[19,1284,1285,1288,1299,1309],{},[22,1286,1287],{},"Obtain and validate a BOLT11 invoice from the request or LNURL callback.",[22,1289,1290,1291,1294,1295,1298],{},"Send NWC ",[44,1292,1293],{},"pay_invoice"," as kind ",[44,1296,1297],{},"23194"," using the dedicated connection key.",[22,1300,1301,1302,1305,1306,55],{},"Validate the kind ",[44,1303,1304],{},"23195"," response and require ",[44,1307,1308],{},"result_type=pay_invoice",[22,1310,1311,1312,349],{},"Use the returned preimage in the buyer's kind ",[44,1313,54],{},[15,1315,1316],{},"NWC uses millisatoshis while Open Markets uses satoshis:",[72,1318,1323],{"className":1319,"code":1321,"language":1322,"meta":77},[1320],"language-text","nwc_amount_msat == open_markets_amount_sat × 1000\n","text",[44,1324,1321],{"__ignoreMap":77},[15,1326,1327],{},"Clients MUST NOT publish or include the NWC URI, connection secret, wallet authorization, or encrypted NWC payload in an order rumor.",[10,1329,1331],{"id":1330},"lightning-zaps","Lightning zaps",[15,1333,1334,1339],{},[38,1335,1338],{"href":1336,"rel":1337},"https:\u002F\u002Fgithub.com\u002Fnostr-protocol\u002Fnips\u002Fblob\u002Fmaster\u002F57.md",[203],"NIP-57"," MAY provide an invoice and public zap receipt when a merchant's LNURL endpoint supports it. Clients MUST validate the zap receipt signer, embedded request, description hash, amount, recipient, and LNURL.",[15,1341,1342,1343,1346,1347,1349],{},"A kind ",[44,1344,1345],{},"9735"," zap receipt is supplemental evidence and does not replace kind ",[44,1348,54],{},". NIP-57 explicitly notes that a zap receipt is not cryptographic proof that a real invoice was paid. A verified preimage remains preferable.",[10,1351,1353],{"id":1352},"client-attribution","Client attribution",[15,1355,1356,1357,1359],{},"Payment requests and receipts MAY include the NIP-89 ",[44,1358,260],{}," tuple. Software SHOULD include it when attribution is enabled and MUST offer an opt-out. The tag helps debugging and deep-linking but MUST NOT be used as evidence of authorization, merchant recommendation, or payment validity.",[10,1361,1363],{"id":1362},"pr-2-compatibility-decisions","PR #2 compatibility decisions",[15,1365,1366],{},"Open Markets incorporates every compatible intent from Gamma PR #2 while preserving deployed semantics.",[131,1368,1369,1379],{},[134,1370,1371],{},[137,1372,1373,1376],{},[140,1374,1375],{},"PR #2 proposal",[140,1377,1378],{},"Open Markets decision",[147,1380,1381,1389,1405,1419,1434,1449,1457,1465],{},[137,1382,1383,1386],{},[152,1384,1385],{},"Direct, manual, and service flows",[152,1387,1388],{},"Adopted as behavioral profiles",[137,1390,1391,1399],{},[152,1392,1393,1394,1396,1397],{},"Replace ",[44,1395,164],{}," with ",[44,1398,208],{},[152,1400,1401,1402,1404],{},"Rejected; ",[44,1403,164],{}," and its default remain",[137,1406,1407,1416],{},[152,1408,1409,1410,1412,1413,1415],{},"Add ",[44,1411,211],{}," and ",[44,1414,215],{}," preferences",[152,1417,1418],{},"Not added to the current enum; methods remain payment options",[137,1420,1421,1428],{},[152,1422,1423,1424,47,1426],{},"Move receipts into kind ",[44,1425,46],{},[44,1427,50],{},[152,1429,1430,1431,1433],{},"Rejected; kind ",[44,1432,54],{}," remains independently filterable",[137,1435,1436,1446],{},[152,1437,1438,1439,1442,1443],{},"Rename ",[44,1440,1441],{},"shipping"," to ",[44,1444,1445],{},"shipping_option",[152,1447,1448],{},"Rejected for order-message compatibility",[137,1450,1451,1454],{},[152,1452,1453],{},"Make fixed subjects mandatory",[152,1455,1456],{},"Rewritten as recommended conventional subjects",[137,1458,1459,1462],{},[152,1460,1461],{},"Change ecash receipt tuple order",[152,1463,1464],{},"Rejected; mint URL remains before proof",[137,1466,1467,1470],{},[152,1468,1469],{},"Improve flow explanations",[152,1471,1472],{},"Adopted throughout this page",[15,1474,1475],{},"This is a deliberate reconciliation, not an accidental partial merge. It follows the later PR discussion favoring separate business messages and receipts for retrieval, accountability, and UX.",[10,1477,1479],{"id":1478},"security-requirements","Security requirements",[224,1481,1482,1485,1488,1491,1497,1500,1503],{},[22,1483,1484],{},"Payment material MUST stay inside encrypted rumors.",[22,1486,1487],{},"Clients MUST validate authorship, recipient role, order identity, amounts, and expiration before payment.",[22,1489,1490],{},"Receipts MUST be deduplicated by rumor ID and proof identity.",[22,1492,1493,1494,1496],{},"A receipt, ",[44,1495,260],{}," tag, NIP-89 recommendation, or zap receipt MUST NOT be treated as settlement authority.",[22,1498,1499],{},"Implementations MUST prevent eCash replay and protect bearer proofs at rest.",[22,1501,1502],{},"Wallet operations SHOULD use connection-specific keys and least-privilege budgets.",[22,1504,1505],{},"Users MUST see the amount, currency conversion, payment destination, and relevant expiry before approval.",[10,1507,1509],{"id":1508},"sources","Sources",[224,1511,1512,1519,1525,1531,1538,1544,1550],{},[22,1513,1514],{},[38,1515,1518],{"href":1516,"rel":1517},"https:\u002F\u002Fgithub.com\u002FGammaMarkets\u002Fmarket-spec\u002Fblob\u002F5dc79c5db0d41c0bea774debf445cce041192840\u002Fspec.md",[203],"Gamma Markets payment specification",[22,1520,1521],{},[38,1522,1524],{"href":201,"rel":1523},[203],"Gamma PR #2: Payment redesign proposal",[22,1526,1527],{},[38,1528,1530],{"href":830,"rel":1529},[203],"Gamma PR #4: Payment expiration",[22,1532,1533],{},[38,1534,1537],{"href":1535,"rel":1536},"https:\u002F\u002Fgithub.com\u002FGammaMarkets\u002Fmarket-spec\u002Fpull\u002F11",[203],"Gamma PR #11: Preference handling and attribution",[22,1539,1540],{},[38,1541,1543],{"href":1276,"rel":1542},[203],"NIP-47: Nostr Wallet Connect",[22,1545,1546],{},[38,1547,1549],{"href":1336,"rel":1548},[203],"NIP-57: Lightning Zaps",[22,1551,1552],{},[38,1553,1556],{"href":1554,"rel":1555},"https:\u002F\u002Fgithub.com\u002Fnostr-protocol\u002Fnips\u002Fblob\u002Fmaster\u002F89.md",[203],"NIP-89: Recommended Application Handlers",[1558,1559,1560],"style",{},"html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}",{"title":77,"searchDepth":104,"depth":104,"links":1562},[1563,1564,1565,1570,1575,1578,1584,1585,1586,1587,1588,1589],{"id":12,"depth":104,"text":13},{"id":58,"depth":104,"text":59},{"id":264,"depth":104,"text":265,"children":1566},[1567,1568,1569],{"id":164,"depth":118,"text":269},{"id":322,"depth":118,"text":323},{"id":365,"depth":118,"text":366},{"id":386,"depth":104,"text":387,"children":1571},[1572,1573,1574],{"id":393,"depth":118,"text":394},{"id":599,"depth":118,"text":600},{"id":836,"depth":118,"text":837},{"id":879,"depth":104,"text":880,"children":1576},[1577],{"id":889,"depth":118,"text":394},{"id":1237,"depth":104,"text":1238,"children":1579},[1580,1581,1582,1583],{"id":211,"depth":118,"text":1241},{"id":215,"depth":118,"text":1251},{"id":174,"depth":118,"text":1257},{"id":1263,"depth":118,"text":1264},{"id":1270,"depth":104,"text":1271},{"id":1330,"depth":104,"text":1331},{"id":1352,"depth":104,"text":1353},{"id":1362,"depth":104,"text":1363},{"id":1478,"depth":104,"text":1479},{"id":1508,"depth":104,"text":1509},"Merchant preferences, manual and direct flows, payment requests, receipts, wallet execution, and proof verification.","md",{},true,"\u002Fpayments",{"title":5,"description":1590},"payments","bPuHG3ACdedwQ98dxg9aSbg7FrCTroNIOEG-yavNBUA",1787278106358]