{"id":21575514,"url":"https://github.com/rangle/stripe-eventbridge","last_synced_at":"2025-04-10T16:32:12.783Z","repository":{"id":44758893,"uuid":"215623542","full_name":"rangle/stripe-eventbridge","owner":"rangle","description":"Connect Stripe events to AWS EventBridge","archived":false,"fork":false,"pushed_at":"2022-12-06T14:48:06.000Z","size":205,"stargazers_count":73,"open_issues_count":8,"forks_count":8,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-24T14:13:04.130Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rangle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-16T19:03:13.000Z","updated_at":"2024-09-08T11:42:00.000Z","dependencies_parsed_at":"2023-01-24T02:01:33.934Z","dependency_job_id":null,"html_url":"https://github.com/rangle/stripe-eventbridge","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rangle%2Fstripe-eventbridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rangle%2Fstripe-eventbridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rangle%2Fstripe-eventbridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rangle%2Fstripe-eventbridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rangle","download_url":"https://codeload.github.com/rangle/stripe-eventbridge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248252691,"owners_count":21072699,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-24T12:13:29.903Z","updated_at":"2025-04-10T16:32:12.751Z","avatar_url":"https://github.com/rangle.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stripe-eventbridge\n\n##  Intro\n\n_A serverless Stripe to Eventbridge pipe for webhook events_\n\nDeploys a Lambda webhook endpoint that simply validates that the incoming webhook event is from Stripe,\nand if so, then the event is pushed onto AWS EventBridge for downstream applications to consume.\n\n## What gets deployed\n\n![Architecture overview](https://raw.githubusercontent.com/rangle/stripe-eventbridge/master/img/stripe-eventbridge.png)\n\n## Setup\n\n1) Install the serverless framework: `npm i -g serverless`\n2) Deploy the stack containing the dependencies: `cd stacks \u0026\u0026 sls deploy \u0026\u0026 cd ..`.  \n3) This creates a Secret slot and an SNS queue for notifications about failed validations.\n4) Deploy the function: `sls deploy`\n5) Once deployed, note the URL of the deployed function in the output.\n6) Login to the [https://dashboard.stripe.com/](Stripe Dashboard) and go to `Developers \u003e Webhooks` and create a new endpoint.\n7) Paste in the URL of the deployed function and choose which events you want to send to it.  \n8) Save it, then reopen it and `Click to reveal` the signing secret.\n9) Copy the value of the signing secret then open the AWS Secrets Manager console.\n10) Look for the Secret named `dev/stripe/stripe-webhook-secret`, click on `Set Secret Value` and paste the signing secret in as plaintext.\n\nThe function you deployed will use this secret to validate the signature on any incoming events, to prove\nthat they were generated by Stripe, before accepting them onto the EventBridge.\n\nThat's it!\nTry sending a test webhook event from the Stripe Dashboard and it will be added to the AWS EventBridge.\n\n\n# EventBridge configuration\n\nNow, if you create rules in CloudWatch Events that match the pattern below, you can now route these events based on the event type to endpoints of your choice (such as Lambdas) while being assured that the events have already had their signatures checked.\n\nFor example, to select all of the payment_intent.succeeded events, you would use this pattern:\n```\n{\n  \"detail-type\": [\n    \"payment_intent.succeeded\"\n  ],\n  \"source\": [\n    \"Stripe\"\n  ]\n}\n```\n\nNote: If you're using the Serverless Framework to create Lambdas to handle the above events, then the YAML syntax to\nhave EventBridge trigger on the above would be:\n\n```\nfunctions:\n  myLambdaFunction:\n    handler: handler.myLambdaFunction\n    events:\n      - eventBridge:\n          pattern:\n            source:\n              - Stripe\n            detail-type:\n              - payment_intent.succeeded\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frangle%2Fstripe-eventbridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frangle%2Fstripe-eventbridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frangle%2Fstripe-eventbridge/lists"}