Skip to content

Commit

Permalink
docs(*): fix numbering in POSTINSTALL (#591)
Browse files Browse the repository at this point in the history
  • Loading branch information
pr-Mais authored Dec 21, 2023
1 parent b42931b commit 08431c1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions firestore-stripe-invoices/POSTINSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ To test out the extension:

1. Go to your [Cloud Firestore dashboard](https://console.firebase.google.com/project/${param:PROJECT_ID}/firestore/data) in the Firebase console.

1. If it doesn't already exist, create the collection you specified during installation: `${param:INVOICES_COLLECTION}`
2. If it doesn't already exist, create the collection you specified during installation: `${param:INVOICES_COLLECTION}`

1. Test the invoicing functionality by adding a document to your collection, for example:
3. Test the invoicing functionality by adding a document to your collection, for example:

```js
{
Expand All @@ -32,7 +32,7 @@ To test out the extension:
}
```

1. Look in your [Stripe dashboard](https://dashboard.stripe.com/test/invoices) for a record of the test invoice.
4. Look in your [Stripe dashboard](https://dashboard.stripe.com/test/invoices) for a record of the test invoice.

**Note:** Stripe only sends an email to your customer when the extension is using Stripe's live mode but not when using test mode. If you configured your extension with a test mode API key, you'll need to [reconfigure](https://console.firebase.google.com/project/${param:PROJECT_ID}/extensions/instances/${param:EXT_INSTANCE_ID}?tab=config) your installed extension with your [live mode key](https://dashboard.stripe.com/apikeys) before actually using the extension for customer invoicing.

Expand Down Expand Up @@ -204,11 +204,11 @@ Here's how to set up the webhook and configure your extension to use it:
1. Go to the [Stripe dashboard.](https://dashboard.stripe.com/webhooks)
1. Use the URL of your extension's function as the endpoint URL. Here's your function's URL: `${function:updateInvoice.url}`
2. Use the URL of your extension's function as the endpoint URL. Here's your function's URL: `${function:updateInvoice.url}`

1. Select all the invoice events.
3. Select all the invoice events.

1. Using the Firebase console or Firebase CLI, [reconfigure](https://console.firebase.google.com/project/${param:PROJECT_ID}/extensions/instances/${param:EXT_INSTANCE_ID}?tab=config) your extension with your webhook’s signing secret (such as, `whsec_12345678`). Enter the value in the parameter called `Stripe webhook secret`.
2. Using the Firebase console or Firebase CLI, [reconfigure](https://console.firebase.google.com/project/${param:PROJECT_ID}/extensions/instances/${param:EXT_INSTANCE_ID}?tab=config) your extension with your webhook’s signing secret (such as, `whsec_12345678`). Enter the value in the parameter called `Stripe webhook secret`.

The webhook fires whenever the invoice's status updates in the Stripe dashboard. The first time the webhook fires, it finds the relevant document in Cloud Firestore, then creates two fields: `stripeInvoiceStatus` and `lastStripeEvent`. If the webhook fires subsequent times for the same invoice, it will update those same fields.
Expand Down
18 changes: 9 additions & 9 deletions firestore-stripe-payments/POSTINSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ Here's how to set up the webhook and configure your extension to use it:

1. Go to the [Stripe dashboard.](https://dashboard.stripe.com/webhooks)

1. Use the URL of your extension's function as the endpoint URL. Here's your function's URL: `${function:handleWebhookEvents.url}`
2. Use the URL of your extension's function as the endpoint URL. Here's your function's URL: `${function:handleWebhookEvents.url}`

1. Select the following events:
3. Select the following events:

- `product.created`
- `product.updated`
Expand All @@ -91,7 +91,7 @@ Here's how to set up the webhook and configure your extension to use it:
- `invoice.marked_uncollectible` (optional, will sync invoices to Cloud Firestore)
- `invoice.payment_action_required` (optional, will sync invoices to Cloud Firestore)

1. Using the Firebase console or Firebase CLI, [reconfigure](https://console.firebase.google.com/project/${param:PROJECT_ID}/extensions/instances/${param:EXT_INSTANCE_ID}?tab=config) your extension with your webhook’s signing secret (such as, `whsec_12345678`). Enter the value in the parameter called `Stripe webhook secret`. Make sure you scroll back to the top of the Extension configuration page and click 'Save' otherwise your Stripe webhook secret will not be saved.
2. Using the Firebase console or Firebase CLI, [reconfigure](https://console.firebase.google.com/project/${param:PROJECT_ID}/extensions/instances/${param:EXT_INSTANCE_ID}?tab=config) your extension with your webhook’s signing secret (such as, `whsec_12345678`). Enter the value in the parameter called `Stripe webhook secret`. Make sure you scroll back to the top of the Extension configuration page and click 'Save' otherwise your Stripe webhook secret will not be saved.

#### Create product and pricing information (only required when building on the web platform)

Expand Down Expand Up @@ -155,12 +155,12 @@ async function getCustomClaimRole() {
#### Configure the Stripe customer portal (only used for subscriptions)

1. Set your custom branding in the [settings](https://dashboard.stripe.com/settings/branding).
1. Configure the Customer Portal [settings](https://dashboard.stripe.com/test/settings/billing/portal).
1. Toggle on "Allow customers to update their payment methods".
1. Toggle on "Allow customers to update subscriptions".
1. Toggle on "Allow customers to cancel subscriptions".
1. Add the products and prices that you want to allow customer to switch between.
1. Set up the required business information and links.
2. Configure the Customer Portal [settings](https://dashboard.stripe.com/test/settings/billing/portal).
3. Toggle on "Allow customers to update their payment methods".
4. Toggle on "Allow customers to update subscriptions".
5. Toggle on "Allow customers to cancel subscriptions".
6. Add the products and prices that you want to allow customer to switch between.
7. Set up the required business information and links.

### Using the extension

Expand Down

0 comments on commit 08431c1

Please sign in to comment.