# 포인트 관리

## 1. GetUnitCost - 전송 단가 확인

팩스 전송시 과금되는 포인트 단가를 확인합니다.

```pb
function decimal getunitcost(string corpnum, string receivenumtype, string userid) throws popbillexception
```

### 요청

**Parameters**

- corpnum `type: string` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- receivenumtype `type: string` `length: 2` `required: N` `description: 수신번호 유형 (택 1)`
  - `일반`: 일반망 (지능망을 제외한 번호) : 기본값
  - `지능`: 지능망 (030\*, 050\*, 070\*, 080\*, 대표번호)
- userid `type: string` `length: 50` `required: N` `description: 팝빌회원 아이디`

### 응답

decimal - 팩스 전송단가

### 예외

**PopbillException**

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

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

팝빌 팩스 API 서비스 과금정보를 확인합니다.

```pb
function chargeinfo getchargeinfo(string corpnum, string userid, string receivenumtype) throws popbillexception
```

### 요청

**Parameters**

- corpnum `type: string` `length: 10` `required: Y` `description: 팝빌회원 사업자번호 ('-' 제외)`
- userid `type: string` `length: 50` `required: N` `description: 팝빌회원 아이디`
- receivenumtype `type: string` `length: 2` `required: N` `description: 수신번호 유형 (택 1)`
  - `일반`: 일반망 (지능망을 제외한 번호) : 기본값
  - `지능`: 지능망 (030\*, 050\*, 070\*, 080\*, 대표번호)

### 응답

**ChargeInfo**

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

### 예외

**PopbillException**

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

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

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

```pb
function double getbalance(string corpnum) throws popbillexception
```

### 요청

**Parameters**

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

### 응답

double - 연동회원 잔여포인트

### 예외

**PopbillException**

- code `type: long` `length: -` `description: API 처리 실패에 대한 오류코드`
  - 음의 정수 8자리 숫자값 [\[참고\] 오류코드](https://developers.popbill.com/error-code)
- message `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에서만 유효한 세션을 포함하고 있습니다.

```pb
function string getChargeURL(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 처리 실패에 대한 오류메시지`

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

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

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

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

```pb
function string getpaymenturl (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 처리 실패에 대한 오류메시지`

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

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

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

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

```pb
function string getusehistoryurl (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 처리 실패에 대한 오류메시지`

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

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

```pb
function double getpartnerbalance(string corpnum) throws popbillexception
```

### 요청

**Parameters**

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

### 응답

double - 파트너 잔여포인트

### 예외

**PopbillException**

- code `type: long` `length: -` `description: API 처리 실패에 대한 오류코드`
  - 음의 정수 8자리 숫자값 [\[참고\] 오류코드](https://developers.popbill.com/error-code)
- message `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에서만 유효한 세션을 포함하고 있습니다.

```pb
function string getpartnerurl(string corpnum, string togo) throws popbillexception
```

### 요청

**Parameters**

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

### 응답

string - 요청에 대한 응답 URL

### 예외

**PopbillException**

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