#munjay_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/1374661395068616743
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
what is the difference?
One is a PM oftype: 'link'the other is oftype: 'card'. Depending on where the payment is made, the customer may use a different 'mode' of Link
what is the best way to handle link wallet payments
What specifically is the issue? There shouldn't really be any special handling needed
well the issue is that when we received a setup_intent.succeeds for payment_type='link'
and try to confirm it via our existing flow, we had to provide a mandate
and now, if the card attached to that link wallet requires 3ds, it throws this error:
"message": "The type of the provided Source (pm_1RPO8RDVO7ktfsmEgccxqqzh) is link. This does not match the expected type card. Try confirming with a Source of type card."
"type": "invalid_request_error"
What's the req_xxx ID of this request?
I'm guessing you're using confirmCardPayment?
its happening on our backend (using stripe-java 28.2.0)
PaymentIntentConfirmParams.Builder confirmParams = PaymentIntentConfirmParams.builder();
if (lesson.getPupil().getCardType() == CardType.LINK) {
log.info("Link card detected, attaching mandate");
confirmParams.setMandate(lesson.getPupil().getStripeMandateId());
}
paymentIntent = paymentIntent.confirm(confirmParams.build());
https://dashboard.stripe.com/test/logs/req_s8EidWJQEi6qkF is made by Stripe.js, not your backend code
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
sorry, i dont really understand
we are not using confirm card payment on the frontend
we send all payment requests to our backend
That request you shared is not initilised from a backend. You can see from the user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36
I'm trying to help you fix the request you shared. The backend code is irrelevant in that scenario as it was initialised via the front-end
right
i see
so this is the confirm payment that succeeded
https://dashboard.stripe.com/test/logs/req_GtkV2Rpbp3vDPA
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
That was confirmed with a PM of type: 'link' so struggling to understand the problem
so how comes it succeeds when called from the backend, but fails from the frontend
Because you're using confirmCardPayment which only supports type: 'card'
Use this method instead:
confirmParams: {
return_url '...',
payment_method: 'pm_xxx'
}
})
and this shouldn't affect the pre-existing flow right? i.e. any cards that were confirmed using confirmCardPayment can still be confirmed by confirmPayment
Yep, confirmPayment is PM type agnostic
No problem, glad I could help!