#vitali han

1 messages · Page 1 of 1 (latest)

polar bisonBOT
lilac fox
#

Unfortunately I don't think you can control payment intent IDs like that. Can you tell me more about why you are looking to do this? There may be another way to achieve it

tulip surge
#

we started analyzing some payouts and related payment intents related to those payouts and we noticed sometimes in our database the payment_intent we have is 1 higher than the correct payment intent, we noticed this happens when there is a dispute

#

this is in test mode

lilac fox
#

Can you send me an example of that?

tulip surge
#

pi_3LoNIaDyNgZjAM6Z2G6b5vc7

#

and we have pi_3LoNIaDyNgZjAM6Z2G6b5vc8

lilac fox
#

Do you know where those IDs are coming from? A webhook event or an API call?

tulip surge
#

the thing is we are trying to understand where we got that id, it seems like it might have come from a webhook

#

though we only update it using the api

lilac fox
#

I will check both to see what we have sent back. I can't check GET API calls but just looking at the posts should be fine

#

So as far as I can see, we have always sent out the right ID. It will probably be helpful to run through a dispute in test mode and see if your code accidentally adds 1 to that last char somewhere

tulip surge
#

is there any case in which it makes sense for stripe to increment the payment_intent by 1?

lilac fox
#

Not that I know of. We should always keep IDs exactly as is

#

I am not seeing us send out anything related to pi_3LoNIaDyNgZjAM6Z2G6b5vc8 on the day that that pi_3LoNIaDyNgZjAM6Z2G6b5vc7 was being worked with unfortunately. If you confirm that we are sending you these +1 IDs, let us know, we will definitely want to fix that. As far as I know those IDs aren't usable anywhere in the API

tulip surge
#

ok thanks Pompey, i'll keep digging

#

i have another issue

#

when looking at the payments in this payout

#

po_1Lq5772EA8aBonnSY3z2rvJv

#

i dont see any payment_intents

lilac fox
#

How are you looking at the payment intents for it?

tulip surge
#

using the api expanding the source_transaction

#

type="payment"

lilac fox
#

Gotcha, interesting. So no balance transactions say they are for that payout but it clearly has funds in it

#

Looking in to this payout

tulip surge
#

thx!

lilac fox
#

So are there other balance transactions that get listed, just not ones for charges/payment intents?

tulip surge
#

we can see all the payments

#

but none of them has a payment_intent

lilac fox
#

Can you send me some example IDs?

tulip surge
#

when we reach balanceTransactions

lilac fox
#

Can you send me the list of transactions that you get back?

tulip surge
#

its a big file, should i send the whole thing?

hexed tree
#

Hello đź‘‹
Taking over as Pompey needs to step away

#

Was this a manual payout or automatic?

tulip surge
#

automatic

hexed tree
#

gotcha, taking a look.

#

It seems like you do have a Payment ID
"id": "py_1LphRT2EA8aBonnSNGitVVYZ"

#

For non-card payments, the charges are prefixed with py_ instead of ch_

tulip surge
#

i need the actual payment_intent

#

pi_

#

what i do is expand the source_transaction and get the payment_intent from there

#

but for these payments its null

hexed tree
tulip surge
#

pi_3LphRSCU1g4y0fco0wiYaUJP

hexed tree
#

Oh, just a sec

#

I may be missing something minor here, I've asked a colleague to take a look too

hexed tree
#

I believe this is expected due to this PaymentIntent being a destination charge, so the ID's on the Connected Account side won't have the same level of insight.

The payment (py_xxx) is representing the Transfer made to the Connected Account (seen as a payment from the Connected account's perspective).

The PaymentIntent is not associated with that Payment, but is instead associated with the Charge on the Platform account being referenced in the source_transaction field in the response.

If you retrieve that charge (ch_3LphRSCU1g4y0fco0KMt0SX2) do you see the PaymentIntent populated for it?

tulip surge
#

looking into it again as i think the source_transaction is not being expanded in our query

#

'data.source','data.source.source_transfer','data.source.source_transfer.source_transaction'

#

is what we send in the expand array

hexed tree
#

ah interesting, yeah that might be it.

we do have a callout for this in our docs

If you’re using Connect with destination charges, you can retrieve the same information on behalf of your connected accounts. One difference is that destination charges involve both a transfer and a linked payment (in the form of a Charge object) to move funds to a connected account.

So when listing the balance transactions bundled in your connected account’s payouts, each balance transaction’s source is linked to the transfer’s payment rather than the originating Charge.

To retrieve the originating Charge, you need to expand a payment’s linked transfer through the source_transfer property; and from there, expand the transfer’s source_transaction property:

tulip surge
#

so instead of sending an array of ['data.source','data.source.source_transfer','data.source.source_transfer.source_transaction'] we should send ['data.source.source_transfer.source_transaction'] only?

hexed tree
#

Yeah I'd give that a try to see if it's expanding the right property and getting you the PaymentIntent back

tulip surge
#

ok thx hanzo we will give it a try

hexed tree
#

👍