#Matt.b-reusing-payment-methods

1 messages ยท Page 1 of 1 (latest)

wooden creek
#

Hey! What specific help do you need? How are you using the Payment Method object?

spark kiln
#

I am using payment method to charge for the accounts once per month

#

My platform is based on ruby on rails and using the stripe gem to charge using payment intent

wooden creek
#

As per the error, they need to be attached to a Customer object to be reusable (otherwise they are single use). How are you creating the PM objects?

spark kiln
#

I created a setup intent with customer and use confirmCardSetup api to connect the card to the setup intent

wooden creek
#

Can you share the ID of the Payment Method please?

spark kiln
#
  1. I created a setup intent with customer on the back-end and passed setup intent id to front-end
  2. On front-end, specifically in javascript, I used confirmCardSetup api with setup intent id and the card details
  3. On front-end, it returned payment method id by the previous api called above and I saved it in the database
#

here you go
pm_1KED6VJhPDfCDTf4Y0OqpCgW

#

@wooden creek FYI, i sent you the payment method id above

wooden creek
#

Thanks, please be patient. Helping many other users ๐Ÿ™‚

#

Checking now

spark kiln
#

Thanks very much. ๐Ÿ™

wooden creek
#

Everything looks good there! Can you share the ID of the request that returned the original error you shared?

#

Also, what do you mean by:

following error when using the setup intent

spark kiln
#

By following error when using the setup intent, I meant that this error happens with the payment method set up with setup intent

#

sorry if I described this wrong way but this happens with payment intent api actually

wooden creek
spark kiln
#

Thanks I will find out the api id now

wooden creek
#

Thanks!

spark kiln
#

yayy I guess I found it

#

Here you go please

#

req_rb1sqOTzDNfrBc

wooden creek
spark kiln
#

Thanks for finding this out for me. Do you happen to know how this api is called by chargebee?

wooden creek
#

I have no idea! You'd need to speak to them

#

My guess is something in their UI triggered that detachment, and as such the PM can't be reused now

spark kiln
#

Thanks very much @wooden creek. Your help is pretty much helpful

#

๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘

wooden creek
#

Sure, np