#dechichi_charge-receiptnumber

1 messages ¡ Page 1 of 1 (latest)

errant geodeBOT
serene ermineBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

errant geodeBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1260656870519996477

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

trim quartz
#

dechichi_charge-receiptnumber

#

@junior anvil the receipt_number is on the Charge not the PaymentIntent. So you either listen to charge.succeeded for it, or when you get payment_intent.succeeded you can call the Retrieve Charge API (https://docs.stripe.com/api/charges/retrieve) to get it

junior anvil
#

I think I'm retrieving the Charge object by expanding payment_intent.latest_charge, but it looks like it doesn't have the receipt number as a field? Just the url

"receipt_email": null,
  "receipt_number": null,
  "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xTTJKVGtMa2RJd0h1N2l4KOvG06AGMgZfBXyr1aw6LBa9vaaSRWU96d8qBwz9z2J_CObiV_H2-e8RezSK_sw0KISesp4czsOUlVKY",

I'm looking for the receipt #, which is what the user sees here:

#

The reason is that costumers that would like to request a refund may want to refer to this #, as it's the only thing provided on the confirmation email

trim quartz
#

receipt_number is present if you are in Live mode and an email was sent

#

If you are in Test mode it will be null by default. If you manually send the email receipt by clicking in the Dashboard and then retrieve the Charge you will see it's set properly

junior anvil
#

Oh ok got it, I'll try on live mode!

#

Final question, can I retrieve a charge object through the receipt_number?

trim quartz
#

Sadly no

junior anvil
#

Ok, that's helpful to know

#

Thanks for the help!