#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, 6 hours ago, 18 messages
- jitendra6425, 9 hours ago, 14 messages
https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=payment#create-pm
as per your suggesstion i am trying to use this method.
here i have created customr and take payment but after payment i see payment method created but it's not attached to that customer.
how can i attach this payment method before or after creating payement intent?
To attach the payment method to customer, you'd need to use a SetupIntent
if you're trying to create a payment method and attach it, then this guide/flow might be a better fit
https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=setup#create-customer
So in this case first i have to create setup intent and then i have to call payment intent to take payment?
ah sorry, I think I misunderstood your ask.
Since you're trying to charge the payment method at the same time, you can pass setup_future_usage: off_session parameter when you create the PaymentIntent
That should attach the payment method to the customer
The provided setup_future_usage (off_session) does not match the expected setup_future_usage (null). Try confirming with a Payment Intent that is configured to use the same parameters as Stripe Elements.
below is my payment intent object
{ description: 'Payment for this year', amount : 200, currency: 'eur', customer: customer.id, transfer_data: { amount: 200, destination: 'dewt account id', }, automatic_payment_methods: {enabled: true}, setup_future_usage: 'off_session' }
You'd need to set SetupFutureUsage on elements too
https://stripe.com/docs/js/elements_object/create_without_intent#stripe_elements_no_intent-options-setupFutureUsage
in this case it's showing message on screen and it may be gave wrong info to my customers
By providing your card information, you allow Yachtsman euromarine to charge your card for future payments in accordance with their terms.
That is what setup_future_usage: off_session means, that you are saving their card to be charged in future
even if i not save payment method Stripe creates payment method to take payment right?