#frekis_api

1 messages ยท Page 1 of 1 (latest)

frozen shellBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1299302028731879485

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

wicked arch
jagged quartz
#

๐Ÿ‘‹ happy to help

wicked arch
#

Hello

#

I tried to added card into customer with this payloads :-

stripe.customers.createSource(
customer_id ,{
source: {
exp_month: '10',
exp_year: '2026',
number: '4242424242424242',
cvc: '123',
object: 'card'
}
})

but return error

jagged quartz
#

unfortunately sources will be soon fully deprecated

#

and in all cases you shouldn't send Raw PAN using your secret key

wicked arch
#

Yes but our app developer will make custome ui so for that will use add card api first.

jagged quartz
#

they need to use our SDK to create the PaymentMethod or directly confirm the SetupIntent

wicked arch
#

Yes they use stripe sdk but custome ui

jagged quartz
#

I meant the Stripe.js on the frontend

#

not the stripe-node SDK on the backend

wicked arch
#

yes stripe.js on front end we used stripe sdk on android and ios side

jagged quartz
#

ok in that case you need to follow the guide I sent you

#

which creates a SetupIntent on the backend

wicked arch
#

this error is return by stripe when i tried to add card.

jagged quartz
#

and sends its client_secret to the frontend

#

and the frontend uses the confirmSetup to add the card to the customer

wicked arch
#

But what if customer is new for our platform because they don't have any paymentmethod so in that case what we do ?

jagged quartz
#

you create the customer in the backend

#

you create a SetupIntent for them

#

and then you send the client_secret to the frontend

#

it's the same path the only difference would be to create the customer or retrieve them before creating the SetupIntent