#jd-dev_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1327004578754855024
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- jd-dev_api, 5 days ago, 30 messages
Hi there! Could you provide an example of an old payment where this was working as you expect? A PaymentIntent or Charge id would be most helpful. That will look like ch_abc123 or pi_abc123
wait let me see
pi_3QfPSQCbKxPFheRp0z9gBoBU
before i used to get it like this (paymentIntent.charges.data[0].receipt_url)
The receipt_url doesn't exist on the PaymentIntent. It exists on the Charge. In the API version that you were on previously, the PaymentIntent's charges parameter returned the Charge object, but in API versions after 2022-11-15, this was replaced with latest_charge which is only the id of the latest Charge.
https://docs.stripe.com/api/charges/object?lang=node#charge_object-receipt_url
What you can do is expand the latest_charge property to get the Charge in the response to the confirm call: https://docs.stripe.com/api/expanding_objects?lang=node
OK i got it i have another question for you
is there a way that i can do the prize breakdown in the actual receipt?
like tax i collect from them and any other breakdown that i want?
At a basic level, yes, you can use the description field to provide custom text, but it is not very robust. The customization options for our receipt emails can be found here: https://docs.stripe.com/receipts?payment-ui=direct-api#customizing-receipts
i guess i can only customize description.... is there no way to show tax collected?
The description is the only way to put any sort of custom information on the receipt email. If you're looking for more robust breakdown of line items, you could consider Invoicing.