#ubi
1 messages ยท Page 1 of 1 (latest)
pi_3NIbxjGnI4RXc2fN0urLwQYl
Do you mean receipt of the PaymentIntent?
It's inside the Charge object of the PaymentIntent itself https://stripe.com/docs/api/charges/object#charge_object-receipt_url
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Intent: once I collect the Payment, I would like to get the Receipt associated with that transaction to show to the user the Receipt Number without having to create a receipt number myself
Yes, please look at the Charge object inisde the PI and the field above
Hold up, let me check
for some reason "invoice": null, so I am not sure
maybe it is due to test mode?
No, I mean the charge object in latest_charge https://stripe.com/docs/api/payment_intents/object#payment_intent_object-latest_charge
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
ahhh so I need to read latest_charge then get the info I want then
let me try that!
I am sorry for misunderstanding the situation, here is what is tricky
I searched for the lastet_charge then look into the charges and the invoice: null
My apologies for reasking the same question, I am honestly a bit lost
Don't worry about invoice.
So when you received the PaymentIntent, do a Retrieve PaymentIntent API https://stripe.com/docs/api/payment_intents/retrieve
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
and expand latest_charge
Here is explanation for expanding https://stripe.com/docs/api/expanding_objects
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
And from there I can get the receipt number?
I see the receipt url but i am not sure if I can expan the receipt as well
I am trying to get that!
Which I am guessing is receipt_number
"receipt_email": "yordis.prieto@gmail.com",
"receipt_number": null,
"receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xRExXOVJHbkk0UlhjMmZOKJrF4KMGMgaUaj8XMkA6LBbXbXcpF2lDxqmauWeC1yyOrpoBch_FDEgnwfJfr5VnWC8O1aAMrma5FrKC",
For some reason is null as well
hmm, but if you open the url in receipt_url, what did you see?
it works, it is there, but I need the number to show in our UI
we have a Confirmation screen where we show a "Confirmation Number" which ideally would be that receipt_number value
This is the transaction number that appears on email receipts sent for this charge. This attribute will be null until a receipt has been sent.
Sorry so this will only have the value after receipt was sent automatically to the customer, using the receipt_email on PaymentIntent here https://stripe.com/docs/receipts#automatically-send-receipts-when-payments-are-successful