#tyler.yang - follow-up
1 messages ยท Page 1 of 1 (latest)
hey there, just cathcing up here
you're saying some payments generate webhook events you receive, while others do not?
Do you have example events that you do receive i can look at?
and a payment example you don't receive an event for?
You've solved your issue of being able to tell which payments originated form web vs app, then?
If you need help with webhook delivery, we'll need to get a bit more detail from you @halcyon badge
yeah sure
this is the one that missing application pi_3K6oXtJYxzz9q9i90VQItAwd which did NOT trigger the webhook
this is the webhook we_1JXdlxJYxzz9q9i9kkxIhn9C
this is the one PI that can trigger our webhook pi_3K6oFvFUtwYrZPVC1UALRxqo
which contains application
we don't need to know where the PI is originated technically
yesterday I was told that this is because the webhook uses our Contect account
sorry now youre saying "missing application" vs "contains application" -- are you getting all the events you expect, but some have different attributes/data than you need?
we tested Apple Pay in both Web and App, PI originated from WEB, contains Application
PI originated from APP, does NOT contain Application
This is the request that contains application req_BVskbqUXs3zcdG
This is the request that missing application req_e385AJPL9OCA0M
"application": "XXXXXX", is the only difference between above two requests
Great, thanks for that - let me take a look
Yep, this makes sense. One of those requests is made as your own account (req_e385AJPL9OCA0M) while the other is made as a connect request as a direct charge on a separate account (acct_18NGoVFUtwYrZPVC )
so yes you receive one of the payment related event on your own account webhook endpoint, and the other would happen via your connect endpoint with application and the stripe account values available
this is expected behaviour based on the way you are making these requests
but we were sending those two requests in the exactly same way?
both via the same endpoint
same payload structure
just wondering how did they end up using different account in our case
๐ I'm just hopping in to take over for @spare stag
hi @fallow basin
Something has to be different in your code for those requests - they're using different API keys and also the one that contains application is setting the Stripe-Account header.
hmmmmm
are you able to help me find out which account was used for request req_e385AJPL9OCA0M?
For req_e385AJPL9OCA0M it was created with the api keys from account acct_187vnhJYxzz9q9i9 (which is your platform account). For req_BVskbqUXs3zcdG it was still created using the acct_187vnhJYxzz9q9i9 API keys, but with the addition of the Stripe-Account header to specify the connect account acct_18NGoVFUtwYrZPVC
right, so req_e385AJPL9OCA0M was missing that header
Yup
are you able to share some lights on the possible cause of this?
from what I can tell, all requests should be using the same account
Hello! You mean why was that last request you mentioned missing the Stripe-Account header?
Because your Node code didn't set it. Maybe the code is trying to set it to an empty value or something?
just want to make sure I'm looking at the right place, you meant this stripe.paymentIntents.create({ stripeAccount: xxxxx}) ?
More or less, but it would be in a separate object, not the first one passed in. See here: https://stripe.com/docs/api/connected_accounts?lang=node
Are you trying to pass stripeAccount in alongside other values like amount or is it in a separate object?
those values are in separated object, sorry about confusion, const paymentIntent = await stripe.paymentIntents.create( { payment detail data here }, { stripeAccount: xxxxxxxx, });
Ah, yeah, that looks correct. Can you log out the value of stripeAccount just before that code runs and make sure it's the account ID you're expecting it to be?
yeah, trying to see whether I can grab it. Will update you later. Thanks @errant basin
GOT IT!
now I can see the application is correct for new payment intent
but, also bad news ๐ฎโ๐จ
payment intent cannot be completed ๐ฆ
Are you getting an error?
we are getting error like this Payment failed: Optional(Error Domain=com.stripe.lib Code=50 "There was an unexpected error -- try again in a few seconds" UserInfo={com.stripe.lib:ErrorParameterKey=intent, com.stripe.lib:StripeErrorCodeKey=resource_missing, com.stripe.lib:StripeErrorTypeKey=invalid_request_error, com.stripe.lib:ErrorMessageKey=No such payment_intent: 'pi_3K76PjFUtwYrZPVC2h3CKLHA', NSLocalizedDescription=There was an unexpected error -- try again in a few seconds})
this is the error I got from the App
Can you give me a request ID for that?
Are you sure that's the correct request ID? That request appears to have succeeded with no issues.
that is the request for creating the payment intent
but I cant find a request for that failed one
this is what I can find out for that PI
The error usually indicates the Payment Intent doesn't exist on the account you tried to make the request on.
does the app need to know which account?
The request log would exist on that other account, not your platform account.
Yes, the app needs to know which account.
where can we set account in iOS SDK? or this is related to publishable key?
oh man @errant basin big thanks
finally
is there a rating button here to provide feedback on your awesome help? ๐
We don't have anything like that set up here, but thank you for the kind words! ๐
again, big thanks!