#Nukesforbreakfast
1 messages ยท Page 1 of 1 (latest)
hello! afaik i would use the time of the payment_intent.succeeded event
what are you trying to do with that time out of curiosity?
I have an existing system where we can track payment amounts manually, such as if they paid with a check. When I get the webhook that an online payment succeeded, I use metadata to tie it back to the right account and create a payment object in our DB. I need to set a timestamp on that payment object corresponding to when the payment was completed.
the only attributes that appear to be timestamps are created_at and cancelled_at, but I don't believe those correspond to when the status became succeeded.
ok
another question about payment intents:
I'm using checkout with connect, destination charges, and on_behalf_of set.
how do I get the transfer information and the destination payment? There's some metadata I wanted to set on the payment that ends up on the connected account's side.
in the old charge integration, there was a charge.transfer attribute I could refer to: https://stripe.com/docs/api/charges/object#charge_object-transfer
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I don't see the same on the payment_intent.
I'm ultimately trying to get to this: https://stripe.com/docs/api/transfers/object#transfer_object-destination_payment
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
can you share your account id? i want to see what API version you're currently using
acct_1DrGYIB7kbjcJ8Qq
I'm definitely on an old API version. Working to move to a newer one.
hmmm, everything recent in test mode is via the Dashboard
anyway, a PaymentIntent still creates a Charge object, so you can refer to the corresponding Charge object
there should be a bunch of payment_intents created by CI tests that have run recently.
maybe you can share the PaymentIntent id?
or over the past few nights anyways.
does a newer API version contain the link to the transfer?
in the docs I only see transfer_data and transfer_group
maybe share an example PaymentIntent id with me? i can point you to it then
ok one second let me see if I can find one.
I just sorted by the really old ones since more recently I've been doing a lot of unrelated webhook testing, but hopefully this still works: pi_1G9DgEB7kbjcJ8QqQyF98f5W
I don't think I've done one in the past week to be honest.
not in test mode anyways
would a live payment work?
what i wanted to highlight is that on the latest API version : https://stripe.com/docs/upgrades#2022-11-15
The charges property on PaymentIntent has been removed. You can use the latest_charge property instead.
and
Charge no longer auto-expands
a live payment would work too yes
pi_3Mm3EyB7kbjcJ8Qq0UdQ44k2
so you can see that you get a charge.suceeeded event - https://dashboard.stripe.com/events/evt_3Mm3EyB7kbjcJ8Qq0EXE6n7w
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
and you can see the Transfer here
OK, so there's no direct access from the payment intent.
if you look at the PaymentIntent event here : https://dashboard.stripe.com/events/evt_3Mm3EyB7kbjcJ8Qq0J0mW9yi
You can see that the Charge is expanded here, and you can also see that there's the Transfer there also
but if you upgrade to the latest API (and also update your webhook API version to the latest), you will no longer see the Charge autoexpanded in the payment_intent.suceeded event
but confirming I needed to look at the charge object that's related to the PI and not the PI itself is what I wanted to check on.
if you want to future proof, yes, look at the Charge object
are charge.succeeded and payment_intent.succeeded basically the same event, just from different objects?
alright.
@proper gate while working this, I stumbled upon this in the docs: https://stripe.com/docs/connect/get-started-connect-embedded-uis
is there anywhere I can go for more information on what the roadmap for this feature is?
i would reach out to Stripe Support to see if they're able to share more infomation : https://support.stripe.com/contact/email
if it gets to the point of being able to embedd the invoice management part, it might be exactly what I've been looking for.