#acardillo-duplicate-receipts

1 messages ยท Page 1 of 1 (latest)

golden mantleBOT
brazen acorn
#

Hello

#

Do you have a recent example you can share where you are seeing two receipts?

hoary cargo
#

Yes ... Receipt #2923-8471 was sent twice

I can go into the dashboard and grab the subscription id

brazen acorn
#

Yeah I would need the Subscription ID

hoary cargo
#

sub_1OEZcRFwrAjB2CpDfoOelwI3

brazen acorn
#

Thanks give me a min to look

hoary cargo
#

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,
        },
      );
    }
  }
}
brazen acorn
#

Still looking. Not quite sure why the receipt was sent twice here...

hoary cargo
#

i have other instances as well

#

if that would help

brazen acorn
#

That's okay for right now

#

We are still investigating

hoary cargo
#

okay thank you :))

golden mantleBOT
#

acardillo-duplicate-receipts

dapper ledge
#

๐Ÿ‘‹ 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?

dapper ledge
#

Let me know once you've written in so I can find it on my end!

dapper ledge
#

@hoary cargo Just checking in to see if you wrote in

hoary cargo
#

ohh sorry will do that right now!

dapper ledge
#

no worries!

hoary cargo
#

@dapper ledge sent!

dapper ledge
#

Thank you! Someone should be following up as soon as we know more ๐Ÿ‘