#jzills - plain

1 messages ยท Page 1 of 1 (latest)

restive jewel
#

Hello! Just starting a thread for you -- I'll review and respond as soon as I can ๐Ÿ™‚

deep prism
#

Great thanks!

restive jewel
#

Can you share an example request with metadata you says is not attaching?

#

or that error request

deep prism
#

Yes sorry just saw this - one second

#

req_tqej87mm1QWMb0

restive jewel
#

Where then do you say you do not see the metadata?

deep prism
#

I don't see it in the dashboard or if I fetch that PM in the CLI.

#

I just deleted the PM so it's not there currently. I can re add if you're trying to fetch it.

restive jewel
#

Yea, try another one and can you share the retrieval request too?

deep prism
#

Sure - I just updated the sdk as well.

#

{<Stripe.StripeResponse status=200 Request-Id=req_O7u4T4N8jc35j0 Date=2022-05-13T15:40:35>}

restive jewel
#

Does that change if you retrieve as a source? Not that you set this up using the customer sources endpoint

#

stripe sources retrieve ...

deep prism
#
"error": {

    "code": "resource_missing",

    "doc_url": https://stripe.com/docs/error-codes/resource-missing,

    "message": "No such source: 'ba_1Kz0bSGlQRIgvmTkzyrvZu8w'",

    "param": "id",

    "type": "invalid_request_error"

  }
restive jewel
deep prism
#

That command doesn't work - says stripe payment_sources retrieve requires exactly 2 positional args.

half skiff
#

Hi ๐Ÿ‘‹ I'm stepping in for @restive jewel . Can you share the command exactly as you entered it?

deep prism
#

stripe payment_sources retrieve cus_123ba_345

#

Hi @half skiff - great thanks for your help!

half skiff
#

Yeah you need to specify the bank account token as well, that's what @restive jewel was suggesting with ba_2345

deep prism
#

Ok got it let me run it

half skiff
#

Needs to be a space

deep prism
#

I see the correct metadata from that

half skiff
#

Hooray!

deep prism
#

Well I still need to be able to fetch this through the sdk.

#

Right now I'm using PaymentMethodService.List 2 times...once for "card" and once for "us_bank_account"

#

That metadata isn't being returned in that call.

half skiff
#

Are you casting the metadata properly? I'm not super familiar with C# but I've seen that be a problem when retrieving nested data in static typed languages

deep prism
#

It maps to a C# Dictionary<string, string> so there's no casting. I'm using metadata in a lot of other Stripe objects without issue.

#

The Metadata property is coming back from Stripe is null even though as we saw in the CLI that it has one field for AccountPersonId.

half skiff
#

But we can see in the CLI and the JsonVisualizer that it is coming back.

deep prism
#

So what calls should I be making in the sdk?

#

Right now I'm calling PaymentMethodService.List with the CustomerId and Type ("card" and "us_bank_account")

#

The metadata comes back correct for "card" types but the metadata is null for "us_bank_account" types even though as we saw above, it is coming back in the CLI for PaymentSources.

half skiff
deep prism
#

We did it through Plaid

#

Got bank account token for Stripe from Plaid, used the token to create a bank account in Stripe.

#

At that same time I add the metadata.

half skiff
#

Okay so that's old school v1. Which has some issues when accessing through the PaymentMethods List API

deep prism
#

Is there another way I should be doing it through Plaid? I followed their docs.

half skiff
#

Metadata not being returned by the Payment Methods API for legacy bank_account objects is a known issue. I've flagged this internally.

deep prism
#

Ok so I'll need to get all PaymentMethods for "us_bank_account" then use all the bank account ids to make another call to the BankAccount API in order to have the metadata, correct?

half skiff
#

Currently yes

deep prism
#

Ok great thanks a lot for your help! I'm going to give it a shot now. Can we leave this thread open for now in case I need to follow up on this?

half skiff
#

Sure.

deep prism
#

When using the BankAccount API the parentId is the customerId?

#

Yes it is I see it in the docs ๐Ÿ™‚

half skiff
#

Yeah because you are making a request for the customer's source object. So you specify the Customer, then the Source

deep prism
#

Great thank you