Seller pays hold invoice
When the seller is the maker and the order was taken by a buyer, Mostro will send to the seller a message asking to pay the hold invoice, the rumor's content of the message will look like this:
{
"order": {
"version": 1,
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
"action": "pay-invoice",
"payload": {
"payment_request": [
{
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
"kind": "sell",
"status": "waiting-payment",
"amount": 7851,
"fiat_code": "VES",
"fiat_amount": 100,
"payment_method": "face to face",
"premium": 1,
"created_at": 1698937797
},
"lnbcrt78510n1pj59wmepp50677g8tffdqa2p8882y0x6newny5vtz0hjuyngdwv226nanv4uzsdqqcqzzsxqyz5vqsp5skn973360gp4yhlpmefwvul5hs58lkkl3u3ujvt57elmp4zugp4q9qyyssqw4nzlr72w28k4waycf27qvgzc9sp79sqlw83j56txltz4va44j7jda23ydcujj9y5k6k0rn5ms84w8wmcmcyk5g3mhpqepf7envhdccp72nz6e"
]
}
}
}
After the hold invoice is paid and the buyer already sent the invoice to receive the sats, Mostro will send a new message to seller with the following rumor's content:
{
"order": {
"version": 1,
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
"action": "buyer-took-order",
"payload": {
"order": {
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
"kind": "sell",
"status": "active",
"amount": 7851,
"fiat_code": "VES",
"fiat_amount": 100,
"payment_method": "face to face",
"premium": 1,
"master_buyer_pubkey": "<Buyer's trade pubkey>",
"master_seller_pubkey": "<Seller's trade pubkey>",
"buyer_invoice": null,
"created_at": 1698937797
}
}
}
}
Mostro also send a message to the buyer, this way they can both write to each other in private, this message would look like this:
{
"order": {
"version": 1,
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
"action": "hold-invoice-payment-accepted",
"payload": {
"order": {
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
"kind": "sell",
"status": "active",
"amount": 7851,
"fiat_code": "VES",
"fiat_amount": 100,
"payment_method": "face to face",
"premium": 1,
"master_buyer_pubkey": "<Buyer's trade pubkey>",
"master_seller_pubkey": "<Seller's trade pubkey>",
"buyer_invoice": null,
"created_at": 1698937797
}
}
}
}
Mostro updates the addressable event with d
tag ede61c96-4c13-4519-bf3a-dcf7f1e9d842
to change the status to active
:
[
"EVENT",
"RAND",
{
"id": "<Event id>",
"pubkey": "<Mostro's pubkey>",
"created_at": 1702549437,
"kind": 38383,
"tags": [
["d", "ede61c96-4c13-4519-bf3a-dcf7f1e9d842"],
["k", "sell"],
["f", "VES"],
["s", "active"],
["amt", "7851"],
["fa", "100"],
["pm", "face to face"],
["premium", "1"],
["y", "mostrop2p"],
["z", "order"]
],
"content": "",
"sig": "<Mostro's signature>"
}
]
If the buyer didn't sent the invoice yet
Mostro send this message to the seller:
{
"order": {
"version": 1,
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
"action": "waiting-buyer-invoice",
"payload": null
}
}
And this message to the buyer:
{
"order": {
"version": 1,
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
"action": "add-invoice",
"payload": {
"order": {
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
"kind": "sell",
"status": "waiting-buyer-invoice",
"amount": 7851,
"fiat_code": "VES",
"fiat_amount": 100,
"payment_method": "face to face",
"premium": 1,
"created_at": 1698937797
}
}
}
}
And updates the addressable event with d
tag ede61c96-4c13-4519-bf3a-dcf7f1e9d842
to change the status to waiting-buyer-invoice
:
[
"EVENT",
"RAND",
{
"id": "<Event id>",
"pubkey": "<Mostro's pubkey>",
"created_at": 1702549437,
"kind": 38383,
"tags": [
["d", "ede61c96-4c13-4519-bf3a-dcf7f1e9d842"],
["k", "sell"],
["f", "VES"],
["s", "waiting-buyer-invoice"],
["amt", "7851"],
["fa", "100"],
["pm", "face to face"],
["premium", "1"],
["network", "mainnet"],
["layer", "lightning"],
["expiration", "1719391096"],
["y", "mostrop2p"],
["z", "order"]
],
"content": "",
"sig": "<Mostro's signature>"
}
]
Now buyer sends the invoice to Mostro:
{
"order": {
"version": 1,
"id": "ede61c96-4c13-4519-bf3a-dcf7f1e9d842",
"action": "add-invoice",
"payload": {
"payment_request": [
null,
"lnbcrt78510n1pj59wmepp50677g8tffdqa2p8882y0x6newny5vtz0hjuyngdwv226nanv4uzsdqqcqzzsxqyz5vqsp5skn973360gp4yhlpmefwvul5hs58lkkl3u3ujvt57elmp4zugp4q9qyyssqw4nzlr72w28k4waycf27qvgzc9sp79sqlw83j56txltz4va44j7jda23ydcujj9y5k6k0rn5ms84w8wmcmcyk5g3mhpqepf7envhdccp72nz6e"
]
}
}
}
And both parties receives each other pubkeys to start a direct conversation