A production-style Python service that listens for e-commerce order webhooks (Stripe/Shopify-style) and automatically syncs each new order to a project board (Trello-style), so a business owner sees new orders appear as cards in real time — no manual copy-paste between tools.
Businesses running on multiple SaaS tools (payments, CRM, project boards) constantly need "glue code" to keep them in sync. This project demonstrates that integration pattern end-to-end: webhook ingestion, validation, transformation, and a rate-limited, retry-safe push to a downstream API.
- Webhook security — HMAC signature verification on incoming payloads
- Data validation & normalization — turning a messy provider-specific payload into a clean internal schema, with explicit error handling for malformed data
- Resilient outbound API calls — automatic retries with exponential
backoff, and graceful handling of
429 Too Many Requests - Rate limiting — a custom async token-bucket limiter so bursts of incoming orders never exceed the target API's rate limit
- Secure config — API keys and secrets loaded from environment
variables via
python-dotenv, never hardcoded - Dry-run mode — the whole pipeline runs and is fully testable with zero live credentials, logging exactly what it would do
FastAPI · aiohttp · python-dotenv · pytest
api-orchestrator/
├── app.py # FastAPI app + webhook endpoint
├── services/
│ ├── source_orders.py # Validates & normalizes incoming order payloads
│ └── target_board.py # Pushes normalized orders to the board API
├── utils/
│ ├── rate_limiter.py # Async token-bucket rate limiter
│ └── logger.py # Structured logging
├── tests/
│ ├── test_pipeline.py # Automated unit tests
│ └── send_test_webhook.py # Manual demo script
├── .env.example
└── requirements.txt
git clone https://github.com/<your-username>/multi-platform-api-sync.git
cd multi-platform-api-sync
pip install -r requirements.txt
cp .env.example .env # fill in real credentials, or leave blank for dry-run modeuvicorn app:app --reload --port 8000In another terminal, fire a sample webhook at it:
python tests/send_test_webhook.pyYou'll see the pipeline receive, validate, and sync the order — logged to the console in real time.
pytest -v- Swap
services/source_orders.pyfor the real Stripe/Shopify webhook payload shape (their SDKs provide signature verification helpers too). - Swap
services/target_board.py'sbase_urland payload format for Trello, Asana, HubSpot, or any REST API — the retry/rate-limit/dry-run scaffolding stays the same.
MIT — free to use as a starting point for your own integration projects.