#Emil Saghatelyann-billing-details

1 messages · Page 1 of 1 (latest)

sinful aurora
#

Hey! You're liking using the Payment Methods API (which is new) as opposed to Cards which is old and mostly deprecated

#

How are you integrating? Payment Element? Checkout?

viral trail
#

from client side I am using 'js.stripe.com/v3/' . creating stripe card element from there. then attache saved card response (source) to customer

sinful aurora
#

Can you share your JS code please

viral trail
#

const elements = this.stripe.elements();
this.stripeCard = elements.create('card');
this.stripeCard.mount(this.cardElement.nativeElement);
this.stripeCard.addEventListener('change', ({error}) => {
this.cardErrorMessage = error && error.message;
});

sinful aurora
#

Are you using Payment Intents with confirmCardPayment?

viral trail
#

I am creating card form client side, then pass it(source) backend to create Customer

#

then i create Subscription for created custommer

wispy ocean
#

fair enough!

#

well you shouldn't use Sources, they are legacy. If you're going to use this approach, you should use PaymentMethods, that's the current API used for storing card and billing infromation.