-
Notifications
You must be signed in to change notification settings - Fork 4
Implement stripe webhook #136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Implement stripe webhook #136
Conversation
| from api.interfaces.api_controllers.prices_endpoint import router as prices_router | ||
| from api.interfaces.api_controllers.billing_endpoint import router as billing_router | ||
| from api.interfaces.api_controllers.stripe_endpoint import router as stripe_router | ||
| from api.interfaces.api_controllers.webhook.stripe import router as stripe_webhook_router |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is already a stripe_endpoint.py please use that
/webhooks|
@shahzaib-ali-khan Can you please resolve the conflict? |
Done |
sajanv88
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tenant and scope check is missing.. and move the webhook inside stripe endpoint.
Implement Stripe webhook for
invoice.paidThe method stripe_webhook() is a generic one and can be used for other events as well. To support other events, separate methods should be created and hooked up in
SUPPORTED_EVENTS/webhooks/stripethat handlesinvoice.paidevents from Stripetenant_idis in themetadataof Invoice object then scope is Tenant otherwise HostBillingRecordobject in the databaseHow to test:
Other than webhook implmentation. This PR also add OS independence while creating temp files