#trandn - resource missing
1 messages ยท Page 1 of 1 (latest)
Hi ๐ that error message is typically encountered when you try to reference an object that either doesn't exist, or exists in a different account.
Can you share the ID of a request (req_xxx) where you saw this error returned?
Hi @bronze crater, I wanted to follow-up and see if you saw my above messages?
Hi Toby, yes please give me a minute to provide a few examples
req_VhYop5GJzIgb8s
req_NIq6uIcFVHXKaL
req_a0WZLMEvUrfqn6
req_4z66ZQTAQYNEle
is there anyway for you to tell me which account its trying to use?
Just to confirm a cardId is only linked to one account right? It cant be shared? its odd that we're having this issue despite mapping the new cardIds to our existing customers that were migrated to the new account
In these requests you're trying to access a token from one account that belongs to another, which is not something that is permitted.
how are these tokens generated? by cardId and customerId?
I'm not sure I'm following. Tokens are generated when a request to create is processed, at which point the Token is assigned a unique value for its id parameter.
What is it that you're trying to accomplish here?
I have existing customers with saved cards from one account thats been migrated to the Platform connect account. I think the saved cards are being used to make a payment under the new connect account, and throw this error
but I was given a csv of migrated customers and their cards to put in the database
Sorry, but can you elaborate on that more? We have a flow that allows you to clone payment methods from a Platform account to a Connected account, but I'm not aware of a process to move those from a Connected account to a Platform account.
trandn - resource missing
we have a table for customers with their customerIds and a table with cards and their Ids that link to a customer
The stripe support team was able to move payment data from each connect account to our new platform account. This was reflected on the customer list of the platform page. They provided me with a csv containing the connected_account_id, custoimer id and the old/new cardId which i imported into our database.
The call to stripe takes the customerId and the corresponding cardId to make the payment to the account_id (connect account linked to Platform account)
this is in our backend, if the token is being generated via StripeJs would it be the frontend thats throwing that error?
The calls you gave the IDs for are backend calls from your Python library
It looks like some account IDs or stripe keys may have gotten mixed up here at some point.
Those calls were all made by an account with the ID acct_1LG2crBtzXV796ZI, which is a platform account for 36 accounts
Looking in to the accounts that created those tokens...
So these calls are all your new platform account trying to retrieve tokens that were actually created on connected accounts. It also looks like two of those calls were for tokens created by accounts connected to the old platform and the other two were for tokens on the new platform.
Do you know where your server code would be trying to retrieve tokens like this?
You would likely have stripe.Token.retrieve where this is happening
if i understand correctly, the card tokens are created for connect accounts, but because the apikey we're using (platform account) is calling the token.retrieve with the connect accounts token its throwing the error?
Yes exactly. The token needs to be created on the platform account for the platform to be able to use it.
If you know the account that it is connected to, you can still access the token, but you need to provide the account ID as a parameter.
https://stripe.com/docs/api/connected_accounts
Also, not sure if this is relevant to what you are trying to do, but you can create Payment Methods on the platform and copy them down to the connected accounts if you want to use these cards on multiple accounts. Unfortunately cards can't be copied the other way (from connected account to platform).
https://stripe.com/docs/payments/payment-methods/connect
i see is that a parameter that i can pass to any call? i.e. token.retrieve / charge.retrive?
Yes, all of our API calls support that parameter
That being said there are restrictions on what data your platform can see on connected accounts. For tokens and charges you are fine, this comes down more to personal info on the account itself
okay great, i believe thats where our issue lays.
So from my understanding
If the token is created from the frontend and we pass the stripeAccount. That token is assigned to that connect account right?
So then when we try to fetch the card info using the platform api with that token in our backend, it throws the error. That token cannot be found and this is where we need to pass the stripeAccountId
Correct. The Token exists on the Connect Account and so only requests on that Account will return the Token
amazing thank you very much for your time. Ill try to make a fix to pass the accountId to the backend api call when for token.retrieve ๐