#Reyansh Sharma
1 messages · Page 1 of 1 (latest)
Hi there
Did you tried to follow this guide?
https://stripe.com/docs/terminal/features/saving-cards/save-cards-directly
Yes Followed those steps (1,2 & 3)
But not sure how to call confirmSetupIntent through SDK.
Are you using the Server-driven approach ?
Only to create customer & SetupIntent.
Afterward using collectSetupIntentPaymentMethod from terminalJS
For a server-driven integration, your previous call to process_setup_intent handles the confirm for you so nothing else is required.
https://stripe.com/docs/terminal/features/saving-cards/save-cards-directly#submit-payment-method:~:text=For a server-driven integration%2C your,you so nothing else is required.
If you are using the server-driven integration so you don't need to call the confirmSetupIntent method
Why are you mixing two integration ? you should follow single integration from start to end
We are using terminalJS so card specific information will only be available after customers swipe the card. So was planning to use collectSetupIntentPaymentMethod to collect the pyamtnmethod & then confirm it using confirmSetupIntent
Let me check If I can get the READER_ID value from the device and follow the server side integration for step 3 as well.
Between, the confirmSetupIntent is available only for the mobile SDK
So after collectSetupIntentPaymentMethod execution through TerminalJS have to send something from the portal to the backend to handle the response & confirmation so the payment method will be attached to the customer.
Which Terminal SDK/integration are you using?
Version 0.11.2 at the moment. npm package can be found at https://www.npmjs.com/package/@stripe/terminal-js
Are you calling confirmSetupIntent? That will attach the card to the Customer assuming you passed the customer parameter when you created the Setup Intent
Did you mean server side call?
Creating the Setup Intent is a server-side call yes: https://stripe.com/docs/terminal/features/saving-cards/save-cards-directly#create-setupintent
Yes I created the customer first then setupIntent using the customerID
Ok, then you'd call: https://stripe.com/docs/terminal/references/api/js-sdk#collect-setup-intent-payment-method
That will initiate the card flow on the reader, once that resolved you call confirmSetupIntent: https://stripe.com/docs/terminal/references/api/js-sdk#confirm-setup-intent
confirmSetupIntent will attach the card to the customer
Yes returned the ClientSecret from SetupIntent to frontend & called collectSetupIntentPaymentMethod
Not able to find the method at all in there
I mean it's definitely there: https://stripe.com/docs/terminal/references/api/js-sdk#confirm-setup-intent