#hamid-deattach-destroy

1 messages · Page 1 of 1 (latest)

left hamlet
#

Hello. In which context are you referring? Are you working with a specific API?

zealous dust
#

with payment method

#

like we deatach payment method from customer of credit card or sepa or sofort

#

but can we destory that as well

left hamlet
#

Got it. Detaching a payment method from a customer, the Payment Method object will still exist but will become single use (so if already used once, it's 'expired')

zealous dust
#

okie and what about destroying, can do we destory that?

#

payment method

#

and how?

left hamlet
#

You can't delete a Payment Method object, no

zealous dust
#

so what we can destroy

#

suppose we have credit cards added

#

we have sepa accounts added

#

offcourse we create payment method and then attach and deattach them

#

but what is destroy thing in this prespective

left hamlet
#

They can't be destroyed. What is your concern with those existing?

zealous dust
#

let me put it this way

#

what is the difference between

#

Stripe::PaymentMethod.detach(payment_method_id)

#

and

#
Stripe::Customer.delete_source(
          stripe_customer.id,
          stripe_bank_account.id
        )
left hamlet
#

Well, thats the Sources API. Which is an older API and deprecated (replaced by Payment Methods)

zealous dust
#

and destroy source is only for old api

#

for new we just de attach