Skip to content

tsedio/tsed-stripe-example

Repository files navigation

Ts.ED logo

Ts.ED - cli-test


Website   •   Getting started   •   Slack   •   Twitter

An awesome project based on Ts.ED framework

Installation

Install the stripe CLI: https://stripe.com/docs/stripe-cli

Then:

yarn install

Start

Add .env.local file with the followings lines:

STRIPE_SECRET_KEY=sk_test_5***
STRIPE_WEBHOOK_SECRET=whsec_***

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 forward (in our example run stripe:forward) command:

yarn stripe:forward

> Ready! You are using Stripe API Version [2020-08-27]. Your webhook signing secret is whsec_***************************** 

Copy the whsec_***************************** in the .env.local on STRIPE_WEBHOOK_SECRET.

Then:

yarn start

Finally, you can trigger an event by running this command:

yarn stripe:trigger

Issue

If you have the followings message, it means you have an issue with your STRIPE_WEBHOOK_SECRET.

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!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published