Error 500 when calling API billing authorize.
Hi support, i pass customerKey, authKey as json and also my header base64 encode with extra :
getting 500 errors. any advise?
36 Replies
3/12 이후에 결제 연동을 해보신 분들을 찾습니다!🔎
제품 발전을 위해 설문에 참여해주세요! 추첨을 통해 선물을 드립니다. (1분 소요)
share me the customerKey you used
ok
2cnelhOan9QpUrlXbIdYSedKn9g1
authKey can't be reusable
meaning?
i only call 1 time
you already get the billingKey from that authKey
then how do i try again?
what are you trying know?
do you know what bililing Key is?
billing/authorization/issues api
Do you know how the recurring system work?
Ya
i authorize 1 time
then charge anytime based on terms
but the thing is i cant even authorize
can advise? appreciate
billing key i cannot get yet
500 error
Let's start from the first step
ok
i request payment window from jsSDK
ya
correct
you call above function right?
yea
after that fill up all information
ok then plz get the whole new authKey tru that function
Yes in test Key it doesnt have to be ful-correct card num. Just check CARD BIN (6-digit from left side)
Yah
it redirect to success page
then i go call api billing authorize
fail
500 error
fetch('https://api.tosspayments.com/v1/billing/authorizations/issue',
{
headers: {
'Content-Type': 'application/json',
'Authorization' : 'Basic '+base64Key
},
method: 'POST',
body: JSON.stringify({
authKey: json.authKey,
customerKey: json.customerKey
})
})
.then(res => res.json())
In the log you already got the billing Key at 13:54 KST
Did you get the brand new authKey?
yah
bln_v2kwEKYYzxX
it still fail 500
anything wrong?
i only call 1 time
but fail
We send you api response with 200 status
I think we need to check if you guys are receiving it well.
no receive ...
just 500 error
Let's check with this api
https://docs.tosspayments.com/reference#카드-혜택-조회
코어 API | 토스페이먼츠 개발자센터
토스페이먼츠 API 엔드포인트(Endpoint)와 객체 정보, 파라미터, 요청 및 응답 예제를 살펴보세요.
can you test that you can get the api response succesfully?
just change the Authorization header to your api key
/v1/promotions/card?
yeah
ok wait
same
500 error
Then you have to check your firewall or timeout setting
방화벽 설정 | 토스페이먼츠 개발자센터
토스페이먼츠 API를 안전하게 사용할 수 있는 방화벽 설정을 알아봅니다.
eh receive
here is the firewall info
13.124.18.147
13.124.108.35
3.36.173.151
3.38.81.32
you have to open above ip
let me try
ok got d
sorry my bad
you are ok now right?
okie...my code issue
thanks for your help
❤️ 기술문의 경험이 어떠셨나요?!
간단히 코멘트 남겨주세요! 제품 발전에 큰 힘이 됩니다.