#Sangeeta
1 messages · Page 1 of 1 (latest)
hello! For one time payments, you can refer to : https://stripe.com/docs/payments/accept-a-payment,
for recurring payments, you can refer to : https://stripe.com/docs/billing/subscriptions/build-subscriptions
what do you mean by backend functionality?
means to say how we manage in api
when we create the subscription so we need the card details
you need to collect the card details in your front end. I'd suggest you take a look at the examples, it walks you through step by step for how to setup both your front and backend
Hi @lament trail
How do we collect card details from frontend if we use a default stripe payment sheet?
the examples in those pages i provided cover android, ios and react native. Example : https://stripe.com/docs/payments/accept-a-payment?platform=android&ui=payment-sheet#android-collect-payment-details
Is there something specific which I can help to clarify?
I'll check and let u know. thanks!
@lament trail, I haven't seen any topic regarding our issue
sorry, i'm really confused, what issue are you referring to?
The original question was how to create one time and recurring payments in node.js
The examples cover how to write your server code in node.js. The payment details should be collected in your frontend - which you wouldn't use node.js for.
if you just want to collect payment details on the frontend, then you can take a look at https://stripe.com/docs/payments/save-and-reuse
let me check
Didn't get any result
the things which was mentioned are already do from my side
what does didn't get any result mean?
I mean I haven't find an answer what I want
to clarify, your question is want to collect card detail during payment in iOS. so that my colleague @Sangeeta create the Subscriptions from the backend. - so that guide shares how to collect payment method details on the frontend
is there something else that you need help with which isn't answered by that guide?
unless you tell me the specific issue that you're having, or what the guide doesn't help with or isn't answering, I'm not going to be able to help you
There is no point regarding my issue
let me explain you once again
Firstly I have Intent, ephemeral key, customer. id, publishableKey
then the payment sheet was open
now user enters their card details in payment sheet
after that payment was success
that's it
so how do we get user card details from the frontend, if they enter the details from your payment sheet?
please explain
which Intent are you using? Are you using a PaymentIntent or a SetupIntent?
PaymentIntent
Alright, so if you're using a PaymentIntent, you should have set setup_future_usage:true when creating the PaymentIntent, so that you can reuse the payment method (after successful payment)
You would listen for the payment_intent.succeeded webhook event to know when the PaymentIntent is successful and also to get the corresponding payment_method id to use to create a subscription [2]
[0] https://stripe.com/docs/webhooks
[1] https://stripe.com/docs/api/events/types#event_types-payment_intent.succeeded
[2] https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method
on a side note, you can also list the relevant payment methods on a customer : https://stripe.com/docs/api/payment_methods/customer_list
@burnt gyro Please check from your end and let us know what you get.