Recipes¶
Complete integration guides for popular Python frameworks. Each recipe includes:
- Payment creation
- Webhook handler (v2.0 POST + v1.0 GET)
- Security best practices
Architecture¶
-
Persisting payments
The reference schema and state machine for storing payments: write-ahead inserts, idempotent webhooks, refund linkage, and the Pay By Link gotchas — PostgreSQL + DynamoDB.
Available frameworks¶
Which framework to choose?¶
| Criteria | FastAPI | Django | Flask |
|---|---|---|---|
| Native async | Yes | Partial (ASGI) | No (use gevent/etc.) |
| Batteries included | No | Yes (ORM, admin, auth) | No |
| Learning curve | Low | Medium | Low |
| Ideal for | APIs, microservices | Full-stack apps | Prototypes, simple APIs |
No framework?
The SDK works without any framework — you only need Python. The examples use frameworks only for the HTTP endpoint that receives webhooks.