#ilyeselb

1 messages · Page 1 of 1 (latest)

shy fableBOT
velvet oak
strange flame
#

okay thank you

velvet oak
#

NP! 🙂 Good luck

strange flame
#

thank you

#

sorry another quesstion

#

im testing saving card to customer with that pm

#

and i got this error PaymentServiceException: You must save this PaymentMethod to a customer before you can update it.

velvet oak
#

How exactly are you trying to save it? Can you share example/code?

strange flame
#

await this.stripe.paymentMethods.attach(paymentMethodId, {
customer: customerId,
});

#

then i update the pm metadata

velvet oak
#

Are you sure the attach succeeded before you attempted to update the payment method?

strange flame
#

ah i know the issue

velvet oak
#

also when you update the metadata, what PaymentMethod ID are you passing?

strange flame
#

thats the issue

velvet oak
#

Ah great, what was it?

#

The ID?

strange flame
#

im passing the pm-card-visa

#

but it create a pm id

#

on attach

velvet oak
#

Yes, the attach should have a diff ID

#

yup

#

Glad you figured it out

strange flame
#

thanks

#

have a nice day