Skip to content

Commit

Permalink
Merge pull request #1024 from stripe-samples/fix/docs/534
Browse files Browse the repository at this point in the history
fix(docs): added a newline key to the example on README.md
  • Loading branch information
hideokamoto-stripe authored Feb 28, 2024
2 parents 7baa9ec + 07b93f7 commit c9c3781
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,19 @@ Take note of the id value for the products you just created as you will need thi

Create price for Basic product, substituting `ID_OF_BASIC_PRODUCT` with the appropriate product Id:
```sh
./stripe prices create
-d "product=ID_OF_BASIC_PRODUCT"
-d "unit_amount=1800"
-d "currency=usd"
./stripe prices create \
-d "product=ID_OF_BASIC_PRODUCT" \
-d "unit_amount=1800" \
-d "currency=usd" \
-d "recurring[interval]=month"
```

Create price for Premium product, substituting `ID_OF_BASIC_PRODUCT` with the appropriate product Id:
```sh
./stripe prices create
-d "product=ID_OF_PREMIUM_PRODUCT"
-d "unit_amount=1800"
-d "currency=usd"
./stripe prices create \
-d "product=ID_OF_PREMIUM_PRODUCT" \
-d "unit_amount=1800" \
-d "currency=usd" \
-d "recurring[interval]=month"
```

Expand All @@ -126,20 +126,20 @@ Create price for Premium product, substituting `ID_OF_BASIC_PRODUCT` with the ap
Stripe needs to know what kind of product you are selling to calculate the taxes. For this example we will submit a tax code describing what kind of product is used: `txcd_10000000` which is 'General - Electronically Supplied Services'. You can find a list of all tax codes here: [Available tax codes](https://stripe.com/docs/tax/tax-codes). If you leave the tax code empty, Stripe will use the default one from your [Tax settings](https://dashboard.stripe.com/test/settings/tax).

```sh
./stripe products create
-d "name=Premium"
-d "description=Premium plan"
./stripe products create \
-d "name=Premium" \
-d "description=Premium plan" \
-d "tax_code=txcd_10000000"
```

From the response, copy the `id` and create a price. The tax behavior can be either `inclusive` or `exclusive`. For our example, we are using `exclusive`.

```sh
./stripe prices create
-d "unit_amount=1800"
-d "currency=usd"
-d "tax_behavior=exclusive"
-d "recurring[interval]=month"
./stripe prices create \
-d "unit_amount=1800" \
-d "currency=usd" \
-d "tax_behavior=exclusive" \
-d "recurring[interval]=month" \
-d "product=<INSERT_ID, like prod_ABC123>"
```

Expand Down

0 comments on commit c9c3781

Please sign in to comment.