#donjaland-methods

1 messages · Page 1 of 1 (latest)

viral notch
#

it would depend, some payment methods might not be compatible with the type of payment you're doing. For example Giropay can't be saved so if your PaymentIntent uses setup_future_usage it won't appear. CB is just a credit card, it's not shown explicitly separately from the normal card form. Apple Pay only appears if you're in Safari on a device that has an active Apple Pay card in the Wallet app.

lost yoke
#

aha - so setup_future_usage actually filters it...

#

is there any way to not filter it?

#

like I want to accept payments, and if I can save it for recurring payments: great. If not, we have logic in place that will alert the customer to submit payment lmanually already

#

basically what we do is:
1/ user can pay
2/ we try to setup for future usage when possible
3/ next renewals and/or invoices will be attempted to be auto-charged, with a fallback to sending a payment submission invite to the customer if we have no payment method on file for automatically processing it.

#

so I don't really want to need to make the decision upfront... Just setup for future usage when possible. (also will give you the ability to display it in te new payment elements...)

viral notch
#
const paymentIntent = await stripe.paymentIntents.create({
    amount: calculateOrderAmount(items),
    currency: "eur", customer:customer.id,
    payment_method_options:{card:{setup_future_usage:"off_session"}},
    automatic_payment_methods: {enabled: true}
  });

seems like it works, since iDEAL is not something that can be saved, but I can still pay with it here since I'm only specifying to save cards and nothing else. I think that works for your use case.

lost yoke
#

alright - will have a go at it

viral notch
lost yoke
#

I'm still not seeing giropay

viral notch
#

can you share the PaymentIntent ID pi_xxx?

viral notch
#

@lost yoke just wanted to check in since I was going to step away from Discord soon, one of my colleagues can take over but if you have the ID I can try to help with this one since I have the context