POPBill Developers
SDK Reference
Java

6. Custom Functions

The following APIs are for the customized process only. It is required to notify partner center before implementing these functions.

1. Register - Save an e-Tax invoice

  • This API saves the e-Tax invoice data with “Saved” status in POPBiLL server.
  • To send an e-Tax invoice to the NTS, an e-Tax invoice with a “saved” status must be proceeded as an “issued” status via [Issue- Issue an e-Tax invoice] API.
Response register(String CorpNum, Taxinvoice taxinvoice, String UserID, Boolean writeSpecification) throws PopbillException

To implement the file attachment function, please refer to the following sequences as [Register – Save an e-Tax Invoice][AttachFile – Attach a file within an e-Tax invoice][Issue – Issue an e-Tax invoice].

Parameters
Parameters
No.FieldTypeLengthMandatoryDescription
CorpNum String 10 Y Business registration number
10-digits except (‘-’)
taxinvoice Taxinvoice - Y Object of an e-Tax invoice
Taxinvoice
No. Field Type Length Mandatory Description
issueType String 3 Y Issuance type
정발행general issuance
taxType String 2 Y Taxation type
과세taxable
영세zero-rated
면세exempted
chargeDirection String 3 Y Charging Direction
정과금Paid by seller
serialNum String 30 N Serial number
item to manage the list of e-Tax invoice
kwon Short 4 N Volume of a book
item to manage the list of e-Tax invoice
ho Short 4 N Number of a book
item to manage the list of e-Tax invoice
writeDate String 8 Y Date of preparation
format : yyyyMMdd
purposeType String 2 Y Payments received or not
영수payment received
청구payment not received
없음none
supplyCostTotal String 18 Y Sum of supply values
integer values(+/-) only
decimals will be automatically truncated
taxTotal String 18 Y Sum of tax amount
integer values(+/-) only
decimals will be automatically truncated
totalAmount String 18 Y Total amount
integer values(+/-) only
decimals will be automatically truncated
cash String 18 N Payment method – ‘cash’
chkBill String 18 N Payment method – ‘check’
credit String 18 N Payment method – ‘credit’
note String 18 N Payment method – ‘note’
remark1 String 150 Conditional 1st Remark
foreign registration number
passport number
this field is mandatory if {invoiceeType} = “외국인(foreigner)”
remark2 String 150 N 2nd Remark
remark3 String 150 N 3rd Remark
invoicerMgtKey String 24 [Seller] document ID
a unique value that can be entered with alphanumeric values and special characters(‘-’, ‘_’)
invoicerCorpNum String 10 Y [Seller] business registration number
10 digits except a hyphen(‘-’)
invoicerTaxRegID String 4 N [Seller] identification number of a branch place
4 digits
invoicerCorpName String 200 Y [Seller] company name
invoicerCEOName String 100 Y [Seller] CEO name
invoicerAddr String 300 N [Seller] company address
invoicerBizType String 100 N [Seller] type of business
invoicerBizClass String 100 N [Seller] items of business
invoicerContactName String 100 N [Seller] name of the person in charge
invoicerDeptName String 100 N [Seller] department of the person in charge
invoicerTEL String 20 N [Seller] contact number of the person in charge
invoicerHP String 20 N [Seller] cell phone number of the person in charge
invoicerEmail String 100 N [Seller] email of the person in charge
invoiceeType String - Y [Buyer] type of customer
사업자business proprietor
개인individual
외국인foreigner
invoiceeCorpNum String - Y [Buyer] business registration number
- if {invoiceeType} = 사업자(business proprietor type) : business registration number, 10 digits except a hyphen(‘-’)
- if {invoiceeType} = 개인(individual type) : resident registration number, 13 digits except a hyphen(‘-’)
- if {invoiceeType} = 외국인(foreigner type) : 9999999999999
invoiceeTaxRegID String 4 N [Buyer] identification number of a branch place
4 digits
invoiceeCorpName String 200 Y [Buyer] company name
invoiceeCEOName String 100 Y [Buyer] CEO name
invoiceeAddr String 300 N [Buyer] company address
invoiceeBizType String 100 N [Buyer] type of business
invoiceeBizClass String 100 N [Buyer] items of business
invoiceeContactName1 String 100 N [Buyer] name of the person in charge
invoiceeDeptName1 String 100 N [Buyer] department of the person in charge
invoiceeTEL1 String 20 N [Buyer] contact number of the person in charge
invoiceeHP1 String 20 N [Buyer] telephone number of the person in charge
invoiceeEmail1 String 100 N [Buyer] email of the person in charge
modifyCode Short 1 Conditional Reason for revocation
mandatory when writing a revised invoice
orgNTSConfirmNum String 24 Conditional NTS confirmation number of the original tax invoice
mandatory when writing a revised invoice
detailList List<TaxinvoiceDetail> N Detailed list of items
maximum : 99
TaxinvoiceDetail
No. Field Type Length Mandatory Description
serialNum Short 2 Y Serial number
write sequentially starting from 1
maximum : 99
purchaseDT String 8 N Date of trade
format : yyyyMMdd
itemName String 100 N Item name
spec String 60 N Specification
qty String 12 N Quantity
-99999999.99 ~ 999999999.99
allowed to enter two decimal places
unitCost String 18 N Unit price
-99999999999999.99 ~ 999999999999999.99
allowed to enter two decimal places
supplyCost String 18 N Supply values
integer values(+/-) only
decimals will be automatically truncated
tax String 18 N Tax amount
integer values(+/-) only
decimals will be automatically truncated
remark String 100 N Remark
addContactList List<TaxinvoiceAddContact> N Additional person in charge information of the buyer
use this when sending notification mails to multiple persons in charge
maximum : 5
TaxinvoiceAddContact
No. Field Type Length Mandatory Description
serialNum int 1 Y Serial number
write sequentially starting from 1
maximum value : 5
contactName String 100 N Name of the person in charge
email String 100 Y Email of the person in charge
memo String 200 N Memo for user's convenience
this field is used for individual e-Tax invoices within a Bulk submission only
UserID String 50 N User’s POPBiLL ID
WriteSpecification Boolean - N Whether a user uses concurrent creation of a transaction details or not
true do
false do not (default)
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

2. AttachFile - Attach a file within an e-Tax invoice

  • This API attaches a single file to an e-Tax invoice with “Saved” status. (Maximum : 5 files)
Response attachFile(String CorpNum, MgtKeyType KeyType, String MgtKey, String DisplayName, InputStream FileData, String UserID) throws PopbillException
Parameters
Parameters
No.FieldTypeLengthMandatoryDescription
CorpNum String 10 Y Business registration number
10-digits except (‘-’)
KeyType MgtKeyType - Y Type of the e-Tax invoice
SELLsales
MgtKeyType
No. Field Type Length Description
SELL enum - Sales
MgtKey String 24 Y Document ID
DisplayName String 255 Y Name of an attachment file
FileData InputStream - Y Data of an attachment file
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

3. Issue - Issue an e-Tax invoice

  • This API issues (digitally signs) an e-Tax invoice with “Saved” status and proceed it as “Issued”.
IssueResponse issue(String CorpNum, MgtKeyType KeyType, String MgtKey, String Memo, String EmailSubject, Boolean ForceIssue, String UserID) throws PopbillException
Parameters
Parameters
No.FieldTypeLengthMandatoryDescription
CorpNum String 10 Y Business registration number
10-digits except (‘-’)
KeyType MgtKeyType - Y Type of the e-Tax invoice
SELLsales
MgtKeyType
No. Field Type Length Description
SELL enum - Sales
MgtKey String 24 Y Document ID
Memo String 200 N Memo for user’s convenience
EmailSubject String 300 N Title of a notification mail sent to a buyer
default : title assigned by POPBiLL
ForceIssue Boolean - N Whether a user permits to issue an overdue e-Tax invoice or not
true do
false do not (default)
UserID String 50 N User’s POPBiLL ID
Return
IssueResponse
No. Field Type Length Description
code long - API response code
message String - API response message
ntsConfirmNum String 24 NTS confirmation number
POPBiLL automatically assigns this when issuing a tax invoice.
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. GetFiles - View the list of attachments within an e-Tax invoice

  • This API returns a list of attachments within a single e-Tax invoice.
AttachedFile[] getFiles(String CorpNum, MgtKeyType KeyType, String MgtKey) throws PopbillException
Parameters
Parameters
No.FieldTypeLengthMandatoryDescription
CorpNum String 10 Y Business registration number
10-digits except (‘-’)
KeyType MgtKeyType - Y Type of the e-Tax invoice
SELLsales
MgtKeyType
No. Field Type Length Description
SELL enum - Sales
MgtKey String 24 Y Document ID
Return
AttachedFile
No. Field Type Length Description
serialNum Integer 1 Serial number
item to manage the list of attachment files
attachedFile String 255 File ID
It is required to enter this value when calling [DeleteFile - Delete an attachment within an e-Tax invoice] API.
displayName String 255 Name of an attachment file
regDT String 14 Date and time of attachment creation
format : yyyyMMddHHmmss
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. DeleteFile - Delete an attachment within an e-Tax invoice

  • This API deletes a single attachment of an e-Tax invoice with “Saved” status.
Response deleteFile(String CorpNum, MgtKeyType KeyType, String MgtKey, String FileID, String UserID) throws PopbillException
Parameters
Parameters
No.FieldTypeLengthMandatoryDescription
CorpNum String 10 Y Business registration number
10-digits except (‘-’)
KeyType MgtKeyType - Y Type of the e-Tax invoice
SELLsales
MgtKeyType
No. Field Type Length Description
SELL enum - Sales
MgtKey String 24 Y Document ID
FileID String 255 Y Unique identification number assigned by POPBiLL system to manage attachment files.
to find this, refer to the returned value of the AttachedFile via [GetFiles – View the list of attachments within an e-Tax invoice] API.
AttachedFile
No. Field Type Length Description
serialNum Integer 1 Serial number
item to manage the list of attachment files
attachedFile String 255 File ID
It is required to enter this value when calling [DeleteFile - Delete an attachment within an e-Tax invoice] API.
displayName String 255 Name of an attachment file
regDT String 14 Date and time of attachment creation
format : yyyyMMddHHmmss
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