#DOWNTOWN DUNKARONI

1 messages ยท Page 1 of 1 (latest)

vapid emberBOT
fleet lily
#

Hey there

minor edge
#

Hey Bismarck, just to catch you up, I'm trying to create an automatic email reply upon payment success

fleet lily
#

Gotcha

minor edge
#

Still fairly new to all of this so bear with me please ๐Ÿ™‚

fleet lily
#

No worries

#

What are you going to use to send the email?

minor edge
#

I just want stripe to send an email receipt, if possible

#

I'm using checkout sessions

fleet lily
#

Oh you don't need to use Webhooks for that.

minor edge
#

oh lol

fleet lily
#

For "Email customers about Successful payments"

minor edge
#

that's all? no configuration in checkout_sessions?

#

I thought based on my last exchange that I had to somehow pass the email

fleet lily
#

Are you passing a Customer to your Checkout Session Creation?

#

Or setting customer_creation: always?

minor edge
#

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

minor edge
fleet lily
#

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

minor edge
#

Damn lol, that's fantastic

#

would've saved me a few hours of docs diving haha

fleet lily
#

๐Ÿ™‚

minor edge
#

does this fire in test mode as well?

#

if I want to make sure it's sent properly

fleet lily
#

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

minor edge
#

where would that be specifically?

#

i'm in my dashboard rn

fleet lily
#

Just click on a Successful PaymentIntent

#

Then scroll down to Receipt History

#

And click "Send receipt" or "View receipt"

minor edge
#

I see! fantastic

#

I have one more question before I let you go, just one sec please

fleet lily
#

No rush

minor edge
#

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?

fleet lily
minor edge
#

wicked, thank you so much! you've been very helpful ๐Ÿ™‚

#

have a great day!

fleet lily
#

You too!

minor edge
#

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?

fleet lily
#

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

minor edge
#

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?

fleet lily
#

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

minor edge
#

what about something like data.created ?

#

from the event data

#

Is this related to time?

fleet lily
#

Yes that is the UNIX timestamp

#

And using something in there

minor edge
fleet lily
#

Why combine them?

minor edge
#

Well just like, a description of My order #${orderNumber} - ${UUID}

#

The client just requested that the description follow their old system if possible

fleet lily
#

Oh okay, well really the way to handle the amount of successful payments is to store this data in your own Database

minor edge
#

ah forget it then lol

fleet lily
#

Otherwise you are going to have to list your charges every time and paginate

minor edge
#

yeah no that sounds like a pain

fleet lily
#

Yeah I really wouldn't recommend doing that

minor edge
#

ok cool

#

Will probably look into a UUID package on npm