#Sangeeta

1 messages · Page 1 of 1 (latest)

green birchBOT
lament trail
burnt gyro
#

But we don't add in backend functionality through api ?

#

in node js

lament trail
#

what do you mean by backend functionality?

burnt gyro
#

means to say how we manage in api

#

when we create the subscription so we need the card details

lament trail
#

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

hollow pilot
#

Hi @lament trail

#

How do we collect card details from frontend if we use a default stripe payment sheet?

lament trail
hollow pilot
#

I'll check and let u know. thanks!

#

@lament trail, I haven't seen any topic regarding our issue

lament trail
#

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.

hollow pilot
#

yes @lament trail

#

??

lament trail
hollow pilot
#

let me check

#

Didn't get any result

#

the things which was mentioned are already do from my side

lament trail
#

what does didn't get any result mean?

hollow pilot
#

I mean I haven't find an answer what I want

lament trail
#

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

hollow pilot
#

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

lament trail
#

which Intent are you using? Are you using a PaymentIntent or a SetupIntent?

hollow pilot
#

@burnt gyro please

#

reply

burnt gyro
#

PaymentIntent

lament trail
#

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

hollow pilot
#

@burnt gyro Please check from your end and let us know what you get.