#sintonz - Save Payment Method

1 messages · Page 1 of 1 (latest)

languid hawk
#

Hello! I don't think so, no. We recommend using a Setup Intent or Payment Intent to attach a Payment Method to a Customer. Can you tell me more about what you're trying to build?

twilit parcel
#

it might be the save() that interacts with my database maybe

#

It has been a while since i wrote this code

#

Basically I do not want to get the customer id from my database

#

top line and bottom lines

#

And am replacing with try blocks

#

to create the customer id in stripe if the email cannot find it

languid hawk
#

This is the part of the code that attaches the Payment Method to the Customer: stripe.PaymentMethod.attach(payment_method_id,customer=customer)

twilit parcel
#

ok so the customer.save() seems to be saving to my db not the stripe API

#

right?

#

Weird since the customer top variable is querying the stripe API using the value in my database

#

the user_membership database value

languid hawk
#

Honestly I don't know, I've never seen .save() on a Stripe Customer Object like that...

twilit parcel
#

i have seen it in django that is probably it

#

Just weird though how it is saving the stripe API call which is what the customer variable is

#

the long commented one with #####

languid hawk