#owerol

1 messages · Page 1 of 1 (latest)

dapper mesaBOT
static lagoon
#

Are you using test keys? We don't send receipt emails automatically in test mode

outer hazel
#

Yes im using test keys, im gonna try with live keys, thanks :))

static lagoon
#

We don't recommend testing in live mode

#

What specifically do you want to check on the emails?

outer hazel
#

When the checkout session is completed and the webhook triggers my function i send an email to the costumer and to myself. Then i want stripe to send a receipt so i added some code to my application:

#

stripe.PaymentIntent.create(
amount=session['amount_total'],
currency="huf",
payment_method_types=["card"],
receipt_email=session['customer_details']['email'],
description="3% of your purchase goes toward our ocean cleanup effort!",
)

#

I tested it and it has no error, i received the welcome emails but has not received the receipt from stripe

static lagoon
#

If you're using Checkout, then why do you need a separate Payment Intent too? Checkout sends payment receipts automatically

outer hazel
#

invoice_creation={"enabled":True}, if i add this to my checkout?

static lagoon
#

Well, that's somethign different entirely. Do you need an invoice or just a receipt?

outer hazel
#

invoice would be better

static lagoon
outer hazel
#

I tried in live mode, but has not received invoice from stripe. My code:

#

checkout_session = stripe.checkout.Session.create(
payment_method_types=['card'],
invoice_creation={"enabled":True},
line_items=[{
'price_data': {
'currency':'huf',
'product_data':{
'name':x[1],
},
'unit_amount':x[3]*100,
},
'quantity':1,
} for x in request.session['items']],
mode='payment',
success_url=f'https://capaiskola.com/success/',
cancel_url='https://capaiskola.com/cancel/',
billing_address_collection='required',
)

#

Does the stripe send invoice instantly?

dapper mesaBOT
static lagoon
#

Did you complete the session?

outer hazel
#

Yes, i can find it in stripe, i can download the invoice pdf but i didn't receive the email. Do you have any idea what can cause this?

static lagoon
#

What's the cs_xxx ID?

outer hazel
#

where can i find this?

winter tartan
#

👋 stepping in here as ynnoj needed to step away

#

If you can provide the Invoice ID or PaymentIntent ID associated that might be easier to grab

#

You should be able to find that based on the Invoice or payment in your Dashboard

#

Otherwise, you can grab the Checkout Session ID from the creation request in your logs from the "developers" tab

outer hazel
#

invoice ID: in_1NLmp8Lzf0Gptnh97p2kwZra

#

checkout session ID: evt_1NLmp9Lzf0Gptnh9Z615Sa0y

#

Everything works perfectly, i can download the automatic generated pdf but hasn't received the email witt it. Any idea what can be wrong?

winter tartan
#

Taking a look

outer hazel
#

Thanks

winter tartan
outer hazel
#

Oh i will look at it thank you for your feedback!