#alexdieudonne_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1275059932005400577
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Yep, our APIs/UIs do not automatically deduplicate cards so the synopsis on that GH issue is correct
You need to handle that manually in your integration by checking the fingerprint of the generated Payment Method object
yes i've check it the fact is when i use the react native paymentsheet it dosn't get me the paymentMethod it just give me an error as resul if there is
hi! I'm taking over this thread.
it just give me an error as resul
what's the exact error you get?
it's not really an error it's when the payment fail etc...
const { error, paymentOption } = await initPaymentSheet({
customerId: user.stripeId,
customerEphemeralKeySecret: ephemeralKey,
paymentIntentClientSecret: clientSecret,
customFlow: true,
applePay: {
merchantCountryCode: 'FR',
}
});
so what's your question? I'm confused.
i get a duplicate card issue when i try to pay and the payment method is stored inside stripe sheet
exactly this
like my colleague said at the very beginning: that's expected. Stripe doesn't do any de-duplication. by default users can add the same card as many time as they want, and it will create a new PaymentMethod.
if you don't want this, you'll have to implement your own logic for this
by using the PaymentMethod fingerprint.
so i need to remove the paymentsheet to implement the stripe element ? since the payment sheet don't give me the paymentMethod object ?
the problem is when i use stripe elements with react native
export interface Details {
last4: string;
expiryMonth: number;
expiryYear: number;
postalCode?: string;
brand: CardBrand;
complete: boolean;
validExpiryDate: ValidationState;
validCVC: ValidationState;
validNumber: ValidationState;
number?: string;
cvc?: string;
}
the result is this, but i need to get an id or something to create a new payment method
I'm not familiar with the PaymentSheet, but it should be possible to achieve this.
one option would be to listen to webhook events to be notified when a new card is saved, and check if that card already exists on your end. and if so, remove it.