#Randomuser2022
1 messages · Page 1 of 1 (latest)
Theoretically yes
thanks, here's the background info about this question. we have a check-out page calling the payment element for customer to check out. So when they input the payment info, be it card, apple pay, google pay, affirm, click [submit] and complete the payment, it'll jump to a url. and with the return_url, we call the Intent retrieval API, it'll display the payment status for the customer, be it success or fail. And now we wonder above the payment methods I mentioned, only affirm is a redirect payment method?And it looks like only a redirect payment method would not be catching errors when clicking [submit], and the payment status only show up after calling the Intent retrieval API? That's my preconceptions.
And so we're looking for a way to test Affirm payment failure. So we look at the logs, and found the parameter last_payment_error.
here's the check-out page
when the invalid card is submitted, it'll stay on the check out page, won't lead to the error page retrieve API leading to.
For card when you call confirmPayment, it should returns back with an error, correct? This code part
if (error) {
// This point will only be reached if there is an immediate error when
// confirming the payment. Show error to your customer (for example, payment
// details incomplete)
const messageContainer = document.querySelector('#error-message');
messageContainer.textContent = error.message;
} else {
// Your customer will be redirected to your `return_url`. For some payment
// methods like iDEAL, your customer will be redirected to an intermediate
// site first to authorize the payment, then redirected to the `return_url`.
}
So you would have the error.message right here, and if you retrieve PaymentIntent you can also see its status
It looks like we need to test the payment error URL instead of the pop-up window when clicking the submit button.
we have tested the card
but for affirm, we'd like to test the payment failure
Sorry I don't really follow the question. So you have a payment_intent.payment_failed event and it says Affirm redirect URL has expired. What is the issue then
no sry this is irrelevant
maybe my question is too complicated. I just want to know, in testing mode, if I click fail authentication, would the payment succeed or not
It should fail and you can test it!
I don't know why in the test mode, the affirm payment used to look like this:
now it looks like this:
it sends the SMS message
Hmm you mean with same step here https://stripe.com/docs/payments/affirm/accept-a-payment?platform=web#web-test-integration the UI changed and there is no button to simulate failed payment anymore?
yes
That's odd... Sorry to hear it.
Hmm I don't have an Affirm integration to quickly try it
Could you write into Support? with screenshot
Yes, select a topic first
sure. and it might be off topic, but we'd like to know how stripe charge for calling tax.calculation API each time. And since Stripe would charge 50¢ per transaction for tax.calculation, would Stripe charge two times for a transaction? we don't have products & price in stripe so we have to use tax.calculation API and we use payment element instead of check-out session.
By use tax caculation API, which part specifically you are referring to?
in this Affirm integration
That worth clarify with Support too. but my understanding is it charges $0.5 per transaction, why would you think it charges twice?
here
Um I think it means you can call up to 10 Tax Calculation API and still be charged $0.5
so it's 0.5 USD per transaction and if the calls counts over 10 times, then it'll add 0.05 per API call?
ooh
Yeah I think that's what it means. Please clarify with Support if you are unclear
and if we want a lower pricing, we could reach out to stripe sales team?
Yeah probably.
ok i have no more questions, thank you!