# 포인트 관리

## 1. GetUnitCost - 조회 단가 확인

기업정보 조회시 과금되는 포인트 단가를 확인합니다.

```vb
Function GetUnitCost(CorpNum As String) As Double
```

### 요청

**Parameters**

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

### 응답

Double - 기업정보 조회단가

### 예외

**Err**

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

## 2. GetChargeInfo - 과금정보 확인

팝빌 기업정보조회 API 서비스 과금정보를 확인합니다.

```vb
Function GetChargeInfo(CorpNum As String, Optional UserID As String = "") As PBChargeInfo
```

### 요청

**Parameters**

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

### 응답

**PBChargeInfo**

- unitCost `type: String` `length: 12` `description: 조회단가`
- chargeMethod `type: String` `length: 3` `description: 과금유형`
  - `연동`
  - `파트너`
- rateSystem `type: String` `length: 3` `description: 과금제도`
  - `종량제`

### 예외

**Err**

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

## 3. GetBalance - 연동회원 잔여포인트 확인

연동회원의 잔여포인트를 확인합니다.

```vb
Function GetBalance(CorpNum As String) As Double
```

### 요청

**Parameters**

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

### 응답

Double - 연동회원 잔여포인트

### 예외

**Err**

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

## 4. GetChargeURL - 연동회원 포인트 충전 팝업 URL

![연동회원 포인트 충전 팝업 URL 미리보기](https://developers.popbill.com/images/reference/point/getChargeURL.png)

**연동회원 포인트를 충전하는 팝업 URL을 반환합니다.**

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

```vb
Function GetChargeURL(CorpNum As String, UserID As String) As String
```

### 요청

**Parameters**

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

### 응답

String - 요청에 대한 응답 URL

### 예외

**Err**

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

## 5. GetPaymentURL - 연동회원 포인트 결제내역 팝업 URL

![연동회원 포인트 결제내역 팝업 URL 미리보기](https://developers.popbill.com/images/reference/point/getPaymentURL.png)

**연동회원 포인트 결제내역 팝업 URL을 반환합니다.**

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

```vb
Function GetPaymentURL(CorpNum As String, UserID As String) As String
```

### 요청

**Parameters**

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

### 응답

String - 요청에 대한 응답 URL

### 예외

**Err**

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

## 6. GetUseHistoryURL - 연동회원 포인트 사용내역 팝업 URL

![연동회원 포인트 사용내역 팝업 URL 미리보기](https://developers.popbill.com/images/reference/point/getUseHistoryURL.png)

**연동회원 포인트 사용내역 팝업 URL을 반환합니다.**

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

```vb
Function GetUseHistoryURL(CorpNum As String, UserID As String) As String
```

### 요청

**Parameters**

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

### 응답

String - 요청에 대한 응답 URL

### 예외

**Err**

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

## 7. GetPartnerBalance - 파트너 잔여포인트 확인

파트너의 잔여포인트를 확인합니다.

```vb
Function GetPartnerBalance(CorpNum As String) As Double
```

### 요청

**Parameters**

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

### 응답

Double - 파트너 잔여포인트

### 예외

**Err**

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

## 8. GetPartnerURL - 파트너 포인트 충전 팝업 URL

![파트너 포인트 충전 팝업 URL 미리보기](https://developers.popbill.com/images/reference/point/getPartnerURL.png)

**파트너 포인트를 충전하는 팝업 URL을 반환합니다.**

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

```vb
Function GetPartnerURL(CorpNum As String, TOGO As String) As String
```

### 요청

**Parameters**

- CorpNum `type: String` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- TOGO `type: String` `length: 4` `required: Y` `description: 고정값 : "CHRG"`

### 응답

String - 요청에 대한 응답 URL

### 예외

**Err**

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