#acardillo-duplicate-receipts
1 messages ยท Page 1 of 1 (latest)
Hello
Do you have a recent example you can share where you are seeing two receipts?
Yes ... Receipt #2923-8471 was sent twice
I can go into the dashboard and grab the subscription id
Yeah I would need the Subscription ID
sub_1OEZcRFwrAjB2CpDfoOelwI3
Thanks give me a min to look
this is the code i am using to set the reciept email on subscription payments ... it is being set from the payment_intent.created event as discussed when i brought up the issue last
if (!paymentIntent.receipt_email) {
let invoice: any;
if (paymentIntent.invoice) {
invoice = await stripe.invoices.retrieve(paymentIntent.invoice, {
stripeAccount: stripeAccountId,
});
}
const customerUserId =
paymentIntent.metadata.customerUserId ||
invoice?.subscription_details?.metadata?.customerUserId;
if (!!customerUserId) {
const user = await User.findById(customerUserId);
if (user) {
await stripe.paymentIntents.update(
paymentIntent.id,
{
receipt_email: user.email,
},
{
stripeAccount: stripeAccountId,
},
);
}
}
}
Still looking. Not quite sure why the receipt was sent twice here...
okay thank you :))
๐ hopping in here since bismarck has to head out - we took a closer look on our end and we think this may be a bug. We're flagging to the product team that handles this behavior, but in the mean time can you write into support (https://support.stripe.com/contact) so we can notify you when we've identified a fix?
Let me know once you've written in so I can find it on my end!
@hoary cargo Just checking in to see if you wrote in
ohh sorry will do that right now!
no worries!
@dapper ledge sent!
Thank you! Someone should be following up as soon as we know more ๐