Create & Send

POSThttps://services.leadconnectorhq.com/invoices/text2pay
API to create or update a text2pay invoice

Request

Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123

Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123
Body
altId
string
required

location Id / company Id based on altType

Example:
6578278e879ad2646715ba9c
altType
string
required

Alt Type

Allowed value:
location
Example:
location
name
string
required

Invoice Name

Example:
New Invoice
currency
string
required

Currency code

Example:
USD
items
array[object]
required

An array of items for the invoice.

name
string
required

Invoice Item Name

Example:
ABC Product
description
string

Invoice descriptions

Example:
ABC Corp.
productId
string

Product Id

Example:
6578278e879ad2646715ba9c
priceId
string

Price Id

Example:
6578278e879ad2646715ba9c
currency
string
required

Currency

Example:
USD
amount
number
required

Product amount

Example:
999
qty
number
required

Product Quantity

Example:
1
taxes
array[object]

Tax

_id
string
required
name
string
required
rate
number
required
calculation
string
required
Allowed value:
exclusive
description
string
taxId
string
automaticTaxCategoryId
string

Tax category id for calculating automatic tax

Example:
6578278e879ad2646715ba9c
isSetupFeeItem
boolean

Setupfee item, only created when 1st invoice of recurring schedule is generated

type
string

Price type of the item

Allowed values:
one_timerecurring
Example:
one_time
taxInclusive
boolean

true if item amount is tax inclusive

Default:
false
Example:
true
termsNotes
string

Terms notes, Also supports HTML markups

Example:
<p>This is a default terms.</p>
title
string

Title for the invoice

Example:
INVOICE
contactDetails
object
required

Contact information to send the invoice to

id
string
required

Contact ID

Example:
6578278e879ad2646715ba9c
name
string
required

Contact Name

Example:
Alex
phoneNo
string

Contact Phone Number

Example:
+1234567890
email
string

Contact Email

Example:
alex@example.com
additionalEmails
array[object]

Secondary email addresses for the contact to be saved

email
string
required
Example:
alex@example.com
companyName
string

Contact Company Name

Example:
ABC Corp.
address
object
addressLine1
string

Address Line 1

Example:
9931 Beechwood
addressLine2
string

Address Line 2

Example:
Beechwood
city
string

City

Example:
St. Houston
state
string

State

Example:
TX
countryCode
string

Country Code

Example:
US
postalCode
string

Postal Code

Example:
559-6993
customFields
array[string]

Custom Values

invoiceNumber
string

Invoice Number

Example:
1001
issueDate
string
required

Issue date in YYYY-MM-DD format

Example:
2023-01-01
dueDate
string

Due date in YYYY-MM-DD format

Example:
2023-01-14
sentTo
object
required
email
array[string]
required

Email Address

Example:
["alex@example.com"]
emailCc
array[string]

cc to be kept in any sent out emails

Example:
["alex@example.com"]
emailBcc
array[string]

bcc to be kept in any sent out emails

Example:
["alex@example.com"]
phoneNo
array[string]

Contact Phone Number

Example:
["+1-214-559-6993"]
liveMode
boolean
required
automaticTaxesEnabled
boolean

Automatic taxes enabled for the Invoice

Example:
true
paymentSchedule
object

split invoice into payment schedule summing up to full invoice amount

type
string
required

Payment schedule type

Allowed values:
fixedpercentage
Example:
percentage
schedules
array[string]
required

payment schedule item

lateFeesConfiguration
object

late fees configuration

enable
boolean
required

Enable late fees

Example:
true
value
number
required

Late Fees Value

Example:
10
type
string
required

Late Fees Type

Allowed values:
fixedpercentage
Example:
fixed
frequency
object
required

Late Fees Frequency

intervalCount
number

Late fees interval count

Example:
10
interval
string
required

Late fees interval

Allowed values:
minutehourdayweekmonthone_time
Example:
day
grace
object

Late Fees Grace

intervalCount
number
required

Late fees grace interval count

Example:
10
interval
string
required

Late fees grace interval

Allowed value:
day
Example:
day
maxLateFees
object

Max late fees payable

type
string
required
Allowed value:
fixed
Example:
fixed
value
number
required

10

Example:
Max late fees to pay
tipsConfiguration
object

tips configuration for the invoice

tipsPercentage
array[string]
required

Percentage of tips allowed

Example:
[5,10,15]
tipsEnabled
boolean
required

Tips enabled status

Example:
true
invoiceNumberPrefix
string

prefix for invoice number

Example:
INV-
paymentMethods
object

Payment Methods for Invoices

stripe
object
required

Payment Method

enableBankDebitOnly
boolean
required

Enable Bank Debit Only

Example:
false
attachments
array[object]

attachments for the invoice

id
string
required

Id of the file selected

Example:
6241712be68f7a98102ba272
name
string
required

Name of the file

Example:
Electronics.pdf
url
string
required

URL of the file

Example:
https://example.com/digital-delivery
type
string
required

Type of the file

size
number
required

Size of the file

Example:
10000
id
string

id of invoice to update. If skipped, a new invoice will be created

includeTermsNote
boolean

include terms & notes with receipts

Example:
true
action
string
required

create invoice in draft mode or send mode

Allowed values:
draftsend
Example:
draft
userId
string
required

id of user generating invoice

discount
object
value
number

Discount Value

Default:
0
Example:
10
type
string
required

Discount type

Allowed values:
percentagefixed
Default:
percentage
Example:
percentage
validOnProductIds
array[string]

Product Ids on which discount is applicable

Example:
[ '6579751d56f60276e5bd4154' ]
businessDetails
object
logoUrl
string

Business Logo URL

Example:
https://example.com/logo.png
name
string

Business Name

Example:
ABC Corp.
phoneNo
string

Business Phone Number

Example:
+1-214-559-6993
address
object

Business Address

Example:
9931 Beechwood, TX
addressLine1
string

Address Line 1

Example:
9931 Beechwood
addressLine2
string

Address Line 2

Example:
Beechwood
city
string

City

Example:
St. Houston
state
string

State

Example:
TX
countryCode
string

Country Code

Example:
US
postalCode
string

Postal Code

Example:
559-6993
website
string

Business Website Link

Example:
wwww.example.com
customValues
array[string]

Custom Values

Headers
Authorization
string
required

Access Token

Example:
Bearer 9c48df2694a849b6089f9d0d3513efe
Version
string
required

API Version

Allowed value:
2021-07-28

Responses

Successful response

invoice
object
required
_id
string
required

Invoice Id

Example:
6578278e879ad2646715ba9c
status
string
required

Invoice Status

Allowed values:
draftsentpayment_processingpaidvoidpartially_paid
Example:
draft
liveMode
boolean
required

Live Mode

Example:
false
amountPaid
number
required

Amount Paid

Example:
0
altId
string
required

Location Id or Agency Id

Example:
6578278e879ad2646715ba9c
altType
string
required
Allowed value:
location
name
string
required

Name of the invoice

Example:
New Invoice
businessDetails
object
required

Business Details

Example:
{"name":"Alex","address":{"addressLine1":"9931 Beechwood","city":"St. Houston","state":"TX","countryCode":"USA","postalCode":"559-6993"},"phoneNo":"+1-214-559-6993","website":"www.example.com"}
invoiceNumber
number
required

Invoice Number

Example:
19
currency
string
required

Currency

Example:
USD
contactDetails
object
required

Contact Details

Example:
{"id":"c6tZZU0rJBf30ZXx9Gli","phoneNo":"+1-214-559-6993","email":"alex@example.com","customFields":[],"name":"Alex","address":{"countryCode":"US"}}
issueDate
string
required

Issue date in YYYY-MM-DD format

Example:
2023-01-01
dueDate
string
required

Due date in YYYY-MM-DD format

Example:
2023-01-01
discount
object

Discount

Example:
{"type":"percentage","value":0}
invoiceItems
array[string]
required

Invoice Items

Example:
[{"taxes":[],"_id":"c6tZZU0rJBf30ZXx9Gli","productId":"c6tZZU0rJBf30ZXx9Gli","priceId":"c6tZZU0rJBf30ZXx9Gli","currency":"USD","name":"Macbook Pro","qty":1,"amount":999}]
total
number
required

Total Amount

Example:
999
title
string
required

Title

Example:
INVOICE
amountDue
number
required

Total Amount Due

Example:
999
createdAt
string
required

created at

Example:
2023-12-12T09:27:42.355Z
updatedAt
string
required

updated at

Example:
2023-12-12T09:27:42.355Z
automaticTaxesEnabled
boolean

Automatic taxes enabled for the Invoice

Example:
true
automaticTaxesCalculated
boolean

Is Automatic taxes calculated for the Invoice items

Example:
true
paymentSchedule
object

split invoice into payment schedule summing up to full invoice amount

invoiceUrl
string
required

preview url of generated invoice

Unprocessable Entity

statusCode
number
Example:
422
message
array[string]
Example:
["Unprocessable Entity"]
error
string
Example:
Unprocessable Entity

Unauthorized

statusCode
number
Example:
401
message
string
Example:
Invalid token: access token is invalid
error
string
Example:
Unauthorized

Bad Request

statusCode
number
Example:
400
message
string
Example:
Bad Request