#nerder-connect

1 messages · Page 1 of 1 (latest)

smoky meadowBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

  • _nerder, 22 hours ago, 34 messages
barren badger
#

Not really

#

You should keep track of this in your database

fringe sluice
#

ok, i just asked out of curiosity because i've notice this interesting error message

#

No such PaymentMethod: 'pm_1MskmJJJBXKsbxPkK9mBJwJY'; It's possible this PaymentMethod exists on one of your connected accounts, in which case you should retry this request on that connected account.

barren badger
#

Yep

#

Can you share request id

fringe sluice
#

no worries, I know why this is happening and how to fix it

#

this error message just got me thinking that probably you are aware that this payment method is indeed attached to a customer of a connected account

#

I keep track on my DB as well, so I can simply loop trough all the connected account in which this specific user is a customer of

#

but it's a bit inconvenient to perform several calls to your API

barren badger
fringe sluice
#

i mean that in my scenario, the user can be present as customer in several connected accounts

barren badger
#

Yeah you need a way to keep track of which connect account is getting the payment and use that customer id

fringe sluice
#

i keep track of everything, but I don't have a way to know from a payment method from which customer in which connected account it belongs

#

so I need to try them all

barren badger
#

You should store a mapping in your db so you don't have to try them all

fringe sluice
#

yes I was thinking about that

#

to store a map of for instance (payment_method_id & account_id)

#

I'll think about that because it will be quite convinient

#

thank you for reason it with me

barren badger
#

No problem

#

Really the proper way to model it would be payment method -> customer -> account

#

Not sure if you have a relational db

#

But an account would have customers which in turn would have payment methods

smoky meadowBOT