From e5f1b3f5db98f9fb7c561dd109fbfa3a574e4533 Mon Sep 17 00:00:00 2001 From: Acea Spades Date: Sat, 24 Aug 2024 23:54:28 -0700 Subject: [PATCH] Update 15.md --- 15.md | 47 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/15.md b/15.md index fc78df3..11a90f8 100644 --- a/15.md +++ b/15.md @@ -1,5 +1,5 @@ -NIP-15 ====== +NIP-15 Nostr Marketplace ----------------- @@ -36,14 +36,18 @@ A merchant can publish these events: | Kind | | Description | | --------- | ------------------ | --------------------------------------------------------------------------------------------------------------- | | `0` | `set_meta` | The merchant description (similar with any `nostr` public key). | +| `5` | `delete` | Delete a product or a stall. | +| `14` | `direct_message` | Communicate with the customer. The messages can be plain-text or JSON. | +| `1021` | `bid` | Customer places bid on auctioned product. | +| `1022` | `bid_success` | Merchant accepts customer's bid for auctioned product. | | `30017` | `set_stall` | Create or update a stall. | | `30018` | `set_product` | Create or update a product. | -| `30019` | `submit_order` | Customer submits order to merchant for product. | -| `30020` | `request_payment` | Merchant requests payment for order from customer. | -| `30021` | `confirm_payment` | Merchant confirms payment is received for order. | -| `30022` | `confirm_shipment` | Merchant confirms order has been shipped. | -| `14` | `direct_message` | Communicate with the customer. The messages can be plain-text or JSON. | -| `5` | `delete` | Delete a product or a stall. | +| `30018` | `customize_market` | Save customizations for marketplace experience. | +| `30020` | `set_auction` | Create or update a product sold as an auction | +| `30030` | `request_payment` | Merchant requests payment for order from customer. | +| `30031` | `submit_order` | Customer submits order to merchant for product. | +| `30032` | `confirm_payment` | Merchant confirms payment is received for order. | +| `30033` | `confirm_shipment` | Merchant confirms order has been shipped. | ### Event `30017`: Create or update a stall. @@ -153,8 +157,9 @@ The `merchant` and the `customer` can exchange JSON messages that represent diff | 1 | Merchant | Payment Request | | 2 | Merchant | Order Status Update | -### Step 1: `customer` order (event) -The below JSON goes in content of [NIP-17](17.md). +### Event `30030` - Step 1: `customer` order + +The below JSON goes in content of a kind: `30019` event. ```json { @@ -182,11 +187,11 @@ The below JSON goes in content of [NIP-17](17.md). _Open_: is `contact.nostr` required? -### Step 2: `merchant` request payment (event) +### Event `30031` - Step 2: `merchant` request payment Sent back from the merchant for payment. Any payment option is valid that the merchant can check. -The below JSON goes in `content` of [NIP-17](17.md). +The below JSON goes in `content` of a kind: `30020` event. `payment_options`/`type` include: @@ -217,11 +222,27 @@ The below JSON goes in `content` of [NIP-17](17.md). } ``` -### Step 3: `merchant` verify payment/shipped (event) +### Event `30032` - Step 3: `merchant` confirms payment is accepted Once payment has been received and processed. -The below JSON goes in `content` of [NIP-17](17.md). +The below JSON goes in `content` of a kind: `30021` event. + +```json +{ + "id": , + "type": 2, + "message": , + "paid": , + "shipped": , +} + +``` +### Event `30033` - Step 4: `merchant` confirms order has shipped + +Once order has been shipped. + +The below JSON goes in `content` of a kind: `30021` event. ```json {