×

POST /api/forms/create4868

Description

Creates Form 4868 with:
  • Filer Details
  • 4868 Tax Data
  • IRS Payment Info

URL

HTTP
POST /api/forms/create4868

Authentication

Required
HTTP
Authorization: Bearer <token>

Request Body

JSON
{
  "filerDetails": {
    "userKey": "{{userKey}}",
    "FirstName": "prod testing",
    "LastName": "sai",
    "Middle Initial": "",
    "Suffix": "",
    "SSN": "789456123",
    "DateofBirth": "22/11/1998",
    "PhoneNumber": "7894561235",
    "Filing_Type_Married": true,
    "Spouse_Info": {
      "Spouse_FirstName": "my",
      "Spouse_LasttName": "spouse",
      "Spouse_MiddleName": "",
      "Spouse_Suffix": "",
      "Spouse_SSN": "544125580",
      "Spouse_DOB": "22-11-1998"
    },
    "Address_Info": {
      "AddressLine1": "test",
      "AddressLine2": "test",
      "City": "test",
      "State": "az",
      "ZIPCode": "85004"
    }
  },
  "form4868Details": {
    "TaxYear": "2025",
    "Out_Of_Country_status": false,
    "Filed_1040NR_or_1040NR-EZ": false,
    "I_Owe_Tax_To_The_IRS": true,
    "usemylastreturn": false,
    "IknowhowmuchamountIowetotheIRS": true,
    "TotalTaxLiability": 789,
    "TotalPaymentMade": 789,
    "balanceDue": 0,
    "PayableAmount": 9
  },
  "irsPaymentDetails": {
    "routingNo": "",
    "accountNo": "",
    "accountType": "",
    "withdrawalDate": "",
    "accountHolderPhone": "",
    "paymentType": "check"
  }
}

Field Validations

  • Filer Details

Field
Type
Validation
userKey
string
Required
FirstName
string
Required
LastName
string
Required
"Middle Initial"
string
Optional
SSN
string
Required (9 digits)
DateofBirth
string
Required
Filing_Type_Married
boolean
Required
Address_Info
object
Required
 
  • Spouse_Info (Conditional)

Required only if
TEXT
Filing_Type_Married = true
Field
Rule
Spouse_FirstName
Required
Spouse_LasttName
Required
Spouse_SSN
Required
Spouse_DOB
Required
 
  • Address_Info

Field
Required
AddressLine1
City
State
ZIPCode
  • form4868Details

Field
Type
Rule
TaxYear
string
Required
usemylastreturn
boolean
Cannot be true with IknowhowmuchamountIowetotheIRS
IknowhowmuchamountIowetotheIRS
boolean
 
PayableAmount
number
Required (>0 if above true)

Business Rules

  • ❌ usemylastreturn AND IknowhowmuchamountIowetotheIRS cannot both be true
  • ✅ If IknowhowmuchamountIowetotheIRS = true → PayableAmount > 0
  • irsPaymentDetails

Field
Rule
paymentType
Required (check, eftps, efw)
👉 If paymentType = "efw" then below fields are mandatory:
  • routingNo
  • accountNo
  • accountType
  • withdrawalDate
  • accountHolderPhone

✅ Success Response (200)

JSON
{
  "Status": true,
  "FormKey": "uuid",
  "FilerKey": "uuid",
  "Message": "4868 form details created successfully"
}

❌ Validation Error (400)

JSON
{
  "Status": false,
  "Message": "Validation failed",
  "ErrorMessage": "Spouse_FirstName is required when married"
}

❌ Auth Errors (401)

JSON
{
  "success": false,
  "message": "Invalid or expired token"
}

❌ Server Error (500)

JSON
{
  "Status": false,
  "ErrorMessage": "Internal server error"
}