#Sumit Mitra-PaymentMethod
1 messages · Page 1 of 1 (latest)
Let's clarify a bit. Is above code your client code or server code?
Publishable Key is only for client. Secret key is for your server. There are Test mode secret key and Live mode secret key
Ok so in front end I have a publishable key starting with pk
and in our server backend we have a key starting with sk
yes, that's correct
it is in node
I am creating a payment method with card element in our frontend
and sending it to our back end where i am trying to attach it to a customer with pm id and customer id
Ah that's reasonable. The PaymentMethod you created in client using stripe.js?
yes the react-stripe
In your client you have pk_text_xxx, right?
Yes
that would be a test Publisable key
in client pk key is there
in Node do you use a Live mode key? like sk_live_xxx?
Yes in node sk key there
So a test pk key can only be used with a test sk key, and a live pk should be used with a live sk
ok so how where do i get test sk key and test pk
and can you help me in knowing if i can update the default paymethod of an already created customer