#JonathanB-billing-portal

1 messages ยท Page 1 of 1 (latest)

loud lagoon
#

Hi there!

#

Can you specify exactly what you mean by the cards object is empty? There is no cards object associated with a Customer.

#

Ah

#

I know the confusion

#

However, this property is not included by default when you retrieve a Customer

#

You need to expand it

hoary charm
#

Sorry, I meant the cards property on the Customer object

When I call
stripe customers retrieve {customerId}
there is a cards property that according to the API docs will show the 10 most recently used cards, however none of the cards that are entered via the billing portal show there and the cards property is showing as an empty array

#

sources is also showing an empty array under the customer object as well

loud lagoon
#

Hrmm what API version are you using?

#

And can you provide me a request ID for one of these retrievals?

hoary charm
#

Logs in the stripe dashboard is showing API version 2014-11-20

#

The example in working with (in test mode) is:

#

stripe customers retrieve cus_MFD9aNj3CugSmW

loud lagoon
#

Ah okay the old API version is likely why

#

Let me look into the details here

hoary charm
#

Okay thanks

torpid relic
#

Hi there ๐Ÿ‘‹ jumping in my so my teammate can take a break. I'm going to need to do a little digging first to find the cards field that you're referring to, please bear with me while I work on that.

hoary charm
#

Sure thing!

torpid relic
#

Sorry, but I'm struggling to find the cards field that you're referring to, could you link me to the documentation that you're referencing?

hoary charm
torpid relic
hoary charm
#

So through the CLI, listing the payment methods is returning card data and sources is not as seen in the screenshot above

#

My only issue with this is that payment methods apparently don't return a card_id to be used with the charge endpoint but can only be used to make a PaymentIntent

#

I'm wondering if this is because those cards were created using the billing portal?

#

If that is the case, is there a way to configure the billing portal to create cards as sources rather than payment methods?

torpid relic
#

Correct, Payment Methods are intended for use with Payment Intents, and are not compatible with Charges.

#

No, as far as I'm aware the Customer Portal is not able to create Sources and only creates Payment Methods.

hoary charm
#

Okay, well at least that make sense why I was seeing such differences between them

torpid relic
#

I'm glad I could help explain that!