#react-lucky_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
âąď¸ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime!
đ 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/1212745009585983559
đ Have more to share? You can add more detail below, including code, screenshots, videos, etc.
â˛ď¸ 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. Thank you for your patience!
What you mean exactly by it didn't worked ?
I am working on react native app where there is a screen where i enter the card number and save the card only.
I have the same functionality in django and it is working, so i need same for the react native.
Waht error are you facing ?
You need to follow this guide:
https://docs.stripe.com/payments/save-and-reuse?platform=react-native&ui=payment-sheet
I just need to save the card in the stripe dashboard. and do not want to include the payment in this.
here is the django code for the same and I need same functionality in react native
stripe.confirmCardSetup(
'{{ client_secret }}',
{
payment_method: {
card: card,
billing_details: {
email: '{{ user.email }}',
},
},
}
).then(function(result) {
if (result.error) {
showMsg('Card could not be added. Please try again.', 'err');
stopBtnLoad($('#card-element').siblings('.submit'), 'Continue');
} else {
// submit form again
savedCard = true;
$('#card-element').parents('.form').submit();
}
});
The link I shared with you is just for savinc the payment method without making a payment
Using Setupintents
do i need to get the payment client id from backend for this ?
Do i need to do with the CardField or with the payment sheet ?
You need simply to follow the guide I shared with you step by step
Yes you need to get the setup_intent Id from the backend
With PaymentSheet you'll have more flexibility by collecting other payment methods types
but payment sheet have the option to pay after we enter the card details.
can we close it after entering the card and than will the card gets saved ?
PaymentSheet can be used for accepting a payment or just collect the payment
I need to store the card
Yes you can achieve that using PaymentSheet
You need to follow the guide I shared with you simply.
okay I'll try to implement the payment sheet and follow the steps you have shared.
thanks for the promt reply and support.
It just shows how to collect the card details without acceping a payment