체크아웃 취소
POST
/api/v1/billing/checkouts/{checkout_id}/cancel
const url = 'https://dev.api.endueos.com/api/v1/billing/checkouts/chk_01J9ZK3Q8M4XW7D2N5R6T0V1BC/cancel';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://dev.api.endueos.com/api/v1/billing/checkouts/chk_01J9ZK3Q8M4XW7D2N5R6T0V1BC/cancel \ --header 'Authorization: Bearer <token>'pending 인 체크아웃을 취소한다. 이미 끝난 체크아웃이면 409 CHECKOUT_STATE_CONFLICT.
paddle 은 Paddle 이 이미 돈을 받았으면 취소하지 않고 완료한다 (409, details.status = completed).
파라미터
섹션 제목: “파라미터”경로 파라미터
섹션 제목: “경로 파라미터”checkout_id
필수
string
예시
chk_01J9ZK3Q8M4XW7D2N5R6T0V1BC200
섹션 제목: “200”성공.
Media typeapplication/json
object
data
필수
충전 한 건. 끝나면(completed) 원장에 topup 이 한 번 붙는다.
object
checkout_id
필수
string
org_id
필수
충전되는 조직 (D-60). 결제가 끝나면 콘솔이 그 조직의 Credit 으로 돌아간다.
string
credits
필수
number format: double
price
필수
number format: double
currency
필수
string
provider
필수
결제 공급자 — mock(콘솔의 테스트 결제) · paddle(Paddle, D-59). 체크아웃을 연 때의 설정을 따른다.
string
status
필수
string
checkout_url
필수
결제 화면의 주소 — 콘솔의 결제 화면. paddle 이면 그 화면이 payment_params 로 Paddle 결제창을 띄운다.
string
payment_params
필수
created_at
필수
string format: date-time
meta
필수
object
request_id
필수
string
timestamp
필수
string format: date-time
duration
서버 처리 시간(ms).
integer format: int32
예시
{ "data": { "checkout_id": "chk_01J9ZK3Q8M4XW7D2N5R6T0V1BC", "org_id": "org_01J9ZK3Q8M4XW7D2N5R6T0V1BC", "provider": "mock", "status": "pending", "payment_params": { "environment": "sandbox" } }}401
섹션 제목: “401”인증이 없거나 무효다 — UNAUTHORIZED. 본문은 오류 봉투.
403
섹션 제목: “403”이 인증 수단으로는 못 하는 일이다 — FORBIDDEN (예: API 키로 클라우드 기기 만들기). 본문은 오류 봉투.
404
섹션 제목: “404”없거나 내 것이 아니다 — *_NOT_FOUND. 본문은 오류 봉투.
409
섹션 제목: “409”지금 상태와 충돌한다 — 코드는 위 설명을 본다. 본문은 오류 봉투.
410
섹션 제목: “410”보관 기간이 지났다 — OUTPUT_EXPIRED. 본문은 오류 봉투.
429
섹션 제목: “429”한도를 넘었다 — Retry-After 초 뒤에 다시. 본문은 오류 봉투.
500
섹션 제목: “500”서버 오류 — INTERNAL_ERROR. 본문은 오류 봉투.
503
섹션 제목: “503”의존 서비스에 닿지 못했다 — 잠시 뒤 다시. 본문은 오류 봉투.