#ubi
1 messages · Page 1 of 1 (latest)
I don't think you need to pass it after the first time, but there's also no harm in passing it for each subsequent payment
thank you!
Also, if I attach the payment method id, i dont need to attach the customer object, right?!
Stripe.PaymentIntent.create(%{
confirm: true,
amount: tax_calculation.amount_total,
currency: "USD",
metadata: metadata,
# customer: identity.stripe_customer_id,
receipt_email: identity.email,
# error_on_requires_action
payment_method: job.args.payment_method_id,
setup_future_usage: "off_session",
use_stripe_sdk: false
})
notice the commented lines, not sure if I should somehow find the values for those, or if just passing the payment_method is good enough
You'll want to pass the Customer ID every time, but you don't need to pass the Payment Method if it's already attached
What happens if the customer has multiple payment methods? Is that possible?
in that case you would pass the Payment Method
If I do that, do I need to pass the customer then?