#DOWNTOWN DUNKARONI
1 messages ยท Page 1 of 1 (latest)
Hey there
Hey Bismarck, just to catch you up, I'm trying to create an automatic email reply upon payment success
Gotcha
Still fairly new to all of this so bear with me please ๐
Oh you don't need to use Webhooks for that.
oh lol
You just flip the toggle in your Dashboard here: https://dashboard.stripe.com/settings/emails
For "Email customers about Successful payments"
that's all? no configuration in checkout_sessions?
I thought based on my last exchange that I had to somehow pass the email
Are you passing a Customer to your Checkout Session Creation?
Or setting customer_creation: always?
the screenshot is in my original thread, you can see what I pass in there
I don't think so though
this is what I'm passing
would adding that on say, line 46 suffice?
Ah actually I don't even think you need to do that for Checkout
Never mind, forgot we pre-fill the receipt_email automatically
So yeah, all you need to do is have that Dashboard setting turned on
๐
No
We don't send receipts in email so as not to spam people
You can trigger one manually from the Dashboard to see what it would look like
But we don't automatically send them
Just click on a Successful PaymentIntent
Then scroll down to Receipt History
And click "Send receipt" or "View receipt"
No rush
at the moment, when payments are made, the description seems to be the payment session key (I'm assuming). Would you mind telling me where in the docs I should look to configure this?
You can set the Description via payment_intent_data.description: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-description
You too!
Oh sorry one more thing
The client I'm making this site for previously had their payment descriptions include the order number (see screenshot), how can I retrieve the payment number?
That order number is being generated by you, no?
Like we don't generate an order number for you
If this is a new integration, then you need to create the order number from your end
Then you pass it to the Description param that I noted above
I'm not sure how they had it previously, but I believe it was some sort of wix integration or something. So stripe doesn't hold data about the total number of successful payments made?
We don't provide an order number for you, no. You likely want to generate a UUID.
You can certainly retrieve the amount of successful payments as well, but that isn't really what you should use for an Order number
As then you could have duplicate order numbers occur
what about something like data.created ?
from the event data
Is this related to time?
Yes that is the UNIX timestamp
I'd recommend taking a look at something like https://stackoverflow.com/questions/105034/how-do-i-create-a-guid-uuid
And using something in there
How could you go about doing this? I'm thinking of maybe combining UUID + amount of successful payments
Why combine them?
Well just like, a description of My order #${orderNumber} - ${UUID}
The client just requested that the description follow their old system if possible
Oh okay, well really the way to handle the amount of successful payments is to store this data in your own Database
ah forget it then lol
Otherwise you are going to have to list your charges every time and paginate
yeah no that sounds like a pain
Yeah I really wouldn't recommend doing that