นำส่งข้อมูลขอเสียอากรแสตมป์เป็นตัวเงิน

chevron_left ย้อนกลับ
Post/stamp/SubmitFiling
สำหรับนำส่งข้อมูลการขอเสียอากร

Request Header

Item Name Multi Data Type MaxLen Description
content-type [1…1] String Content type of request payload Value: - application/json
X-Auth-Token [1…1] String Token Id

Request Body

Item Name Multi Data Type MaxLen Description
eInstrument [1…1] Object Root element
sender [1…1] Object รายละเอียดผู้นำส่ง
id [1…1] String 20 รหัสผู้นำส่ง
senderRole [1…1] String 1 สิทธิ์ของผู้นำส่ง
1 = เป็นผู้มีหน้าที่เสียอากร (Direct)
2 = ผู้ให้บริการตัวแทน
encryptType [0…1] String 1 ประเภทการเข้ารหัส
0 = ไม่มีการเข้ารหัสข้อมูล
1 = มีการเข้ารหัสข้อมูล (รูปแบบ JWE)
rdForm [1…1] String ข้อมูลแบบแสดงรายการที่อยู่ในรูปแบบ JWS (JSON Web Signature)

ตัวอย่าง rdFrom (ข้อมูลแบบ อ.ส.9) ก่อนลงลายมือชื่ออิเล็กทรอนิกส์

{
  "documentDetail": {
    "requestId": "1234567010101",
    "formType": "OS9",
    "typeCode": "8",
    "version": "01.00.0001",
    "transAmount": 1
  },
  "instInfo": [
    {
      "id": "2562/01",
      "contractNo": "pm00001",
      "creationDate": "2019-02-21",
      "effectiveDate": "2019-02-21",
      "expireDate": "2019-02-28",
      "expireDateText": "",
      "receiveDate": "",
      "sendFormType": "1",
      "filingNo": 0,
      "overdueFlag": 0,
      "relateInstInfo": null,
      "instAmount": 100000,
      "dupNumber": 1,
      "taxPayer": {
        "specifiedTaxRegistration": {
          "id": "1105878591534"
        },
        "branchNo": "1",
        "branchType": "V",
        "relationship": "2"
      },
      "party": {
        "specifiedTaxRegistration": {
          "id": "1103124567891"
        },
        "titleName": "คำนำหน้าชื่อ",
        "name": "ชื่อ",
        "surname": "นามสกุล",
        "branchNo": "1",
        "branchType": "V",
        "postalTradeAddress": {
          "buildingName": "ชื่ออาคาร",
          "roomNo": "เลขที่ห้อง",
          "floorNo": "ชั้นที่",
          "villageName": "หมู่บ้าน",
          "buildingNumber": "อาคาร",
          "moo": "หมู่ที่",
          "soiName": "ซอย",
          "junctionName": "แยก",
          "streetName": "ถนน",
          "citySubDivisionName": "แขวง/ตำบล",
          "cityName": "เขต/อำเภอ",
          "countrySubDivisionName": "กรุงเทพฯ",
          "postCode": "10900",
          "countryId": "TH"
        },
        "totalParty": 2
      },
      "attachDetail": {
        "detail1": "รายละเอียดเพิ่มเติมที่ 1 ของตราสาร",
        "detail2": "รายละเอียดเพิ่มเติมที่ 2 ของตราสาร",
        "detail3": "รายละเอียดเพิ่มเติมที่ 3 ของตราสาร",
        "detail4": "รายละเอียดเพิ่มเติมที่ 4 ของตราสาร",
        "detail5": "",
        "detail6": "",
        "detail7": "",
        "detail8": "",
        "date": "2019-02-21",
        "amount": 100000,
        "amount1": 0,
        "amount2": 0,
        "amount3": 0,
        "amount4": 0,
        "number": 1,
        "actionType": "1",
        "actionType1": "",
        "arrayDetail": [
          {
            "attType": "",
            "attActionType1": "",
            "attActionType2": "",
            "attDetail1": "",
            "attDetail2": "",
            "attDetail3": "",
            "attDetail4": "",
            "attDetail5": "",
            "attDetail6": "",
            "attAmount1": 0,
            "attAmount2": 0,
            "attAmount3": 0,
            "attNumber1": 0
          }
        ]
      },
      "relateParty": [
        {
          "specifiedTaxRegistration": {
            "id": "1212121212121"
          },
          "titleName": "คำนำหน้าชื่อ",
          "name": "ชื่อ",
          "surname": "นามสกุล",
          "branchNo": "1",
          "branchType": "V"
        }
      ],
      "relateContract": [
        {
          "specifiedTaxRegistration": {
            "id": "1212121212121"
          },
          "titleName": "คำนำหน้าชื่อ",
          "name": "ชื่อ",
          "surname": "นามสกุล",
          "branchNo": "1",
          "branchType": "V"
        }
      ],
      "payment": {
        "dutyAmount": 100,
        "dupDutyAmount": 0,
        "totalAmount": 100
      }
    }
  ],
  "summary": {
    "totalDuty": 100,
    "totalDupDutyAmount": 0,
    "totalPayment": 100,
    "payer": {
      "specifiedTaxRegistration": {
        "id": "1105878591534"
      }
    },
    "responsePaymentType": "2"
  }
}

ตัวอย่างการ Request เพื่อเรียกใช้บริการ SubmitFiling

{
  "eInstrument": {
    "sender": {
      "id": "abc1234",
      "senderRole": "1"
    },
    "rdForm": "ewogICJyZEZvcm0iOiB7CiAgICAiZG9jRGV0YWlsIjogewogICAgICAiZm9ybUNvZGUiOiAiUE5EeHgiLAogICAgICAidmVyc2lvbiI6ICIwMS4wMS4wMSIKICAgIH0sCiAgICAiZm9ybURldGFpbCI6IHsKICAgICAgInRheFBheWVySW5mbyI6IHsKICAgICAgICAidGF4UGF5ZXJJRCI6ICIwMTA1NVgzMDA1ODJYIiwKICgICJ0YXhEZXRhaWwiOiB7CiAgICAgICAgInNlbmRObyI6IDAsCiAgICAgICAgInRheFllYXIiOiAiMjU2MSIsCiAgICAgICAgInRheE1vbnRoIjogIjExIiwKICAgICAgICAic2VjVGF4IjogewogICAgICAgICAgImlkIjogWwogICAgICAgICAgICAiMyIsCiAgICAgICAgICAgICI0OCIsCiAgICAgICAgICAgICI1MCIKICewogICAgICAgICAgInRheEFtb3VudCI6IDU1MDAsCiAgICAgICAgICAic3VyY2hhcmdlQW1vdW50IjogMCwKICAgICAgICAgICJ0b3RhbEFtb3VudCI6IDU1MDAKICAgICAgICB9CiAgICAgIH0sCiAgICAgICJhdHxMDU4Nzg1OTE1MzQiLAogICAgICAgICAgImJyYW5jaE5vIjogIiIsCiAgICAgICAgICAidGl0bGVOYW1lIjogIuC4hOC4s-C4meC4s-C4q-C4meC5ieC4suC4iuC4t-C5iOC4rSIsCiAgICAgICAgICAiZm5hbWUiOiAi4LiK4Li34LmI4LitIiwKICAgICAgICAgICJtbmFtZSI6ICLguIrguLfguYjguK3guIHguKXguLLguIcgKOC4luC5ieC4suC4oeC4tSkiLAogICAgICAgICAgImxuYW1lIjogIuC4meC4suC4oeC4quC4geC4uOCuC4l-C4teC5iOC4q-C5ieC4reC4hyIsCiAgICAgICAgICAgICJmbG9vck5vIjogIuC4iuC4seC5ieC4mSIsCiAgICAgICAgICAgICJ2aWxsYWdlTmFtZSI6ICLguIrguLfguYjguK3guKvguKHguLnguYjguJrguYnguLLguJkiLAogICAgICAgICAgICAiYnVpbGRpbmdOdW1iZXIiOiAi4LmA4Lil4LiC4LiX4Li14LmIIiwKICAgICAgICAgICAgIm1vbyI6ICLguKvguKHguLnguYgiLAogICAgICAgICAgICAic29pIjogIuC4i-C4reC4oiIsCiAgICAgICAgICAgICJzdHJlZXROYW1lIjogIuC4luC4meC4mSIsCiAgICAgICAgICAgICJjaXogICAgICAgICAgInBhaWREZXRhaWwiOiBbCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAiZGF0ZSIuK3guLLguITguLLguKMiLAogICAgICAgICAgICAgICJyYXRlIjogMywKICAgICAgICAgICAgICAiYW1vduKfguLLguKEiLAogICAgICAgICAgICAgICJyYXRlIjogMywKICAgICAgICAgICAgICAiYW1vdW50ICn0="
  }
}

Response

Item Name Multi Data Type MaxLen Description
eInstrument [1…1] Object Root Element
responseCode [1…1] String 10 รหัสข้อความของกรมสรรพากร อ้างอิง ข้อ 6. ตารางรหัสข้อความ (Response Code, Response Message) ของกรมสรรพากร
responsMessage [0…1] String 1000 รายละเอียดข้อความ
rdForm [1…1] Object Element ข้อความตอบกลับการนำส่งข้อมูลตราสาร
requestId [1…1] String 35 รหัสการร้องขอ (unique)
apiRefNo [1…1] String 20 เลขอ้างอิงของการนำส่งข้อมูลตราสาร
instInfo [0…n] Object ตราสารที่นำส่ง
id [1…1] String 50 หมายเลขอ้างอิงตราสารอิเล็กทรอนิกส์ สำหรับ กรณี formType = OS9,AS9 หรือ เลขที่สัญญา กรณี formType =OS4, OS4A, OS4B
refNo [1…1] String 20 หมายเลขอ้างอิงของแบบขอเสียอากรแสตมป์เป็นตัวเงิน
specifiedTaxRegistration [1…1] Object ข้อมูลการลงทะเบียนผู้เสียภาษีอากร
id [1…1] String 13 เลขประจำตัวผู้เสียอากรของผู้ยื่นขอเสียอากรแสตมป์
paymentInfo [0…1] Object ข้อมูลการชำระเงินค่าอากรแสตมป์
ref1 [1…1] String 20 Reference 1 (เลขประจำตัวผู้เสียอากรแสตมป์)
ref2 [1…1] String 20 Reference 2 (รหัสควบคุมหรือรหัสข้อความชำระเงินของกรมสรรพากร)
expireDate [1…1] Date วันสุดท้ายของการชำระเงิน
totalAmount [1…1] Decimal 13,2 รวมจำนวนเงินที่ต้องชำระ (อากร+เงินเพิ่ม+ค่าปรับอาญา)
totalDuty [1…1] Decimal 13,2 อากร
totalSurcharge [1…1] Decimal 13,2 เงินเพิ่ม
totalFine [0…1] Decimal 13,2 ค่าปรับอาญา
payInSlipFile [0…1] Base64Binary ไฟล์ Pay In Slip เพื่อนำไปชำระที่หน่วยรับชำระของกรมสรรพากร (File type = “pdf”)
qrPayment [0…1] Base64Binary QR Code สำหรับจ่ายเงิน (File type = “png”)
validateInfo [0…n] Object Element ข้อมูลผลการตรวจสอบข้อผิดพลาด
refId [1…1] String 100 เลขอ้างอิง (สัญญาเลขที่ หรือ เลขอ้างอิงตราสารอิเล็กทรอนิกส์)
errorList [0…n] Object Element ข้อมูลรายการข้อผิดพลาด
responseCode [1…1] String 10 รหัสข้อความของกรมสรรพากร อ้างอิง ข้อ 6. ตารางรหัสข้อความ (Response Code, Response Message) ของกรมสรรพากร
responsMessage [0…1] String 1000 รายละเอียดข้อความ

ตัวอย่าง response กรณีที่ (transAmount) มีค่าน้อยกว่าหรือเท่ากับ 50

{
  "eInstrument": {
    "responseCode": "I07000",
    "responsMessage": "สำเร็จ",
    "rdForm": {
      "requestId": "1234567010101",
      "apiRefNo": "api00001",
      "instInfo": [
        {
          "id": "2562/01",
          "refNo": "refno0001",
          "specifiedTaxRegistration": {
            "id": "1105878591534"
          }
        }
      ],
      "paymentInfo": {
        "ref1": "1105878591534",
        "ref2": "958319",
        "expireDate": "2018-12-10",
        "totalAmount": 100,
        "totalDuty": 100,
        "totalSurcharge": 0,
        "totalFine": 0,
        "payInSlipFile": "",
        "qrPayment": ""
      }
    }
  }
}

ตัวอย่าง response กรณีที่ (transAmount) มีค่ามากกว่า 50

{
  "eInstrument": {
    "responseCode": "I07001",
    "responsMessage": "ได้รับข้อมูลเรียบร้อยแล้ว รอตรวจสอบความถูกต้องของข้อมูล",
    "rdForm": {
      "requestId": "1234567010101",
      "apiRefNo": "api00001",
      "instInfo": null,
      "paymentInfo": null
    }
  }
}

ตัวอย่าง response กรณี “พบข้อผิดพลาด”

{
  "eInstrument": {
    "responseCode": "E07238",
    "responsMessage": "ไม่สามารถทำรายการได้ เนื่องจากรูปแบบเลขประจำตัวผู้เสียอากรของคู่สัญญา <party.specifiedTaxRegistration.id> ไม่ถูกต้อง หมายเลขอ้างอิงตราสารอิเล็กทรอนิกส์ [หมายเลขอ้างอิงตราสารอิเล็กทรอนิกส์]",
    "rdForm": null
  }
}