error

We're currently trying to resolve an issue where payments are being approved even when using a debit card with no balance. We would appreciate your help in identifying whether there might be a problem in our code that's causing this. Alternatively, could you check if there have been any similar reported cases? Thank you for your support. Here's the Toss Checkout page Toss Payments code. It would be great if Toss Payments team could help us and point out the error (if any), or guide us to resolve the issue.
20 Replies
토스페이먼츠 BOT
⏳ 잠시만 기다려주세요! 곧 답변드리겠습니다
오류 문의일 경우 아래 정보를 미리 전달해주시면, 빠른 답변에 도움이 됩니다.
- 주문번호(orderId) : - 문의 내용 :
(img를 함께 첨부해주시면 도움이됩니다)
* 계약관련 내용은 1544-7772로 문의주세요. * 주말/공휴일에는 답변이 늦을 수 있어요.
주식회사 삶
주식회사 삶OP2w ago
const [price, setPrice] = useState(getDiscountedPrice(type, 0, lang).price); useEffect(() => { const fetchPaymentWidget = async () => { try { const loadedWidget = await loadPaymentWidget(widgetClientKey, customerKey); setPaymentWidget(loadedWidget); } catch (error) { console.error("Error fetching payment widget:", error); } }; fetchPaymentWidget(); }, []); useEffect(() => { if (paymentWidget == null) { return; } const paymentMethodsWidget = paymentWidget.renderPaymentMethods( selector, { value: lang&&lang !== "undefined"?Math.round(price0.006810)/10:(getFinalPrice(type, discountAmount, lang, discountAdditional, setCouponConfirmed).price), currency: lang&&lang !== "undefined"?"USD":"KRW" }, { variantKey: lang&&lang !== "undefined"?"PAYPAL":"DEFAULT" } ); paymentWidget.renderAgreement("#agreement", { variantKey: lang&&lang !== "undefined"?"AGREEMENT":"agreementkr" }); paymentMethodsWidgetRef.current = paymentMethodsWidget; }, [paymentWidget, price]); useEffect(() => { const paymentMethodsWidget = paymentMethodsWidgetRef.current; if (paymentMethodsWidget == null) { return; } paymentMethodsWidget.updateAmount(price); }, [price]); const handlePaymentRequest = async () => { try { await paymentWidget?.requestPayment({ amount: getFinalPrice(type, discountAmount, lang, discountAdditional, setCouponConfirmed).price, orderId: customerKey, orderName: type.toString() + " TEST", customerName: sessionItemPayment.email, customerEmail: sessionItemPayment.email, customerMobilePhone: "01000000000", successUrl: ${configBase.REDIRECT_URL}/pay/toss/${type}/${sessionPaymentUuid}/success, failUrl: ${configBase.REDIRECT_URL}/pay/toss/${type}/${sessionPaymentUuid}/fail, }); } catch (error) { console.error("Error requesting payment:", error); }
Kimoon Lee
Kimoon Lee2w ago
if you are doing a payment with test key, it is a normal case because it is not sent to the card company with the test key.
주식회사 삶
주식회사 삶OP5d ago
Of course not — I think the Toss team misunderstood us. We are using the live keys; otherwise, we wouldn’t be able to receive any payments. The issue is that Toss sometimes redirects users to the successUrl even when the transaction is not successful. One of the cases we identified is when the user has insufficient funds in their bank account or card.
today.lastday
today.lastday5d ago
Please leave the orderId for the case described above and we will check it.
주식회사 삶
주식회사 삶OP5d ago
Thanks in advance, here we have few of them: STC test Transaction ID: tEwQoqBjX--k94Qi5U8KF Datetime: 2025-05-21 19:59:17 Error code: [code : 5030] 해당 결제수단에서 오류가 발생 했습니다.(통장잔액이 결제금액보다 부족합니다. 통장잔액을 확인해 주세요.) SDM Test Transaction ID: TOj3hJfjYzu5OIQKhV-sM Datetime: 2025-05-21 19:43:57 Error code: [code : 5030] 해당 결제수단에서 오류가 발생 했습니다.(통장잔액이 결제금액보다 부족합니다. 통장잔액을 확인해 주세요.) SES Test Transaction ID: pU_oTtApXo6q8mWKyb3e2 Datetime: 2025-05-21 00:01:23 Error code: A8:고객님의 신용카드 한도가 부족하거나, 체크카드인 경우 통장잔액 부족입니다(한도초과 또는 잔액부족)
Minsu Kim
Minsu Kim5d ago
Hi there, For tEwQoqBjX--k94Qi5U8KF and TOj3hJfjYzu5OIQKhV-sM, the error message says: Your bank balance is insufficient to cover the payment amount. Please check your bank balance. For pU_oTtApXo6q8mWKyb3e2, the error message says: Your credit card limit is insufficient, or if it is a check card (debit card), your account balance is insufficient. Please contact your customer to double check if the customer has enough money on their bank account. --------------------
The issue is that Toss sometimes redirects users to the successUrl even when the transaction is not successful.
Yes, because we have 2 process: Authentication and Confirmination Authentication process only checks the card is VALID so even user doesn't have enough money in their bank, but it still redirects to successUrl. This is our spec. Confirmination process checks if the transaction can be executed. So this process checks the bank balance, and if insufficient, rejects the payment.
주식회사 삶
주식회사 삶OP5d ago
Thanks for clarifying. However, the issue is that even when there are errors, Toss still redirects users to the successUrl. How can we fix this so that users are redirected to the failUrl instead?
Minsu Kim
Minsu Kim5d ago
You cannot. Only way you can prevent this problem is just when we throw the error from confirm API, just redirect them to failUrl at that moment or just return the alert page. This is how other merchants integrate our service. This is spec.
주식회사 삶
주식회사 삶OP5d ago
We will check it one more time, however, currently those users are redirected to the successUrl. There would not be issue if the users were forwarded to the failUrl, but it's not the case.
Minsu Kim
Minsu Kim5d ago
So, for the 3 cases you've shared us, it is all releated with insufficient balance. So it redirects to successUrl. We cannot check user has enough bank balance at the authentication process, as card company doesn't let us know if user has insufficient bank balance. So we just redirect them to successUrl, however, when actually transaction executes, card company rejects the request and says "Hey, you know what, the customer has not enough money for this! We will reject this" so it is really based on trial-and-error We tries the payment, if rejected, we forward it to you.
주식회사 삶
주식회사 삶OP5d ago
Could you share the cases where users are redirected to the successUrl even when such errors occur (other than the two cases already mentioned)?
Minsu Kim
Minsu Kim5d ago
Let me check When redirected to failUrl or throws the error to Promise: - User cancels the payment - Card information is not correct or authentication failed - Internal Server Error from Card company side, etc When redirected to successUrl: - Authenticated successfully - If user uses card point, if point balance is insufficient - Bank balance insufficient or card limit insufficient - Installment plan insufficient - Exceeded max daily payment quota - Card is lost or stolen status - Internal Server Error from TossPayments side, etc
주식회사 삶
주식회사 삶OP5d ago
Thanks for letting us know. Could you recommend a sustainable way to resolve this issue, considering that users are still being redirected to the successUrl? It would be ideal if you could suggest a best practice that ensures the user journey remains uninterrupted, while also preventing unsuccessful transactions from being passed to the premium services.
Minsu Kim
Minsu Kim5d ago
Best practice is: When Confirm API is rejected, parse the error message, show the error to the user. I would recommend if you saves the required payment data into the session or other temporary storage, use that to redirect user back to the process so user can retry with other options.
주식회사 삶
주식회사 삶OP5d ago
Do we need to double-check the transaction status every time a user is redirected to the successUrl?
Minsu Kim
Minsu Kim5d ago
Nono, when you call the confirm API, you will immediately know if it failed or succeeded.
주식회사 삶
주식회사 삶OP5d ago
Got it. Thank you very much for your guidance. We'll review this procedure on our end and reach out again if we need further assistance. Thanks again, have a fruitful day!
Minsu Kim
Minsu Kim5d ago
Yeah, should you require any further assistance, please do not hesitate to let us know. This ticket will be closed.
주식회사 삶
주식회사 삶OP5d ago
Thanks!

Did you find this page helpful?