메인 콘텐츠로 건너뛰기
POST
인보이스 결제 요청

인증

Authorization
string
header
필수

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

헤더

TossPayments-Test-Code
string

test 모드에서만 받는다. 값을 그대로 토스페이먼츠에 넘겨 실패 응답을 재현한다. 빈 값은 보내지 않은 것으로 본다.

경로 매개변수

id
string<uuid>
필수

결제할 인보이스의 id.

응답

결제 시도. status는 done, failed, pending 중 하나

amount
integer<int64>
completed_at
string<date-time>
failure_code
string

failed일 때만 있다. 토스페이먼츠가 준 값: 승인 거절 코드(예: REJECT_CARD_COMPANY), 또는 주문 조회로 확인한 결제 상태 ABORTED, EXPIRED. MeterEngine이 정한 값: HTTP_<상태>(토스페이먼츠 거절 응답에 코드가 없을 때 그 HTTP 상태), NOT_FOUND_PAYMENT(결제를 요청하고 payment.not-found-failure-delay(기본 10분)가 지나도 토스페이먼츠 주문 조회가 404 NOT_FOUND_PAYMENT일 때. 토스페이먼츠 조회 오류 코드와 이름이 같지만 결제 거절이 아니라 MeterEngine의 판정이다), toss_payments_credential_missing(토스페이먼츠를 부르기 전에 결제 모드의 키가 없었다), payment_method_missing(토스페이먼츠를 부르기 전에 결제 모드의 카드가 없었다).

failure_message
string

failed일 때만 있다. 토스페이먼츠가 준 거절 문구이거나, failure_code가 MeterEngine 코드면 그 오류 문구다

id
string<uuid>
invoice_id
string<uuid>
mode
enum<string>

결제한 결제 모드. test 또는 live

사용 가능한 옵션:
test,
live
payment_key
string

토스페이먼츠가 승인한 결제의 키. done일 때만 있다

requested_at
string<date-time>
status
enum<string>

pending은 토스페이먼츠 결과를 아직 확인하지 못한 시도다

사용 가능한 옵션:
pending,
done,
failed