본문 바로가기
정산조회 API

판매대금 정산조회 API

Description
[POST] https://sa2.esmplus.com/account/v1/settle/getsettleorder
판매대금 정산데이터를 조회합니다.
환불된 주문 건의 금액은 정상 송금된 주문 건 금액의 반대 부호로 내려갑니다.

 

Request Description

항목 항목명 필수여부 Type Description
SiteType 사이트구분 Y string 조회하고자 하는 사이트 구분

A : 옥션
G : G마켓
ContrNo 주문번호   long 조회하고자 하는 주문번호 입력
정산데이터에서는 OrderNo 대신 ContrNo가 주문번호임
SrchType 기간검색 구분 Y string D1 : 입금확인일 -정상
D2 : 배송일 -정상
D3 : 배송완료일 -정상
D4 : 구매결정일 -정상
D5 : 정산예정일
D6 : 송금일(당일데이터는 영업일 기준 D+1일 조회가능함)
D7 : 환불일 -환불
D8 : 입금확인일+환불일(지마켓), 송금일 + 송금취소일 (옥션)
D9 : 배송완료일(옥션은 매출기준일) + 배송완료일 있는 환불일
SrchStartDate 조회기준 시작일 Y Date YYYY-MM-DD 형태
SrchEndDate 조회기준 종료일 Y Date YYYY-MM-DD 형태
PageNo 페이지번호 Y int  
PageRowCnt 1Page Max Y int  
JSON
{
   "SiteType":"string",
   "SrchType":"string",
   "SrchStartDate":"2019-04-12T00:43:11.854Z",
   "SrchEndDate":"2019-04-12T00:43:11.854Z",
   "ContrNo":0,
   "PageNo":0,
   "PageRowCnt":0
}

 

Response Description

항목 항목명 Type Description
ResultCode 결과 int 성공 : Success
실패 : Error Massage 참고
Message 메시지 stirng  
SiteType 사이트구분 string A : 옥션
G : G마켓
TotalCount 총건수 int 조회된 총 건수
PageSize 페이지사이즈 int  
PageNo 페이지번호 int  
Data > PackNo 장바구니번호 int 정산데이터에서 장바구니 번호는 PackNo임
Data > ContrNo 주문번호 int 정산데이터에서 주문번호는 ContrNo임
Data > GoodsNo ESM상품번호 string null로만 내려감(추후 적용예정)
Data > SiteGoodsNo 사이트상품번호 string 주문 G마켓 or 옥션 상품번호
Data > OrderDate 주문일자 Date  
Data > PayDate 결제일자 Date  
Data > ShippingDate 발송일자 Date  
Data > ShippingCmplDate 배송완료일자 Date  
Data > BuyDecisonDate 구매결정일자 Date  
Data > RevenueBaseDate 매출기준일자 Date - 정상 건일 경우 배송완료일
- 환불 건일 경우 환불일과 동일
※ 옥션 주문 경우 배송완료일과 차이 발생할 수 있음
(배송 송장 Tracking과 판매자가 배송완료 처리한 일자 차이 발생으로 정산월 넘어갈 경우 주문번호 당월에 정산해주기 위함)
값이 없으면 "0001-01-01T00:00:00" 로 내려감
Data > SettleExpectDate 정산예정일자 Date  
Data > SettleExceptName 정산보류사유 string 1991-01-01 장기미배송
1988-01-01 정산서류 미제출
1998-01-01 지급보류(정산중지)
1999-01-01 취소/반품진행
1997-01-01 이벤트경품
1990-12-31 배송중취소
1999-01-01 환불미결정
1993-01-01 미수취신고
1992-01-01 벤더
1800-01-01 일반미정산
Data > RemitDate 송금일자 Date  
Data > RefundDate 환불일자 Date  
Data > SettleType 정산방식 string A : 계좌
B : 판매예치금
C : 판매예치금선차감
D : 조기정산예치금
S : 스마일캐시
Data > OrderUnitPrice 판매단가 number  
Data > OrderQty 주문수량 number  
Data > SellOrderPrice 주문금액 number  
Data > OptionPrice 옵션금액 number  
Data > GoodsCost 공급원가 number  
Data > OptionCost 옵션공급원가 number  
Data > BasicCommission 기본이용료 number 사이트 즉시할인 전 수수료금액
Data > OptionCommission 옵션이용료 number 필수옵션 + 추가옵션
Data > DeductTaxPrice 기타이용료 number 공제환급금
판매자할인 및 옵션 추가금액 이용료 제외한 나머지 금액 이용료

- 해외판매 대행 이용료(G마켓 전용)
- 제휴 프로모션 대행 서비스 이용료
- 지원할인(사이트 즉시할인) 이용료
Data > TotCommission 이용료총액 number  
Data > DeductNontaxPrice 공제환급금 number 옥션 - 판매자쿠폰수수료/복수구매할인수수료
Data > SettlementPrice 정산예정금액/송금액 number 판매금액 + 옵션금액 - 수수료 - 공제환급금
Data > ServiceFee 서비스이용료 number 수수료 - 사이트즉시할인
Data > CorpDiscountTotalPrice 사이트 할인총액 number 사이트 즉시할인 + 할인초과금
Data > OverProfitDiscountPrice 사이트 할인초과금 number  
Data > FeeDiscountPrice 사이트 이용료할인 number 사이트 즉시할인
Data > SellerDiscountTotalPrice 판매자할인총액 number  
Data > BuyerPayAmt 구매자결제금 number 판매금액 + 옵션 - 판매자할인총액 - 사이트할인총액
Data > BranchPrice 지점추가금 number 당일배송 서비스 주문 건일 경우 내려감
Data > BranchCode 지점코드 number 당일배송 서비스 주문 건일 경우 내려감
Data > TaxYn 과세구분 int 0 : 과세
1 : 면세
2 : 영세
8 : 영세
9 : 영세
Data > SellerDiscountPrice1 판매자할인금액1 number  
Data > SellerDiscountPrice2 판매자할인금액2 number  
Data > SellerDiscountPrice1+2 판매자할인금액1+2 number  
Data > SellerPcsFee 제휴사프로모션이용료 number 가격비교사이트 통한 주문 경우
Data > CancelAfterRemitYN (옥션) 거래완료 후 환불
(송금 후 취소) 여부
string Y : 거래완료 후 환불 (송금 후 취소)
N : 정상
Data > DelFeeOverseaAmt 해외배송비 number  
Data > Kind 주문구분 number 1 : 원주문
2 : 환불
Details 에러상세 string 에러 발생 시 상세 사유

JSON_Success

{
  "TotalCount":0,
  "PageSize":0,
  "PageNo":0,
  "Data":[
   {
    "PackNo":0,
    "ContrNo":0,
    "GoodsNo":"string",
    "SiteGoodsNo":"string",
    "OrderDate":"2019-04-12T00:43:11.935Z",
    "PayDate":"2019-04-12T00:43:11.935Z",
    "ShippingDate":"2019-04-12T00:43:11.935Z",
    "ShippingCmplDate":"2019-04-12T00:43:11.935Z",
    "BuyDecisonDate":"2019-04-12T00:43:11.935Z",
    "RevenueBaseDate":"2019-04-12T00:43:11.935Z",
    "SettleExpectDate":"2019-04-12T00:43:11.935Z",
    "SettleExceptName":"string",
    "RemitDate":"2019-04-12T00:43:11.935Z",
    "RefundDate":"2019-04-12T00:43:11.935Z",
    "SettleType":"string",
    "OrderUnitPrice":0,
    "OrderQty":0,
    "SellOrderPrice":0,
    "OptionPrice":0,
    "GoodsCost":0,
    "OptionCost":0,
    "BasicCommission":0,
    "OptionCommission":0,
    "DeductTaxPrice":0,
    "TotCommission":0,
    "DeductNontaxPrice":0,
    "SettlementPrice":0,
    "ServiceFee":0,
    "CorpDiscountTotalPrice":0,
    "OverProfitDiscountPrice":0,
    "FeeDiscountPrice":0,
    "SellerDiscountTotalPrice":0,
    "BuyerPayAmt":0,
    "BranchPrice":0,
    "BranchCode":0,
    "TaxYn":0,
    "SellerDiscountPrice1":0,
    "SellerDiscountPrice2":0,
    "SellerDiscountPrice":0,
    "SellerPcsFee":0,
    "CancelAfterRemitYN":"string",
    "DelFeeOverseaAmt":0,
    "Kind":"string"
    }
  ],
    "SiteType":"string",
    "ResultCode":0,
    "Message":"string",
    "Details":{
  }
}

Sample Code_Success

지마켓
{
"TotalCount":2,
"PageSize":0,
"PageNo":1,
"Data":[
  {
   "PackNo":4429704879,
   "ContrNo":2907695147,
   "GoodsNo":"",
   "SiteGoodsNo":"1543249123",
   "OrderDate":"2019-02-13T11:49:33.58",
   "PayDate":"2019-02-13T11:49:44.943",
   "ShippingDate":"2019-02-13T17:12:01",
   "ShippingCmplDate":"2019-02-13T17:19:05.307",
   "BuyDecisonDate":"2019-02-13T17:19:05.31",
   "RevenueBaseDate":"2019-04-10T03:00:09.923",
   "SettleExpectDate":"2019-04-11T00:00:00",
   "SettleExceptName":"",
   "RemitDate":"2019-04-11T00:00:00",
   "RefundDate":"2019-04-10T03:00:09.923",
   "SettleType":"B",
   "OrderUnitPrice":-26000.0000,
   "OrderQty":-1,
   "SellOrderPrice":-26000.0000,
   "OptionPrice":0.0000,
   "GoodsCost":-24180.0000,
   "OptionCost":0.0000,
   "BasicCommission":1820.0000,
   "OptionCommission":0.0000,
   "DeductTaxPrice":0.0000,
   "TotCommission":1820.0000,
   "DeductNontaxPrice":2600.0000,
   "SettlementPrice":-21580.0000,
   "ServiceFee":-2610.0000,
   "CorpDiscountTotalPrice":-4430.0000,
   "OverProfitDiscountPrice":0.0000,
   "FeeDiscountPrice":-4430.0000,
   "SellerDiscountTotalPrice":-2600.0000,
   "BuyerPayAmt":-18970.0000,
   "BranchPrice":0.0000,
   "BranchCode":0,
   "TaxYn":0,
   "SellerDiscountPrice1":-2600.0000,
   "SellerDiscountPrice2":0.0000,
   "SellerDiscountPrice":-2600.0000,
   "SellerPcsFee":0.0000,
   "DelFeeOverseaAmt":0.0000,
   "Kind":"2"
  },
  {
   "PackNo":4442049433,
   "ContrNo":2927115850,
   "GoodsNo":"",
   "SiteGoodsNo":"1557100123",
   "OrderDate":"2019-03-14T08:23:58.51",
   "PayDate":"2019-03-14T08:24:00.947",
   "ShippingDate":"2019-03-15T16:05:46",
   "ShippingCmplDate":"2019-03-15T16:07:33.28",
   "BuyDecisonDate":"2019-03-15T16:07:33.283",
   "RevenueBaseDate":"2019-03-15T16:07:33.28",
   "SettleExpectDate":"2019-04-11T00:00:00",
   "SettleExceptName":"",
   "RemitDate":"2019-04-11T00:00:00",
   "RefundDate":"0001-01-01T00:00:00",
   "SettleType":"B",
   "OrderUnitPrice":19000.0000,
   "OrderQty":1,
   "SellOrderPrice":19000.0000,
   "OptionPrice":0.0000,
   "GoodsCost":17670.0000,
   "OptionCost":0.0000,
   "BasicCommission":-1330.0000,
   "OptionCommission":0.0000,
   "DeductTaxPrice":0.0000,
   "TotCommission":-1330.0000,
   "DeductNontaxPrice":-1900.0000,
   "SettlementPrice":15770.0000,
   "ServiceFee":-300.0000,
   "CorpDiscountTotalPrice":1030.0000,
   "OverProfitDiscountPrice":0.0000,
   "FeeDiscountPrice":1030.0000,
   "SellerDiscountTotalPrice":1900.0000,
   "BuyerPayAmt":16070.0000,
   "BranchPrice":0.0000,
   "BranchCode":0,
   "TaxYn":0,
   "SellerDiscountPrice1":1900.0000,
   "SellerDiscountPrice2":0.0000,
   "SellerDiscountPrice":1900.0000,
   "SellerPcsFee":0.0000,
   "DelFeeOverseaAmt":0.0000,
   "Kind":"1"
  }
],
  "SiteType":"G",
  "ResultCode":0,
  "Message":""
}
}

옥션
{
   "TotalCount":2,
   "PageSize":0,
   "PageNo":1,
   "Data":[
    {
     "PackNo":1185552603,
    "ContrNo":1578906368,
    "SiteGoodsNo":"B638977123",
    "OrderDate":"2019-03-13T23:58:00",
    "PayDate":"2019-03-13T23:58:00",
    "ShippingDate":"2019-03-14T13:36:00",
    "ShippingCmplDate":"2019-03-14T13:36:07.693",
    "BuyDecisonDate":"2019-04-11T03:26:00",
    "RevenueBaseDate":"2019-03-14T00:00:00",
    "SettleExpectDate":"0001-01-01T00:00:00",
    "RemitDate":"2019-04-11T03:26:00",
    "RefundDate":"0001-01-01T00:00:00",
    "SettleType":"B",
    "OrderUnitPrice":49900.0,
    "OrderQty":1,
    "SellOrderPrice":49900.0,
    "OptionPrice":0.0,
    "GoodsCost":46407.0,
    "OptionCost":0.0,
    "BasicCommission":3493.0,
    "OptionCommission":0.0,
    "DeductTaxPrice":0.0,
    "TotCommission":3493.0,
    "DeductNontaxPrice":7480.0,
    "SettlementPrice":38927.0,
    "ServiceFee":0.0,
    "CorpDiscountTotalPrice":7970.0,
    "OverProfitDiscountPrice":4477.0,
    "FeeDiscountPrice":3493.0,
    "SellerDiscountTotalPrice":7480.0,
    "BuyerPayAmt":34450.0,
    "BranchPrice":0.0,
    "BranchCode":0,
    "TaxYn":0,
    "SellerDiscountPrice1":0.0,
    "SellerDiscountPrice2":0.0,
    "SellerDiscountPrice":0.0,
    "SellerPcsFee":0.0,
    "CancelAfterRemitYN":"N",
    "DelFeeOverseaAmt":0.0,
    "Kind":"1"
   },
   {
    "PackNo":1185611999,
    "ContrNo":1578995112,
    "SiteGoodsNo":"B621613123",
    "OrderDate":"2019-03-14T09:43:00",
    "PayDate":"2019-03-14T09:43:00",
    "ShippingDate":"2019-04-03T09:12:00",
    "ShippingCmplDate":"2019-04-03T09:11:48.34",
    "BuyDecisonDate":"2019-04-11T04:12:00",
    "RevenueBaseDate":"2019-04-03T00:00:00",
    "SettleExpectDate":"0001-01-01T00:00:00",
    "RemitDate":"2019-04-11T04:12:00",
    "RefundDate":"0001-01-01T00:00:00",
    "SettleType":"B",
    "OrderUnitPrice":1999000.0,
    "OrderQty":1,
    "SellOrderPrice":1999000.0,
    "OptionPrice":0.0,
    "GoodsCost":1859070.0,
    "OptionCost":0.0,
    "BasicCommission":139930.0,
    "OptionCommission":0.0,
    "DeductTaxPrice":0.0,
    "TotCommission":139930.0,
    "DeductNontaxPrice":199900.0,
    "SettlementPrice":1659170.0,
    "ServiceFee":14990.0,
    "CorpDiscountTotalPrice":124940.0,
    "OverProfitDiscountPrice":0.0,
    "FeeDiscountPrice":124940.0,
    "SellerDiscountTotalPrice":199900.0,
    "BuyerPayAmt":1674160.0,
    "BranchPrice":0.0,
    "BranchCode":0,
    "TaxYn":0,
    "SellerDiscountPrice1":0.0,
    "SellerDiscountPrice2":0.0,
    "SellerDiscountPrice":0.0,
    "SellerPcsFee":0.0,
    "CancelAfterRemitYN":"N",
    "DelFeeOverseaAmt":0.0,
    "Kind":"1"
   }
  ],
"SiteType":"A",
"ResultCode":0,
"Message":""
}

Sample Code_Fail

{
  "ResultCode":414,
  "Message":"The request failed bacause code could not be found.",
  "Details":"실행 제한 시간을 초과했습니다. 작업이 완료되기 전에 실행 제한 시간이 지났거나 서버가 응답하지 않습니다."
}

 

'정산조회 API' 카테고리의 다른 글

배송비 정산조회 API  (0) 2022.09.27