The Stripe integration is a bridge for the nCent core services.
GO
Node
npm
Serverless Framework
ginkgo
Install Serverless Framework
npm install -g serverless
Install node dependencies
npm install
make build
go test ./...
or
ginkgo ./...
-
Create a new
API Keyon Stripe onhttps://dashboard.stripe.com/test/apikeys, this variable is used onopt:stripe_key(stripe_key) -
On Stripe dashboard add a new
ProductonBillinghttps://dashboard.stripe.com/test/subscriptions/products. Then add a newMetadatafor the related plan on thenCentplatform using the variablePLAN_UUIDand theuuidfor the related plan. (default_plan) -
After deploy the using
serverlesscommand go to Stripe onhttps://dashboard.stripe.com/test/webhooksand add thewebhookusing the/webhookURL created onAPI Gateway, the event type should becustomer.updated -
After create the
webhookreveal and copy theSigning Secreton the same page and paste on thestripe-integrationfunctionAWSas theWEBHOOK_SECRET. The idea to make sure that all post really comes from Stripe (webhook_secret)
Example of deploying here we should inform the default_plan, stripe_key and the webhook_secret
# Example of deploy on production
serverless deploy --stage production --verbose --stripe_key "" --default_plan "" --webhook_secret ""- GO - The Language
- Serverless Framework - Deployment Framework
- Eduardo Nunes Peireira - Initial work - eduardonunesp