Skip to content

Commit d8df82d

Browse files
committed
docs: improve accepting payments section
1 parent 018f9a1 commit d8df82d

File tree

1 file changed

+53
-15
lines changed

1 file changed

+53
-15
lines changed

README.md

Lines changed: 53 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -88,21 +88,59 @@ Install Docker from their [official guide](https://docs.docker.com/engine/instal
8888

8989
### Accepting Payments
9090

91-
1. [ZEBEDEE](https://zebedee.io)
92-
- [Sign up for a ZEBEDEE Developer Dashboard account](https://dashboard.zebedee.io/signup), create a new LIVE Project, and get that Project's API Key
93-
- Set `ZEBEDEE_API_KEY` environment variable with the API Key above
94-
- On `.nostr/settings.yaml` file make the following changes:
95-
- `payments.enabled` to `true`
96-
- `payments.processor` to `zebedee`
97-
- `paymentsProcessors.zebedee.callbackBaseURL` to match your Nostream URL (e.g. `https://{YOUR_DOMAIN_HERE}/callbacks/zebedee`)
98-
- Read the in-depth guide for more information: [Set Up a Paid Nostr Relay with ZEBEDEE API](https://docs.zebedee.io/docs/guides/nostr-relay)
99-
100-
2. Nodeless.io
101-
- Sign up for a new account at https://nodeless.io and create a new store. Take note of the store ID.
102-
- Create a store webhook and make sure to check all of the events. Grab the store webhook secret.
103-
- Go to Profile > API Tokens and generate a new key and keep note of it.
104-
- Set NODELESS_API_KEY and NODELESS_WEBHOOK_SECRET environment variables with generated key and webhook secret, respectively.
105-
- On your .nostr/settings.yaml file, update the field `paymentsProcessors.nodeless.storeId1 with your store ID.
91+
1. Before you begin
92+
- Complete one of the Quick Start guides in this document
93+
- Create a `.env` file
94+
- On `.nostr/settings.yaml` file make the following changes:
95+
- Set `payments.enabled` to `true`
96+
- Set `payments.feeSchedules.admission.enabled` to `true`
97+
- Set `limits.event.pubkey.minBalance` to the minimum balance in msats required to accept events (i.e. `1000000` to require a balance of `1000` sats)
98+
- Choose one of the following payment processors: `zebedee`, `nodeless`, `lnbits`, `lnurl`
99+
100+
2. [ZEBEDEE](https://zebedee.io)
101+
- Complete the step "Before you begin"
102+
- [Sign up for a ZEBEDEE Developer Dashboard account](https://dashboard.zebedee.io/signup), create a new LIVE Project, and get that Project's API Key
103+
- Set `ZEBEDEE_API_KEY` environment variable with the API Key above on your `.env` file
104+
105+
```
106+
ZEBEDEE_API_KEY={YOUR_ZEBEDEE_API_KEY_HERE}
107+
```
108+
109+
- Follow the required steps for all payments processors
110+
- On `.nostr/settings.yaml` file make the following changes:
111+
- `payments.processor` to `zebedee`
112+
- `paymentsProcessors.zebedee.callbackBaseURL` to match your Nostream URL (e.g. `https://{YOUR_DOMAIN_HERE}/callbacks/zebedee`)
113+
- Restart Nostream (`./scripts/stop` followed by `./scripts/start`)
114+
- Read the in-depth guide for more information: [Set Up a Paid Nostr Relay with ZEBEDEE API](https://docs.zebedee.io/docs/guides/nostr-relay)
115+
116+
3. [Nodeless.io](https://nodeless.io)
117+
- Complete the step "Before you begin"
118+
- Sign up for a new account at https://nodeless.io, create a new store and take note of the store ID
119+
- Go to Profile > API Tokens and generate a new key and take note of it
120+
- Create a store webhook with your Nodeless callback URL (e.g. `https://{YOUR_DOMAIN_HERE}/callbacks/nodeless`) and make sure to enable all of the events. Grab the generated store webhook secret
121+
- Set `NODELESS_API_KEY` and `NODELESS_WEBHOOK_SECRET` environment variables with generated API key and webhook secret, respectively
122+
123+
```
124+
NODELESS_API_KEY={YOUR_NODELESS_API_KEY}
125+
NODELESS_WEBHOOK_SECRET={YOUR_NODELESS_WEBHOOK_SECRET}
126+
```
127+
128+
- On your `.nostr/settings.yaml` file make the following changes:
129+
- Set `payments.processor` to `nodeless`
130+
- Set `paymentsProcessors.nodeless.storeId` to your store ID
131+
- Restart Nostream (`./scripts/stop` followed by `./scripts/start`)
132+
133+
4. Ensure payments are required for your public key
134+
- Visit https://{YOUR-DOMAIN}/
135+
- You should be presented with a form requesting an admission fee to be paid
136+
- Fill out the form and take the necessary steps to pay the invoice
137+
- Wait until the screen indicates that payment was received
138+
- Add your relay URL to your favorite Nostr client (wss://{YOUR-DOMAIN}) and wait for it to connect
139+
- Send a couple notes to test
140+
- Go to https://websocketking.com/ and connect to your relay (wss://{YOUR_DOMAIN})
141+
- Convert your npub to hexadecimal using a [Key Converter](https://damus.io/key/)
142+
- Send the following JSON message: `["REQ", "payment-test", {"authors":["your-pubkey-in-hexadecimal"]}]`
143+
- You should get back the few notes you sent earlier
106144
107145
## Quick Start (Docker Compose)
108146

0 commit comments

Comments
 (0)