-
Notifications
You must be signed in to change notification settings - Fork 73
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
feat: support stripe webhooks for payment statuses #2171
Conversation
40afb42
to
4157137
Compare
c9ab650
to
2957794
Compare
a154459
to
b5dbad3
Compare
2957794
to
1301954
Compare
b5dbad3
to
12d8d32
Compare
1301954
to
b382132
Compare
0c53713
to
b177ffc
Compare
e485095
to
124e212
Compare
9d17712
to
220337d
Compare
This patch adds support for receiving payment status updates from stripe including the void state. The docs folder contains more details on validating and setup.
220337d
to
667b205
Compare
return nil, err | ||
} | ||
|
||
if len(invoices.Items) == 0 { |
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.
shouldn't we return NotFound and handle it upstream? Like we do with DB
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.
I want to ignore any invoices that we don't know of. E.g. if there are invoices generated on the stripe side, let's ignore them for now.
query = query.Where(billinginvoice.PaymentAppExternalIDIn(input.ExternalIDs.IDs...)) | ||
case billing.TaxExternalIDType: | ||
query = query.Where(billinginvoice.TaxAppExternalIDIn(input.ExternalIDs.IDs...)) | ||
} |
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.
error if unknown type?
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.
It's not needed as it's part of the validation:
openmeter/openmeter/billing/invoice.go
Line 641 in 667b205
if err := f.Type.Validate(); err != nil { |
@@ -0,0 +1,81 @@ | |||
# Developing against a stripe test account |
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.
Awesome docs!
Overview
This patch adds support for receiving payment status updates from stripe including the void state.
The docs folder contains more details on validating and local setup.