-
-
Notifications
You must be signed in to change notification settings - Fork 68
feat: added checkout session #172
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?
Conversation
We also need this feature, can someone watch this PR? |
This feature is something we urgently need on our side as well. |
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.
Thanks for the contribution!
Can you please
- Add the webhooks to the README as supported
- Clarify whether line items are present in webhooks
- Add an appropriate webhook test
) | ||
|
||
// Upsert line items into separate table | ||
const lineItemsPromises = checkoutSessions |
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.
This should be a single upsert and not one upsert per line item ideally
Are line items sent via the webhook by default? Otherwise the checkout session line items would never be there for a regular webhook
Thank you for the Review. I inspected a checkout session event and indeed there are no line items, so either I would've to fetch them via the api or ignore them and only sync checkout sessions. What do you think? For my use-case it would be really nice to have the line items directly when syncing |
@Niki2k1 yeah makes sense, i think a check session without persisting the line items themselves would not add too much value. I think it would be best to call So
|
What kind of change does this PR introduce?
This PR adds sync for the checkout sessions (and line items)
Additional context
I created two new migrations (one for the checkout sessions and one for the line items.
I am not yet using this in production, so I am a little bit cautious. My tests worked fine though.