Tp개커
Toss payments 개발자 커뮤니티
자동결제 에러 문의 - Toss payments 개발자 커뮤니티
이
Toss payments 개발자 커뮤니티
•
15mo ago
•
16 replies
이동준
자동결제 에러 문의
안
녕
하
세
요
자
동
결
제
창
에
서
{ code
:
'INVALID
_REQUEST
'
, message
:
'
필
수
파
라
미
터
가
누
락
되
었
습
니
다
.
'
}
에
러
가
발
생
되
어
문
의
드
립
니
다
const encryptedSecretKey
=
Basic ${btoa('내api개별연동키에서시크릿키:')}
Basic ${btoa('내api개별연동키에서시크릿키:')}
;
export async function POST
(req
: Request
)
{
try
{
const
{ customKey
, authKey
}
= await req
.json
(
)
;
const response
= await fetch
(
https://api.tosspayments.com/v1/billing/authorizations/issue
https://api.tosspayments.com/v1/billing/authorizations/issue
,
{
method
:
"POST
"
,
headers
:
{
Authorization
: encryptedSecretKey
,
"Content
-Type
"
:
"application
/json
"
,
}
,
body
: JSON
.stringify
(
{
authKey
,
/
/
인
증
키
customKey
,
/
/
고
객
키
}
)
}
)
;
const result
= await response
.json
(
)
;
if
(response
.ok
)
{
return NextResponse
.json
(result
,
{ status
: 200
}
)
;
} else
{
return NextResponse
.json
(result
,
{ status
: response
.status
}
)
;
}
} catch
(error
)
{
console
.error
(
"
E
r
r
o
r
:
"
, error
)
;
return NextResponse
.json
(
{ message
:
"Internal Server Error
"
}
,
{ status
: 500
}
)
;
}
}
customKey
는 db
에
서
생
성
한
고
객 id
값
authKey
는 redirect
페
이
지
이
동
시 params
에
나
오
는 authkey
값
입
니
다
Toss payments 개발자 커뮤니티
Join
Toss payments 개발자 커뮤니티입니다. 결제 연동하며 겪는 기술 문의부터, 결제 시장에 대한 다양한 정보까지 얻어가세요~
16,103
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
자동결제(빌링) 에러 문의
A
APK / ❓┃연동개발-문의
10mo ago
자동결제 NOT_FOUND 에러 문의
이
이유진 / ❓┃연동개발-문의
10mo ago
자동결제 빌링키 발급 요청시 에러 코드 문의
H
hzn / ❓┃연동개발-문의
7mo ago
자동결제 에러 질문
김
김기봉 / ❓┃연동개발-문의
3y ago