# 홈택스 인증 관리

## 1. GetCertificatePopUpURL - 홈택스 인증정보 등록 팝업 URL

![홈택스 인증정보 등록 팝업 URL 미리보기](https://developers.popbill.com/images/reference/httaxinvoice/getCertificatePopUpURL.png)

**홈택스 인증정보를 등록하는 팝업 URL을 반환합니다.**

- 권장 사이즈 : width = 800px / height = 660px
- 반환되는 URL은 30초 동안만 사용이 가능합니다.
- 반환되는 URL에서만 유효한 세션을 포함하고 있습니다.

```csharp
string GetCertificatePopUpURL(string CorpNum, string UserID = null)
```

### 요청

**Parameters**

- CorpNum `type: string` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- UserID `type: string` `length: 50` `required: N` `description: 팝빌회원 아이디`

### 응답

string - 요청에 대한 응답 URL

### 예외

**PopbillException**

- code `type: long` `length: -` `description: API 처리 실패에 대한 오류코드`
  - 음의 정수 8자리 숫자값 [\[참고\] 오류코드](https://developers.popbill.com/error-code)
- Message `type: string` `length: -` `description: API 처리 실패에 대한 오류메시지`

## 2. GetCertificateExpireDate - 인증서 만료일자 확인

팝빌에 등록된 인증서의 만료일자를 확인합니다.

```csharp
DateTime GetCertificateExpireDate(string CorpNum, string UserID = null)
```

### 요청

**Parameters**

- CorpNum `type: string` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- UserID `type: string` `length: 50` `required: N` `description: 팝빌회원 아이디`

### 응답

DateTime - 팝빌에 등록된 인증서 만료일자

### 예외

**PopbillException**

- code `type: long` `length: -` `description: API 처리 실패에 대한 오류코드`
  - 음의 정수 8자리 숫자값 [\[참고\] 오류코드](https://developers.popbill.com/error-code)
- Message `type: string` `length: -` `description: API 처리 실패에 대한 오류메시지`

## 3. CheckCertValidation - 인증서 유효성 검증

팝빌에 등록된 인증서로 홈택스 로그인 가능 여부를 확인합니다.

```csharp
Response CheckCertValidation(string CorpNum, string UserID = null)
```

### 요청

**Parameters**

- CorpNum `type: string` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- UserID `type: string` `length: 50` `required: N` `description: 팝빌회원 아이디`

### 응답

**Response**

- code `type: long` `length: -` `description: API 처리에 대한 응답코드`
  - `1`: 성공
- message `type: string` `length: -` `description: API 처리에 대한 응답메시지`

### 예외

**PopbillException**

- code `type: long` `length: -` `description: API 처리 실패에 대한 오류코드`
  - 음의 정수 8자리 숫자값 [\[참고\] 오류코드](https://developers.popbill.com/error-code)
- Message `type: string` `length: -` `description: API 처리 실패에 대한 오류메시지`

## 4. RegistDeptUser - 부서사용자 계정 등록

팝빌에 전자세금계산서 전용 부서사용자를 등록합니다.

```csharp
Response RegistDeptUser(string CorpNum, string deptUserID, string deptUserPWD, string identityNum, string userID)
```

### 요청

**Parameters**

- CorpNum `type: string` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- deptUserID `type: string` `length: 50` `required: Y` `description: 전자세금계산서 전용 부서사용자 아이디`
- deptUserPWD `type: string` `length: 50` `required: Y` `description: 전자세금계산서 전용 부서사용자 비밀번호`
- identityNum `type: string` `length: 7` `required: Y` `description: 부서사용자 대표자 주민번호`
  - 주민번호 앞 7자리(생년월일 6자리+ 성별구분 1자리) 홈택스에서 2차인증이 설정된 경우만 입력하고, 해제된 경우 null 또는 ""(공백)을 입력
- userID `type: string` `length: 50` `required: Y` `description: 팝빌회원 아이디`

### 응답

**Response**

- code `type: long` `length: -` `description: API 처리에 대한 응답코드`
  - `1`: 성공
- message `type: string` `length: -` `description: API 처리에 대한 응답메시지`

### 예외

**PopbillException**

- code `type: long` `length: -` `description: API 처리 실패에 대한 오류코드`
  - 음의 정수 8자리 숫자값 [\[참고\] 오류코드](https://developers.popbill.com/error-code)
- Message `type: string` `length: -` `description: API 처리 실패에 대한 오류메시지`

## 5. CheckDeptUser - 부서사용자 등록 여부

팝빌에 부서사용자 등록 여부를 확인합니다.

```csharp
Response CheckDeptUser(string CorpNum, string UserID = null)
```

### 요청

**Parameters**

- CorpNum `type: string` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- UserID `type: string` `length: 50` `required: N` `description: 팝빌회원 아이디`

### 응답

**Response**

- code `type: long` `length: -` `description: API 처리에 대한 응답코드`
  - `1`: 성공
- message `type: string` `length: -` `description: API 처리에 대한 응답메시지`

### 예외

**PopbillException**

- code `type: long` `length: -` `description: API 처리 실패에 대한 오류코드`
  - 음의 정수 8자리 숫자값 [\[참고\] 오류코드](https://developers.popbill.com/error-code)
- Message `type: string` `length: -` `description: API 처리 실패에 대한 오류메시지`

## 6. CheckLoginDeptUser - 부서사용자 유효성 검증

팝빌에 등록된 부서사용자로 홈택스 로그인 가능 여부를 확인합니다.

```csharp
Response CheckLoginDeptUser(string CorpNum, string UserID = null)
```

### 요청

**Parameters**

- corpNum `type: string` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- UserID `type: string` `length: 50` `required: N` `description: 팝빌회원 아이디`

### 응답

**Response**

- code `type: long` `length: -` `description: API 처리에 대한 응답코드`
  - `1`: 성공
- message `type: string` `length: -` `description: API 처리에 대한 응답메시지`

### 예외

**PopbillException**

- code `type: long` `length: -` `description: API 처리 실패에 대한 오류코드`
  - 음의 정수 8자리 숫자값 [\[참고\] 오류코드](https://developers.popbill.com/error-code)
- Message `type: string` `length: -` `description: API 처리 실패에 대한 오류메시지`

## 7. DeleteDeptUser - 부서사용자 계정 삭제

팝빌에 등록된 부서사용자 계정을 삭제합니다.

```csharp
Response DeleteDeptUser(string CorpNum, string UserID = null)
```

### 요청

**Parameters**

- CorpNum `type: string` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- UserID `type: string` `length: 50` `required: N` `description: 팝빌회원 아이디`

### 응답

**Response**

- code `type: long` `length: -` `description: API 처리에 대한 응답코드`
  - `1`: 성공
- message `type: string` `length: -` `description: API 처리에 대한 응답메시지`

### 예외

**PopbillException**

- code `type: long` `length: -` `description: API 처리 실패에 대한 오류코드`
  - 음의 정수 8자리 숫자값 [\[참고\] 오류코드](https://developers.popbill.com/error-code)
- Message `type: string` `length: -` `description: API 처리 실패에 대한 오류메시지`
