POPBill Developers
SDK Reference
Java

Issue

1. RegistIssue - Issue a cash receipt

  • This API issues the cash receipt and process it as “issued”
CBIssueResponse registIssue(String CorpNum, Cashbill cashbill, String memo, String UserID, String emailSubject) throws PopbillException
  • For voluntary issuance, ‘소득공제용’ (tax deduction purpose) and ‘010-000-1234’ must be entered as a value of ‘tradeUsage’ (purpose of issuance) and ‘identityNum’(buyer’s identification number).
  • When issuing a cash receipt, notification mail will be sent to the buyer’s mail address.
Parameters
Parameters
No.FieldTypeLengthMandatoryDescription
CorpNum String 10 Y Business registration number
10-digits except (‘-’)
cashbill Cashbill - Y Object information for cash receipt
Cashbill
No. Field Type Length Mandatory Description
mgtKey String 24 Y Document ID
a unique value that can be entered with alphanumeric values and special characters(‘-’, ‘_’)
orgConfirmNum String 9 Conditional NTS confirmation number of the original cash receipt
mandatory value to enter when issuing a cash receipt for revocation
orgTradeDate String 9 Conditional Trade date of the original cash receipt
mandatory value to enter when issuing a cash receipt for revocation
tradeDT String 14 N Date and time of trade
a user can assign this value
the available dates are the day or the previous day
format : yyyyMMddHHmmss
default : date and time of issuance
tradeType String 4 Y Type of cash receipt
승인거래cash receipt for transaction approval
취소거래cash receipt for revocation
tradeUsage String - Y Purpose of issuance
소득공제용income deduction usage
지출증빙용proof of purchase usage
tradeOpt String 4 N Trade type
일반general
도서공연book/performance
대중교통public transportation
“일반” will be applied as default value if not entered
taxationType String - Y Taxation type
과세taxable
비과세exempted
totalAmount String 9 Y Total amount
integer values(+) only
supplyCost String 9 Y Supply values
integer values(+) only
tax String 9 Y Tax amount
integer values(+) only
serviceFee String 9 Y Service fee
integer values(+) only
franchiseCorpNum String 10 Y [Seller] business registration number
POPBiLL user's business registration number
10 digits except a hyphen(‘-’)
franchiseTaxRegID String 4 N [Seller] identification number for a branch place
4 digits
franchiseCorpName String 200 N [Seller] company name
franchiseCEOName String 100 N [Seller] CEO name
franchiseAddr String 400 N [Seller] company address
franchiseTEL String 20 N [Seller] telephone number
identityNum String 19 Y [Buyer] identification number
└ if the value of {tradeUsage} is ‘소득공제용’(income deduction usage), enter one of the following options : resident registration number/ cell phone number/ card number/ 010-000-1234( identification number for voluntary issuance)
└ if the value of {tradeUsage} is ‘지출증빙용’(proof of purchase usage), enter one of the following options : business registration number/ cell phone number/ card number
resident registration number : 13 digits, phone number : 10~11 digits, card number : 13~19 digits, business registration number : 10 digits
customerName String 70 N [Buyer] name of the customer
itemName String 70 N Order product name
orderNumber String 200 N Order number
email String 100 N [Buyer] email
hp String 20 N [Buyer] cell phone number
cancelType Integer 1 N Reasons for revocation
1transaction is returned/cancelled (default)
2correction of errors
3other reasons
mandatory to enter this value if {tradeType} = "취소거래(cash receipt for revocation)".
memo String 200 N Memo for user’s convenience
UserID String 50 N User’s POPBiLL ID
emailSubject String 300 N Title of a notification mail sent to a buyer
if not entered, a POPBiLL default value will be assigned
Return
CBIssueResponse
No. Field Type Length Description
code long - API response code
message String - API response message
confirmNum String 9 NTS confirmation number
POPBiLL automatically assigns this when issuing a cash receipt
tradeDate String 8 Date of trade
format : yyyyMMdd
POPBiLL automatically assigns this when issuing a cash receipt
Throws
PopbillException
No. Field Type Length Description
code long - API response code
8 digits code that starts with (‘-’) [Error Code]
message String - Error message for any failed API process

2. RevokeRegistIssue - Issue a cash receipt for revocation

  • This API issues a cash receipt for revocation and process it as “issued”.
  • The total amount of the cash receipt for revocation cannot exceed the amount of the original cash receipt.
  • The trade date of the cash receipt for revocation cannot be past the date of the original cash receipt.
Response revokeRegistIssue(String CorpNum, String mgtKey, String orgConfirmNum, String orgTradeDate, Boolean smssendYN, String memo, Boolean isPartCancel, Integer cancelType, String supplyCost, String tax, String serviceFee, String totalAmount, String userID, String emailSubject, String tradeDT) throws PopbillException
  • The NTS confirmation number and the trade date of the original cash receipt can be checked via [GetInfo – Check the status of a cash receipt] API. When issuing a cash receipt, a notification mail will be sent to the buyer’s mail address.
Parameters
Parameters
No.FieldTypeLengthMandatoryDescription
CorpNum String 10 Y Business registration number
10-digits except (‘-’)
mgtKey String 24 Y Document ID
a unique value that can be entered with alphanumeric values and special characters(‘-’, ‘_’)
orgConfirmNum String 9 Y NTS confirmation number of the original cash receipt
this information can be found from variable ‘confirmNum’ of the object CashbillInfo.
orgTradeDate String 8 Y Trade date of the original cash receipt
format : yyyyMMdd
this information can be found from variable ‘tradeDate’ of the object CashbillInfo.
smssendYN Boolean - N Whether to send a notification SMS or not
truesend
falsedo not send (default)
sms function is not available for overseas customers
memo String 200 N Memo for user’s convenience
isPartCancel Boolean - Conditional Type of cash receipt for revocation
truecancels partial amount
falsecancels full amount
‘false’ if not entered.
cancelType Integer 1 N Reasons for revocation
1transaction is returned/cancelled
2correction of errors
3other reasons
reason ‘1’ will be applied if not entered.
supplyCost String 9 Conditional Supply value
- if {isPartCancel} is true, enter the actual amount of supply value to cancel
- if {isPartCancel} is false, do not enter any value.
tax String 9 Conditional Tax amount
- if {isPartCancel} is true, enter the actual amount of tax to cancel
- if {isPartCancel} is false, do not enter any value
serviceFee String 9 Conditional Service fee
- if {isPartCancel} is true, enter the actual amount of service fee to cancel
- if {isPartCancel} is false, do not enter any value
totalAmount String 9 Conditional Total amount
supply value + tax + service fee
- if {isPartCancel} is true, enter the actual amount to cancel
- if {isPartCancel} is false, do not enter any value
userID String 50 N User’s POPBiLL ID
emailSubject String 300 N Title of the notification mail for the issuance of a cash receipt
if not entered, a POPBiLL default value will be assigned
tradeDT String 14 N Date and time of trade
format : yyyyMMddHHmmss
the available dates are the day or the previous day
date and time of issuance(default) if not entered
Return
CBIssueResponse
No. Field Type Length Description
code long - API response code
message String - API response message
confirmNum String 9 NTS confirmation number
POPBiLL automatically assigns this when issuing a cash receipt
tradeDate String 8 Date of trade
format : yyyyMMdd
POPBiLL automatically assigns this when issuing a cash receipt
Throws
PopbillException
No. Field Type Length Description
code long - API response code
8 digits code that starts with (‘-’) [Error Code]
message String - Error message for any failed API process

3. BulkSubmit - Submit the issuance of bulk cash receipts

  • This API submit the issuance of bulk cash receipts. A single request processes maximum 100 cash receipts at once.
bulkResponse bulkSubmit(String CorpNum, String SubmitID, List<Cashbill> cashbillList, String UserID) throws PopbillException
  • The NTS confirmation number and the trade date of the original cash receipt can be checked via [GetInfo – Check the status of a cash receipt] API.
  • When issuing a cash receipt, a notification mail will be sent to the buyer’s mail address.
Parameters
Parameters
No.FieldTypeLengthMandatoryDescription
CorpNum String 10 Y Business registration number
10-digits except (‘-’)
SubmitID String 36 Y Submission ID
a user assigns this ID to identify each bulk submission
a unique value combined with alphabets, numeric values, and a hyphen(‘-’)
cashbillList List<Cashbill> Y List of object of a cash receipt
maximum : 100 cash receipts
Cashbill
No. Field Type Length Mandatory Description
mgtKey String 24 Y Document ID
a unique value that can be entered with alphanumeric values and special characters(‘-’, ‘_’)
orgConfirmNum String 9 Conditional NTS confirmation number of the original cash receipt
mandatory value to enter when issuing a cash receipt for revocation
orgTradeDate String 9 Conditional Trade date of the original cash receipt
mandatory value to enter when issuing a cash receipt for revocation
tradeDT String 14 N Date and time of trade
a user can assign this value
the available dates are the day or the previous day
format : yyyyMMddHHmmss
default : date and time of issuance
tradeType String 4 Y Type of cash receipt
승인거래cash receipt for transaction approval
취소거래cash receipt for revocation
tradeUsage String - Y Purpose of issuance
소득공제용income deduction usage
지출증빙용proof of purchase usage
tradeOpt String 4 N Trade type
일반general
도서공연book/performance
대중교통public transportation
“일반” will be applied as default value if not entered
taxationType String - Y Taxation type
과세taxable
비과세exempted
totalAmount String 9 Y Total amount
integer values(+) only
supplyCost String 9 Y Supply values
integer values(+) only
tax String 9 Y Tax amount
integer values(+) only
serviceFee String 9 Y Service fee
integer values(+) only
franchiseCorpNum String 10 Y [Seller] business registration number
POPBiLL user's business registration number
10 digits except a hyphen(‘-’)
franchiseTaxRegID String 4 N [Seller] identification number for a branch place
4 digits
franchiseCorpName String 200 N [Seller] company name
franchiseCEOName String 100 N [Seller] CEO name
franchiseAddr String 400 N [Seller] company address
franchiseTEL String 20 N [Seller] telephone number
identityNum String 19 Y [Buyer] identification number
└ if the value of {tradeUsage} is ‘소득공제용’(income deduction usage), enter one of the following options : resident registration number/ cell phone number/ card number/ 010-000-1234( identification number for voluntary issuance)
└ if the value of {tradeUsage} is ‘지출증빙용’(proof of purchase usage), enter one of the following options : business registration number/ cell phone number/ card number
resident registration number : 13 digits, phone number : 10~11 digits, card number : 13~19 digits, business registration number : 10 digits
customerName String 70 N [Buyer] name of the customer
itemName String 70 N Order product name
orderNumber String 200 N Order number
email String 100 N [Buyer] email
hp String 20 N [Buyer] cell phone number
cancelType Integer 1 N Reasons for revocation
1transaction is returned/cancelled (default)
2correction of errors
3other reasons
mandatory to enter this value if {tradeType} = "취소거래(cash receipt for revocation)".
UserID String 50 N User’s POPBiLL ID
Return
BulkResponse
No. Field Type Length Description
code long - API response code
message String - API response message
receiptID String 24 Receipt ID
POPBiLL automatically assigns when submission is processed.
Throws
PopbillException
No. Field Type Length Description
code long - API response code
8 digits code that starts with (‘-’) [Error Code]
message String - Error message for any failed API process

4. GetBulkResult - Check the submission status for bulk issuance

  • This API checks the submission status for bulk issuance using 'SubmitID'.
  • The issuance result(succeeded/failed) is returned when the submission status(variable : txState) is updated as ‘2’(completed).
BulkCashbillResult getBulkResult(String CorpNum, String SubmitID, String UserID) throws PopbillException
Parameters
Parameters
No.FieldTypeLengthMandatoryDescription
CorpNum String 10 Y Business registration number
10-digits except (‘-’)
SubmitID String 36 Y Submission ID
assigned by a user when registering for a bulk submission
UserID String 50 N User’s POPBiLL ID
Return
BulkCashbillResult
No. Field Type Length Description
code long - API response code
message String - API response message
submitID String 36 Submission ID
assigned by a user when registering for a bulk submission
submitCount long - Number of cash receipt submissions
successCount long - Number of succeeded cash receipt issuance
failCount long - Number of failed cash receipt issuance
txState long 1 Submission status
0submitted
1in progress
2completed
txResultCode long - Result code of a submission
txStartDT String 14 Start date and time of B/G issuance process
format : yyyyMMddHHmmss
txEndDT String 14 End date and time of B/G issuance process
format : yyyyMMddHHmmss
receiptDT String 14 Date and time of the submission
format : yyyyMMddHHmmss
issueResult List<BulkCashbillIssueResult> Issuance result
BulkCashbillIssueResult
No. Field Type Length Description
code long - API response code
message String - API response message
mgtKey String 24 Document ID
a unique value that can be entered with alphanumeric values and special characters(‘-’, ‘_’)
confirmNum String 9 NTS confirmation number
POPBiLL automatically assigns this when issuing a cash receipt
tradeDate String 8 Date of trade
format : yyyyMMdd
POPBiLL automatically assigns this when issuing a cash receipt
issuance date(default) will be applied if not entered.
issueDT String 14 Date and time of issuance
format : yyyyMMddHHmmss
receiptID String 36 Receipt ID
POPBiLL automatically assigns when submission is processed
Throws
PopbillException
No. Field Type Length Description
code long - API response code
8 digits code that starts with (‘-’) [Error Code]
message String - Error message for any failed API process

5. Delete - Delete a revocable cash receipt

  • This API deletes a revocable cash receipt.

    ※ available status to delete : “failed”

Response delete(String CorpNum, String MgtKey, String UserID) throws PopbillException
  • Recommend to implement this API only if you need to reuse a document ID of a cash receipt.
Parameters
Parameters
No.FieldTypeLengthMandatoryDescription
CorpNum String 10 Y Business registration number
10-digits except (‘-’)
MgtKey String 24 Y Document ID
UserID String 50 N User’s POPBiLL ID
Return
Response
No. Field Type Length Description
code long - API response code
message String - API response message
Throws
PopbillException
No. Field Type Length Description
code long - API response code
8 digits code that starts with (‘-’) [Error Code]
message String - Error message for any failed API process