#Abishek
1 messages · Page 1 of 1 (latest)
Can you show me the code that you are using when you get that error?
It sounds like you are trying to access charges on a PaymentIntent object that does not have a charges property
It sounds like your API code may be using one of our recent API versions where the charges array was replaced by the latest_charge property
do I need to upgrade the API?
You can either change your code to work with that latest_charge property or you can change the API version that you are making calls with to a version that is 2022-08-01 or earlier
Here is how to change the version in your code https://stripe.com/docs/api/versioning
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ok, so how do I get the receipt url from the PaymentIntent?
I see there is the property called latest_charge
do I need to retrieve the charge and then look up the receipt url?
receipt_email is on the charge object the https://stripe.com/docs/api/charges/object#charge_object-receipt_url
So when retrieving the payment intent, you can expand latest_charge and then access the URL at latest_charge.receipt_url on the intent https://stripe.com/docs/expand
ok, tried that, get this error
This property cannot be expanded
(latest_charge.receipt_url).
This is just test data and here is the request data
I am currently on API - 2022-11-15
You only need to expand latest_charge
ah ok