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 Key
on Stripe onhttps://dashboard.stripe.com/test/apikeys
, this variable is used onopt:stripe_key
(stripe_key
) -
On Stripe dashboard add a new
Product
onBilling
https://dashboard.stripe.com/test/subscriptions/products
. Then add a newMetadata
for the related plan on thenCent
platform using the variablePLAN_UUID
and theuuid
for the related plan. (default_plan
) -
After deploy the using
serverless
command go to Stripe onhttps://dashboard.stripe.com/test/webhooks
and add thewebhook
using the/webhook
URL created onAPI Gateway
, the event type should becustomer.updated
-
After create the
webhook
reveal and copy theSigning Secret
on the same page and paste on thestripe-integration
functionAWS
as 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