mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-23 08:55:52 -05:00
Update 15.md
This commit is contained in:
parent
8aa5f22d16
commit
e5f1b3f5db
47
15.md
47
15.md
|
@ -1,5 +1,5 @@
|
||||||
NIP-15
|
|
||||||
======
|
======
|
||||||
|
NIP-15
|
||||||
|
|
||||||
Nostr Marketplace
|
Nostr Marketplace
|
||||||
-----------------
|
-----------------
|
||||||
|
@ -36,14 +36,18 @@ A merchant can publish these events:
|
||||||
| Kind | | Description |
|
| Kind | | Description |
|
||||||
| --------- | ------------------ | --------------------------------------------------------------------------------------------------------------- |
|
| --------- | ------------------ | --------------------------------------------------------------------------------------------------------------- |
|
||||||
| `0` | `set_meta` | The merchant description (similar with any `nostr` public key). |
|
| `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. |
|
| `30017` | `set_stall` | Create or update a stall. |
|
||||||
| `30018` | `set_product` | Create or update a product. |
|
| `30018` | `set_product` | Create or update a product. |
|
||||||
| `30019` | `submit_order` | Customer submits order to merchant for product. |
|
| `30018` | `customize_market` | Save customizations for marketplace experience. |
|
||||||
| `30020` | `request_payment` | Merchant requests payment for order from customer. |
|
| `30020` | `set_auction` | Create or update a product sold as an auction |
|
||||||
| `30021` | `confirm_payment` | Merchant confirms payment is received for order. |
|
| `30030` | `request_payment` | Merchant requests payment for order from customer. |
|
||||||
| `30022` | `confirm_shipment` | Merchant confirms order has been shipped. |
|
| `30031` | `submit_order` | Customer submits order to merchant for product. |
|
||||||
| `14` | `direct_message` | Communicate with the customer. The messages can be plain-text or JSON. |
|
| `30032` | `confirm_payment` | Merchant confirms payment is received for order. |
|
||||||
| `5` | `delete` | Delete a product or a stall. |
|
| `30033` | `confirm_shipment` | Merchant confirms order has been shipped. |
|
||||||
|
|
||||||
### Event `30017`: Create or update a stall.
|
### 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 |
|
| 1 | Merchant | Payment Request |
|
||||||
| 2 | Merchant | Order Status Update |
|
| 2 | Merchant | Order Status Update |
|
||||||
|
|
||||||
### Step 1: `customer` order (event)
|
### Event `30030` - Step 1: `customer` order
|
||||||
The below JSON goes in content of [NIP-17](17.md).
|
|
||||||
|
The below JSON goes in content of a kind: `30019` event.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
@ -182,11 +187,11 @@ The below JSON goes in content of [NIP-17](17.md).
|
||||||
_Open_: is `contact.nostr` required?
|
_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.
|
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:
|
`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.
|
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": <string, id of the order>,
|
||||||
|
"type": 2,
|
||||||
|
"message": <string, message to customer>,
|
||||||
|
"paid": <bool: has received payment>,
|
||||||
|
"shipped": <bool: has been 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
|
```json
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user