#mariohd

1 messages · Page 1 of 1 (latest)

naive wrenBOT
ivory fulcrum
#

Hello! There shouldn't be differences like the one you're describing. Are you using Stripe Connect at all?

tall thorn
#

Hi Rubeus. No, I'm using ES Module Stripe.js SDK for web and Stripe Android SDK for mobile.

ivory fulcrum
#

Can you share the code that triggered the error?

tall thorn
#

Well, the error is triggered when making a request similar to this one (these are fake stripe ids):

subscription = stripe.Subscription.create(
    customer="cus_4fdAW5ftNQow1a",
    items="price_1Hh6bXCRMbs6FrXf5GK4k3kN",
    default_payment_method="pm_1Hh6bXCRMbs6FrXf5GK4k3kN",
    trial_period_days=7,
)
ivory fulcrum
#

None of those IDs are sensitive and you can share the actual ones. In particular, can you tell me the actual Customer and Payment Method IDs you tried to use?

tall thorn
#

Ahhh, sure, give me a minutre

#

Rubeus, my fault, I double checked and seems that the error was triggered one step before in:

stripe.Customer.modify("cus_PbW1FIFdUfVynd", default_source="pm_1OmJ09IXCQvpWxEKbTNIxO4f")

I removed this code and the subscription works ... but why does the default source assignment fail?

ivory fulcrum
#

You can't set a Payment Method as a default_source.

#

Payment Methods are our current, modern API and default_source is part of our older, legacy API.

tall thorn
#

Great, that's exactly what I'm looking for. I'll tweak the code to do it that way.

Many thanks! 🙌