Skip to content

Commit

Permalink
Fixes after review.
Browse files Browse the repository at this point in the history
  • Loading branch information
ndeet committed Apr 25, 2024
1 parent e5b6fab commit 35ed531
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions docs/Development/GreenFieldExample-NodeJS.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The following examples will show you how to create a basic eCommerce flow using

### Create an invoice

We create an invoice using the [create invoice endpoint](https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_CreateInvoice). This is a simple example but you can set a lot more data like order id,
We create an invoice using the [create invoice endpoint](https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_CreateInvoice). This is a simple example but you can set a lot more data like order id, buyer email or custom metadata. That said, don't store redundant data on the invoice to prevent data leaks in case of a hack. E.g. in most cases it makes no sense to store the customer address on your eCommerce system and also on the BTCPay invoice.

```JS
const btcpayServerUrl = 'https://mainnet.demo.btcpayserver.org'
Expand Down Expand Up @@ -196,7 +196,7 @@ fetch(btcpayServerUrl + apiEndpoint, {

Here we assume you are an ambassador and host BTCPay Server for your users. You manage your users on your own system and want to create a user and set email and password for their BTCPay Server login. Then using the same credentials to create a store and an API key on behalf of that user.

## Create a new user
### Create a new user

Creating a new user can be done by using [this endpoint](https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Users_CreateUser).

Expand Down Expand Up @@ -266,7 +266,7 @@ fetch(btcpayServerUrl + apiEndpoint, {
})
```

## Create a new store
### Create a new store

Now, we can use the api key to [create a new store](https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Stores_CreateStore).

Expand Down
2 changes: 1 addition & 1 deletion docs/Development/GreenFieldExample.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The following examples will show you how to create a basic eCommerce flow using

### Create an invoice

We create an invoice using the [create invoice endpoint](https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_CreateInvoice). This is a simple example but you can set a lot more data like order id,
We create an invoice using the [create invoice endpoint](https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_CreateInvoice). This is a simple example but you can set a lot more data like order id, buyer email or custom metadata. That said, don't store redundant data on the invoice to prevent data leaks in case of a hack. E.g. in most cases it makes no sense to store the customer address on your eCommerce system and also on the BTCPay invoice.

```bash
BTCPAY_INSTANCE="https://mainnet.demo.btcpayserver.org"
Expand Down
2 changes: 1 addition & 1 deletion docs/Development/GreenfieldExample-PHP.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The following examples will show you how to create a basic eCommerce flow using

### Create an invoice

We create an invoice using the [create invoice endpoint](https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_CreateInvoice). This is a simple example but you can set a lot more data like order id,
We create an invoice using the [create invoice endpoint](https://docs.btcpayserver.org/API/Greenfield/v1/#operation/Invoices_CreateInvoice). This is a simple example but you can set a lot more data like order id, buyer email or custom metadata. That said, don't store redundant data on the invoice to prevent data leaks in case of a hack. E.g. in most cases it makes no sense to store the customer address on your eCommerce system and also on the BTCPay invoice.

```PHP
require __DIR__ . './vendor/autoload.php';
Expand Down

0 comments on commit 35ed531

Please sign in to comment.