https://github.com/ifttt/stripe-chartmogul-sync
Serverless CDK-based pipeline for syncing between Stripe and ChartMogul
https://github.com/ifttt/stripe-chartmogul-sync
Last synced: about 2 months ago
JSON representation
Serverless CDK-based pipeline for syncing between Stripe and ChartMogul
- Host: GitHub
- URL: https://github.com/ifttt/stripe-chartmogul-sync
- Owner: IFTTT
- License: mit
- Created: 2021-08-12T18:18:56.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-08-26T14:20:18.000Z (almost 5 years ago)
- Last Synced: 2025-12-26T11:18:41.798Z (7 months ago)
- Language: Python
- Size: 43 KB
- Stars: 0
- Watchers: 12
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Stripe ChartMogul Sync

A serverless CDK-based pipeline for syncing Stripe data with ChartMogul
This CDK registers a Lambda Function with EventBridge that processes Stripe events. The Lambda Function performs a one-way sync of the customer and related invoices from Stripe to ChartMogul.

## Setup
- Create the virtual environment: `python3 -m venv .venv`
- Enable the virtual environment: `source .venv/bin/activate`
- Install dependencies: `pip install -r requirements.txt`
- Deploy the stack: `cdk deploy`
## Events
- This pipeline listens for Stripe events on the `$default` Event Bus with the following rule:
- `source == stripe`
## Design Notes
- Events can arrive from Stripe [out of order](https://stripe.com/docs/webhooks/best-practices#event-ordering), which is why this process has a brute force design that ignores the event payload. Instead, the Lambda Function is simply triggered when a customer has changed in some way.
- Events can flow into this pipeline from anywhere. Typically the two sources are Stripe webhook events or a reconsiliation process that might be run to update customer records that might be out of sync.
## Testing Locally
[https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-cdk-getting-started.html](Install) the preview version of the SAM CLI.
```
$ sam-beta-cdk --version
SAM CLI, version 1.22.0.dev202107140310
```