#jarcher-customer-attachment

1 messages · Page 1 of 1 (latest)

knotty valveBOT
fierce wasp
#

jarcher-customer-attachment

#

@twilit carbon you forgot to pass a Customer id customer: 'cus_123'

twilit carbon
#

the request url has the customer id in it. so it should be passing the customer id right?

fierce wasp
#

ah yes duh, sorry I always forget this URL has been re-designed. Looking

#

that Customer does not have that PaymentMethod though

twilit carbon
#

I was checking to see if the payment method exists on the customer before adding it to the customer

#

suppose thatt's not the right way

fierce wasp
#

gotcha yeah no that's not the right way. The API you call is trying to retrieve the PaymentMethod pm_123 from Customer cus_ABC and it will 404 if it doesn't exist that's all

#

Can you clarify what

checking to see if the payment method exists on the customer
means to you?

twilit carbon
#

before adding a payment method to a subscription, wanted to see if the payent method exists. if not, add it

fierce wasp
#

what does "the payment method exists" mean though? Please try to explain because the vocabulary you use is different from ours. A PaymentMethod in Stripe is the pm_123. If you collect the same card details 15 times, you'll get 15 different PaymentMethod objects

twilit carbon
#

"payment method exists" means "I can create a customer's subscription with this payment method"

fierce wasp
#

😅 I'm sorry that is still so vague

#

Where did you get the pm_123? Was it just created client-side? Does it come from your database?