#jitendra6425
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.
- jitendra6425, 11 hours ago, 14 messages
- jitendra6425, 18 hours ago, 18 messages
- jitendra6425, 21 hours ago, 14 messages
hello! we'd prefer to start a new thread. How can I help?
https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=payment#create-pm
i am using this method to take payments
i am also saving user card details for future usages.
now suppose next year customer try to pay how can i make sure the card details he is entering is already save with us in Stripe?
i want to avoid duplicate payment method
i have check one video on youtube but they suggest to create payment method first
how i can do it, when user click on submit button?
For your use case, after you create a payment method, you can probably check the card fingerprint. You could list out the attached card fingerprints for the customer, if you find one that's the same, you would use the already attached payment method instead.
personally, I think i would approach this differently - I would display a list of existing payment methods for the customer to choose from and make payment. If they do decide to key in the same card (details) again to make payment, that's fine and up to the customer. Similarly, I would allow the customer to delete (detach a existing payment method).
I am not creating payment method, it will automatically created by Stripe if i set off_session for future usage.
about your approach i can't implement it because i don't have my customer details until customer click on submit payment button, i don't have any login for customer. they can checkout without login into my system. once they click on submit then based on data saved in my system i am checking this is firsttime user or making second payments
there's no way to prevent creating a new Payment Method if you set setup_future_usage and collect the card details.
You would want to require a customer to login / register prior to making payment. If they don't register/login prior to payment, then they should be considered as a one-time payment and I wouldn't bother saving their payment method details or checking if it already exists.
ok, let me know how can i create payment method using above implement method?
so first i will create payment method and i will check fingerprint manually and if it's matched then i will delete newly created method and take payment from old method which fingerprint matched.
you can follow the steps listed mentioned : https://stripe.com/docs/payments/build-a-two-step-confirmation. At step 5, when you receive the payment method id in your server, you can implement the necessary logic to check the fingerprint
it will work for both card and sepa?
theoretically yes, i reccomend testing it out to make sure it works as expected
ok, now how can i take mandate from customer for SEPA future usage?
If you're using the Payment Element, and pass in setup_for_future usage, the mandate should automatically be generate/created and you don't need to do anything additional
wow.
but in that case, what if i want to store customer bank details into my database?
can you elaborate more on why you would want to do so?
suppose if we are using multiple payment gateway like otherthan stripe then i need those bank details.
sometime we are direct taking bank details from customer on call and initiate SEPA manually
For SEPA, you can collect the bank details yourself instead of using Stripe elements and save them in your database. Upon making the payment, those bank details can be submitted to the payment intent: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_data-sepa_debit
If the SEPA information is collected through Stripe elements, raw bank details will not be returned
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Payment method information collected using Stripe elements will only stay within Stripe that raw data will not be returned
by default sepa asking for many address relared fiedls how can i remove few fields from form?
and how can i set default value to stripe form, for example customer email and address line 1 i want prefill then how can i do?
by default sepa asking for many address relared fiedls how can i remove few fields from form?
If the address has been collected, address fields can be disabled withfields.billingDetails.addresstonever, then manually pass the self-collected address when confirming the payment. Billing address is required for IBANs with the country codes AD, PF, TF, GI, GB, GG, VA, IM, JE, MC, NC, BL, PM, SM, CH, and WF [0]
and how can i set default value to stripe form, for example customer email and address line 1 i want prefill then how can i do?
Pre-filling the Payment Element can be done viadefaultValues.billingDetailsat Payment Element creation: https://stripe.com/docs/js/elements_object/create_payment_element#payment_element_create-options-defaultValues-billingDetails
is there any way manually we can ask for mandate to customer?
Asking mandate manually is only possible on individual element integration, i.e. not through Payment Element. Here's the guide how you can do so with direct SEPA integration for manual mandate collection: https://stripe.com/docs/payments/sepa-debit/accept-a-payment?platform=web&ui=element
https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=payment#create-pm
i am using this method for payment, here i don't have stripe.js so how can i hide address details and pass default values?
When you reach step, Payment Element in Stripe.js should have been rendered. The fields I mentioned above should be set in the options of Payment Element creation. For example,
options = {
...
}
const paymentElement = elements.create('payment', options);
perfect it's working fine. thank you
No problem! Happy to help 😄
stripe.paymentMethods can i delete payment method using this api?
stripe.paymentMethods.delete
A payment method can only be detached from the customer, but not deleted: https://stripe.com/docs/api/payment_methods/detach
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
so if any payment method i created and didn't attach with any customer it will remain as it is on Stripe?
Yes
actually to avoid duplicate payment method now i am checking newly created payment methods with customer existing methods and if any fingerprint match then i want to delete newly created method
If the payment method has been attached to the customer, detaching payment method API can be used as mentioned earlier: https://stripe.com/docs/api/payment_methods/detach
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
A payment method can't be deleted
ok
is there any way i can get indication of Payment form is loaded? i am using below method so "Submit" button visible first on screen and after 3-5 second actual payment form is load from Stripe. so until stripe form is not visible i also want to hide by "Submit payment" button
https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=payment#create-pm