feat: Add more metadata to Stripe transaction#11221
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
@kcrimi is attempting to deploy a commit to the cal Team on Vercel. A member of the Team first needs to authorize it. |
|
Thank you for following the naming conventions! 🙏 |
📦 Next.js Bundle Analysis for @calcom/webThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
033dd44 to
5c944d1
Compare
kcrimi
left a comment
There was a problem hiding this comment.
@shirazdole @alannnc this builds upon #10678 to get all the information I'd need.
Happy to add/change anything if needed
| name: true, | ||
| email: true, | ||
| timeZone: true, | ||
| username: true, |
There was a problem hiding this comment.
Had to add the username to the query since it was previously only getting name, email, and timezone for the organizer
| const handlePayment = async ( | ||
| evt: CalendarEvent, | ||
| selectedEventType: Pick<Zod.infer<typeof EventTypeModel>, "metadata">, | ||
| selectedEventType: Pick<Zod.infer<typeof EventTypeModel>, "metadata" | "title">, |
There was a problem hiding this comment.
Getting the title in addition to the metadata for the event type now
| bookerEmail, | ||
| paymentOption, | ||
| evt.title | ||
| selectedEventType.title |
There was a problem hiding this comment.
Previous PR added the event title (eg "30 minute meeting with Roald Dahl") instead of the event type title (eg "30 minute meeting").
Because I'm looking to use multiple accounts on the same Stripe account, it would be more useful to be able to aggregate on the event type title to show earninings per event type.
If it's also useful to have the calendar event title, I can add it back in addition.
There was a problem hiding this comment.
Yeah, let's keep both. BookingTitle and eventTitle. What you think?
.tool-versions
Outdated
| @@ -0,0 +1 @@ | |||
| nodejs 20.3.1 | |||
There was a problem hiding this comment.
Uncheck this file from the PR.
alannnc
left a comment
There was a problem hiding this comment.
Left some comments. Will leave with request changes for a moment, if I find time I will address the issues.
|
🙏 Thanks @alannnc, pushed some changes |
* Add booker info, event type title, and organizer info into Stripe metadata * Add back bookingTitle in addition to eventTitle * Remove .tool-versions * Fix typo --------- Co-authored-by: alannnc <alannnc@gmail.com>
What does this PR do?
This PR adds additional information to Stripe metadata and tweaks data added in a previous PR for better usability:
Fixes #10668, #10678, #8205
Requirement/Documentation
Type of change
How should this be tested?
Mandatory Tasks
Checklist