#munjay_api

1 messages ¡ Page 1 of 1 (latest)

edgy havenBOT
#

👋 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.

marsh ether
#

what is the difference?
One is a PM of type: 'link' the other is of type: '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

spice slate
#

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"

marsh ether
spice slate
#

req_s8EidWJQEi6qkF

#

its on test mode

marsh ether
#

I'm guessing you're using confirmCardPayment?

spice slate
#

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());
marsh ether
spice slate
#

sorry, i dont really understand

#

we are not using confirm card payment on the frontend

#

we send all payment requests to our backend

marsh ether
#

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

spice slate
#

right

#

i see

marsh ether
#

That was confirmed with a PM of type: 'link' so struggling to understand the problem

spice slate
#

so how comes it succeeds when called from the backend, but fails from the frontend

marsh ether
spice slate
#

ah i apologise

#

you are correct

#

so what should the correct function call be?

marsh ether
#

Use this method instead:

   confirmParams: {
    return_url '...',
    payment_method: 'pm_xxx'
  }
})
spice slate
#

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

marsh ether
#

Yep, confirmPayment is PM type agnostic

spice slate
#

thank you, it works

#

I really appreciate the help!

marsh ether
#

No problem, glad I could help!