#itsadityap
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- itsadityap, 1 day ago, 14 messages
I don't recommend using Payment Method API as it doesn't save the payment method on the customer.
I'd recommend using save payment method during payment: https://stripe.com/docs/payments/save-during-payment?platform=web
Okay, Is that the case as In docs it says
store instrument details for future payments.
Also , you are suggesting first to create a payment of small amount like $1 using paymentsIntent API and then save the payment method ? Will it ensure that I will be able to charge the user automatically using the same saved payment method ?
Payment Intent API is mainly used if you have a payment to charge, then save the payment method at the same time.
If you only want to save the payment method without charging to the customer, then Setup Intent API should be used in such a case: https://stripe.com/docs/payments/save-and-reuse
Both approaches will allow charging to the customer with Payment Intent API later on
Okay, So I will use setup Intent API to save the payment detail now
"id": "seti_1OCch72x6R10KRrhfIsN1KQD",
"object": "setup_intent",
"application": null,
"automatic_payment_methods": {
"enabled": true
},
"cancellation_reason": null,
"client_secret": "seti_1OCch72x6R10KRrhfIsN1KQD_secret_P0dzDX9e7zwy7Ck0VoRgfNC9LFlf98b",
"created": 1700030125,
"customer": null,
"description": null,
"flow_directions": null,
"last_setup_error": null,
"latest_attempt": null,
"livemode": false,
"mandate": null,
"metadata": {},
"next_action": null,
"on_behalf_of": null,
"payment_method": null,
"payment_method_configuration_details": null,
"payment_method_options": {
"card": {
"mandate_options": null,
"network": null,
"request_three_d_secure": "automatic"
}
},
"payment_method_types": [
"card"
],
"single_use_mandate": null,
"status": "requires_payment_method",
"usage": "off_session"
}```
I will get this response Object so which entity here can be helpful for me to charge the customer. Like How to target my customer which I am charging my customer Using `Payments Intent API`
Have you followed the guide to collect the payment method with Payment Element? From the response here, you only create the Setup Intent, but didn't collect the payment method details
No, I was reading guide for Payments Method Only till now? Could you point me to the specific PageURL for that ?
This is the doc I shared earlier: https://stripe.com/docs/payments/save-and-reuse?platform=web&ui=elements
Okay, So Once I setup the Card and save card using Payment element which will be the unique Identifier which I will get I can use in payments Intent API to charge that particular customer ?
Like what should I pass in here , other than amount?
const stripe = ;
const paymentIntent = await stripe.paymentIntents.create({
amount: 2000,
});
I am sorry to be this specific, but I have tight deadline so a little help would be really helpful, it will help me meeting my deadline. In the mean time I am going thorough the docs and understanding the flow.
Please do not share the secret key in this public channel. Have you checked the Step 7 of the doc that mentioned the fields to set in the Payment Intent API request: https://stripe.com/docs/payments/save-and-reuse?platform=web&ui=elements#charge-saved-payment-method
Thank a lot @tawdry valve , I am going through that, you can close this thread if you want