POPBill Developers
API Reference

ETC header

The POPBiLL API allows you to set additional headers to specify the language of the response message and the encoding method.

Accept-Encoding

When the client sets an Accept-Encoding value in the request header, the POPBiLL API returns an encoded response. An encoded response reduces network transfer size and helps improve response speed when retrieving large amounts of data.

Accept-Encoding: gzip

If the client does not send the Accept-Encoding header, the server generally returns a response without compression. To receive a compressed response such as gzip, the client must support the requested compression method and be able to correctly decompress the response body.

Accept-Language

Response messages from the POPBiLL API are provided in Korean by default. If an English response is required, you can set the Accept-Language value in the API request header to specify the response message language as English.

Accept-Language: en-US

X-PB-Message-Digest

When calling the bulk issuance (Bulk) API, to verify the integrity of the request body, you must generate a MessageDigest value for the body and include it in the X-PB-Message-Digest item of the request header when sending the request.

Sample code

This is sample code that hashes the request body with SHA-1 and then encodes it with Base64.

#!/bin/bash

BODY=$(cat << 'EOF'
{
    "invoices": [
        {
          "issueType": "정발행",
          "taxType": "과세",
          "chargeDirection" : "정과금",
          "writeDate": "20251016",
          "purposeType": "영수",
          "supplyCostTotal": "10000",
          "taxTotal": "1000",
          "totalAmount": "11000",
          "invoicerMgtKey": "TEST202510281800000",
          "invoicerCorpNum": "1234567890",
          "invoicerCorpName": "공급자 상호",
          "invoicerCEOName": "공급자 대표자 성명",
          "invoiceeType": "사업자",
          "invoiceeCorpNum": "1234567890",
          "invoiceeCorpName": "공급받는자 상호",
          "invoiceeCEOName": "공급받는자 대표자 성명"
        }
    ]
  }
EOF
)

MessageDigest=$(printf '%s' "$BODY" | openssl dgst -sha1 -binary | base64)

echo $MessageDigest

Check result

Fd13KyCZ14sRHX1TZxTLD1IR+E0=

Request example

curl --request POST \
  --url 'https://{domain}/Taxinvoice' \
  --header 'Authorization: Bearer {token}' \
  --header 'Content-Type: application/json' \
  --header 'X-HTTP-Method-Override: BULKISSUE' \
  --header 'X-PB-Submit-ID: {submitID}' \
  --header 'X-PB-Message-Digest: Fd13KyCZ14sRHX1TZxTLD1IR+E0=' \
  --data '{
    "invoices": [
      {
        "issueType": "정발행",
        "taxType": "과세",
        "chargeDirection" : "정과금",
        "writeDate": "20251016",
        "purposeType": "영수",
        "supplyCostTotal": "10000",
        "taxTotal": "1000",
        "totalAmount": "11000",
        "invoicerMgtKey": "TEST202510281800000",
        "invoicerCorpNum": "1234567890",
        "invoicerCorpName": "공급자 상호",
        "invoicerCEOName": "공급자 대표자 성명",
        "invoiceeType": "사업자",
        "invoiceeCorpNum": "1234567890",
        "invoiceeCorpName": "공급받는자 상호",
        "invoiceeCEOName": "공급받는자 대표자 성명"
      }
    ]
  }'

If the JSON string of the request body changes due to differences in spaces or line breaks, the hash value also changes. You must generate the MessageDigest using the exact JSON string that is actually used in the request.