Stripe-dotnet: CardService.List does not load data from source type="card"

Created on 28 Nov 2017  ·  5Comments  ·  Source: stripe/stripe-dotnet

I have customer stored with 3 sources with type = "card", when calling StripeCardService List method i get back 3 instances of the object of StripeCard, but properties of that object are not populated.

All of the properties of StripeCard has values set to null, except for Id, CustomerId and Object those 3 have correct values.

Most helpful comment

Hey @wize1, we just released v11.9.0 which includes the fix I mentioned above.

You should now be able to retrieve card sources on a customer like this:

var SourceService = new StripeSourceService();
var ListOptions = new StripeSourceListOptions
{
    Type = StripeSourceType.Card
};
var CardSourceList = SourceService.List("cus_...", ListOptions);

All 5 comments

So there are two different issues here:

  1. StripeCardService.List should only return card objects (cf. #989), not source objects (even source objects with type=card)

  2. The library currently does not have a method for querying source objects attached to a customer.

I've pushed a fix for the second issue in #1064. The first issue is a bit trickier as some users might rely on the current broken behavior, and so will likely require a major version bump.

Hey @wize1, we just released v11.9.0 which includes the fix I mentioned above.

You should now be able to retrieve card sources on a customer like this:

var SourceService = new StripeSourceService();
var ListOptions = new StripeSourceListOptions
{
    Type = StripeSourceType.Card
};
var CardSourceList = SourceService.List("cus_...", ListOptions);

Thank you ob-stripe!

That helps alot! Very rapid development ;)

When do you thing I will be able to get it on nuget?

It should be available now :)

installed, tested and satisfied! :) you guys rock, i got it in perfect time!

Was this page helpful?
0 / 5 - 0 ratings