#JosePersichini

1 messages · Page 1 of 1 (latest)

oblique mirageBOT
jovial zodiac
#

No, the Payment Intents API is backwards compatible with cards, but the Charge API cannot be used with Payment Methods

acoustic acorn
#

And is there a way to create a Card ID using a PAyment Method ID?

#

or better said, to get the corresponding card ID for that payment method ID

jovial zodiac
#

Unfortunately not, for similar reasons. We can interpret a card "as a payment method" to use it with the newer API, but not the other way around.

#

Can you explain the use case or need here?

#

What are you trying to accomplish?

acoustic acorn
#

We are integrating stripe in our new software, which uses Payment Methods... but the piece of code which made the charges is using charge API and we can't change it very quickly

jovial zodiac
#

Gotcha -- well if the payment details collection is using payment methods (as it should!) then your payment flow will need to use payment intents to accept those payment methods

acoustic acorn
#

Yes, better

jovial zodiac
#

Can you share the details of how you're creating the payment methods currently?

#

ie, snippets of your stripe.js usage

acoustic acorn
#

<PaymentElement options={{ wallets: { applePay: 'never', googlePay: 'never' } }} />

#

const { error } = await stripe.confirmSetup({
elements,
redirect: 'if_required',
});

jovial zodiac
#

Can you explain how you ended up with an upgrade to the Payment Element, but not using Payment Intents? Payment Element is only designed to work with intents (payment and setup).

#

Ok so you're already using setup intents?

#

And then you get these payment methods from the successful setup intent?

acoustic acorn
#

Because we wanted to use the most modern approach

#

but now we figured out that we need backwards compatibility with charges API

oblique mirageBOT
jovial zodiac
#

As far as I am aware, this won't be possible with the payment element. It's possible to create cards (via tokens) using earlier elements like Card Element, but this is deprecated and not recommended any longer.

#

It's great that you're using payment element! It will let you add other payment method types very easily in future

#

But you will need to change your payment flow to use payment intents to pay with these