From 77a8649f21c96965456c020c94b15faa51474c6a Mon Sep 17 00:00:00 2001 From: Romain Lenzotti Date: Wed, 30 Aug 2023 08:48:01 +0200 Subject: [PATCH] docs: update stripe documentation --- docs/tutorials/stripe.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/docs/tutorials/stripe.md b/docs/tutorials/stripe.md index 1912c457463..4ca054eef4b 100644 --- a/docs/tutorials/stripe.md +++ b/docs/tutorials/stripe.md @@ -4,6 +4,10 @@ meta: content: Use Stripe with Express, TypeScript and Ts.ED. The Stripe Node library provides convenient access to the Stripe API from applications written in server-side JavaScript. - name: keywords content: ts.ed express typescript stripe node.js javascript decorators +projects: + - title: Kit Stripe + href: https://github.com/tsedio/tsed-stripe-example + src: /stripe.svg --- # Stripe @@ -16,6 +20,8 @@ The Stripe Node library provides convenient access to the Stripe API from applic For collecting customer and payment information in the browser, use [Stripe.js](https://stripe.com/docs/stripe.js). + + ## Features Currently, [`@tsed/stripe`](https://www.npmjs.com/package/@tsed/stripe) allows you to: @@ -66,6 +72,20 @@ export class Server { See Stripe options for more details: https://www.npmjs.com/package/stripe ::: +`STRIPE_SECRET_KEY` can be retrieved on the Stripe Dashboard here: https://dashboard.stripe.com/test/apikeys + +And the `STRIPE_WEBHOOK_SECRET` can be retrieved by using the `stripe listen` or `stripe forward`: + +```sh +stripe listen + +> Ready! You are using Stripe API Version [2020-08-27]. Your webhook signing secret is whsec_***************************** +``` + +::: note +You have to install the `stripe-cli` to run `stripe listen`. See https://stripe.com/docs/stripe-cli. +::: + ## Inject Stripe ```typescript @@ -224,6 +244,16 @@ describe("Stripe", () => { }); ``` +### Known issue + +If you have the followings message, it means you have an issue with your STRIPE_WEBHOOK_SECRET. + +```sh +Error message: No signatures found matching the expected signature for payload. Are you passing the raw request body you received from Stripe? +``` + +Please double-check your configuration! + ## Author