# 인증서 관리

## 1. GetTaxCertURL - 인증서 등록 팝업 URL

![인증서 등록 팝업 URL 미리보기](https://developers.popbill.com/images/reference/taxinvoice/getTaxCertURL.png)

**공동인증서를 등록하는 팝업 URL을 반환합니다.**

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

```pb
function string getTaxCertURL(string corpnum, string userid) throws popbillexception
```

### 요청

**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 - 인증서 만료일 확인

팝빌 인증서버에 등록된 공동인증서의 만료일을 확인합니다.

```pb
function string getcertificateexpiredate(string corpnum) throws popbillexception
```

### 요청

**Parameters**

- corpnum `type: string` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`

### 응답

string - 인증서 만료일자 (형식 : yyyyMMdd)

### 예외

**PopbillException**

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

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

팝빌 인증서버에 등록된 공동인증서의 유효성을 확인합니다.

```pb
function response checkcertvalidation(string corpnum, string userid) throws popbillexception
```

### 요청

**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. GetTaxCertInfo - 인증서 정보 확인

팝빌 인증서버에 등록된 공동인증서의 정보를 확인합니다.

```pb
function taxinvoicecertificate getTaxCertInfo (string corpnum, string userid) throws popbillexception
```

### 요청

**Parameters**

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

### 응답

**TaxinvoiceCertificate**

- regDT `type: string` `length: 14` `description: 등록일시`
  - 형식 : yyyyMMddHHmmss
  - 인증서를 팝빌 인증서버에 등록한 시간
- expireDT `type: string` `length: 14` `description: 만료일시`
  - 형식 : yyyyMMddHHmmss
  - 팝빌 인증서버에 등록된 인증서의 만료일시
- issuerDN `type: string` `length: 200` `description: 발급자 DN`
- subjectDN `type: string` `length: 200` `description: 인증서 DN`
- issuerName `type: string` `length: 12` `description: 인증서 종류`
  - `전자세금용 공동인증서`
  - `팝빌 특목용 공동인증서`
  - `기타`
- OID `type: string` `length: 30` `description: OID`
- regContactName `type: string` `length: 100` `description: 등록 담당자 성명`
  - 팝빌 인증서버에 인증서를 등록한 담당자 성명
- regContactID `type: string` `length: 50` `description: 등록 담당자 아이디`
  - 팝빌 인증서버에 인증서를 등록한 담당자 팝빌회원 아이디

### 예외

**PopbillException**

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