Skip to main content
POST
/
v5
/
invoicing
/
clientInvoiceKey
Exchange client invoice key
curl --request POST \
  --url https://sandbox.hurdlr.com/rest/v5/invoicing/clientInvoiceKey \
  --header 'Authorization: Bearer <token>'
{
  "id": 123,
  "apiInvoiceId": "1123144594",
  "clientId": 123,
  "date": "2023-12-25",
  "name": "<string>",
  "totalAmount": 123,
  "totalAmountCents": 123,
  "balance": 123,
  "discountAmount": 30,
  "discountPercent": 15,
  "term": "DUE_NOW",
  "dueDate": "2023-12-25",
  "personalNote": "Thank you for your business.",
  "frequency": "ONE_TIME",
  "status": "OPEN",
  "emailStatus": "SUCCESS",
  "sendEmail": true,
  "sentDate": "2023-12-25",
  "lastViewedDate": "2023-12-25",
  "reminderSchedule": "ON_DUE_DATE",
  "lastCreatedRecurringInvoice": "2023-12-25",
  "parentId": 123,
  "isRecurringParent": true,
  "refundStatus": "PENDING",
  "emailErrors": {},
  "invoicePdfUrl": "<string>",
  "lineItems": [
    {
      "description": "travel cost",
      "id": 123,
      "quantity": 2,
      "price": 50.01,
      "expenseId": 123,
      "salesTax": 10,
      "amount": 123,
      "glAccountId": 123,
      "apiItemId": "<string>",
      "customData": {}
    }
  ],
  "installments": [
    {
      "name": "First Payment",
      "dueDate": "2025-01-15",
      "id": 123,
      "amount": 500,
      "percentage": 25,
      "status": "ACTIVE",
      "balance": 500
    }
  ],
  "pendingPaymentAmount": 123,
  "invoiceNo": 123,
  "clientName": "<string>",
  "email": "<string>",
  "ccEmails": "<string>",
  "bccEmails": "<string>",
  "businessName": "<string>",
  "businessAddress1": "<string>",
  "businessAddress2": "<string>",
  "businessCity": "<string>",
  "businessState": "<string>",
  "businessZip": "<string>",
  "businessLogoUrl": "<string>",
  "businessPhoneNumber": "<string>",
  "clientInvoiceKey": "<string>",
  "amountPaid": 123,
  "paidDate": "2023-12-25",
  "acceptACH": true,
  "acceptCredit": true,
  "acceptCash": true,
  "salesTax": 123,
  "invoiceSubTotal": 123,
  "v6Id": "inv_1123144594",
  "customData": {},
  "apiName": "USER_ENTRY",
  "userId": "<string>",
  "paymentClientSecret": "<string>",
  "paymentMethodId": "<string>",
  "senderEmail": "<string>",
  "brandColor": "<string>",
  "customerSessionClientSecret": "<string>"
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

clientInvoiceKey
string

Client invoice key obtained from client invoice URL. Used to authorize the request in lieu of an access token.

Response

200 - application/json

Successful operation

id
integer<int64>

Invoice id of draft invoice to finalize and send

apiInvoiceId
string

Id of the invoice record in your DB

Example:

"1123144594"

clientId
integer<int64>

Client id for this invoice

date
string<date>

The creation date of the invoice

name
string

Name of the invoice

totalAmount
number

The total amount of the invoice

totalAmountCents
number

The total amount of the invoice in cents. Useful for passing directly to a payment processor, e.g. Stripe, to prevent floating point errors.

balance
number

Remaining balance left to be paid on the invoice

discountAmount
number

The total dollar amount to be discounted (you can provide a discountAmount or a discountPercent, but not both, as it affects the format of the invoice)

Example:

30

discountPercent
number

The total percent to be discounted (you can provide a discountAmount or a discountPercent, but not both, as it affects the format of the invoice)

Example:

15

term
enum<string>

Invoice Term for the invoice

Available options:
DUE_NOW,
NET_10,
NET_15,
NET_30,
NET_60,
OTHER
Example:

"DUE_NOW"

dueDate
string<date>

The due date of the invoice

personalNote
string

An optional personal note to add to the invoice

Example:

"Thank you for your business."

frequency
enum<string>

Invoice frequency

Available options:
ONE_TIME,
WEEKLY,
BI_WEEKLY,
MONTHLY,
YEARLY,
AFTER_TWO_MINS,
ONE_TIME,
WEEKLY,
BI_WEEKLY,
MONTHLY,
YEARLY,
AFTER_TWO_MINS
Example:

"ONE_TIME"

status
enum<string>

Status of the invoice

Available options:
OPEN,
CLOSED,
CANCELLED,
DRAFT,
REFUNDED,
SCHEDULED
emailStatus
enum<string>

Status of the email of the invoice

Available options:
SUCCESS,
FAILURE_TOKEN_INVALIDATED,
FAILURE_TOKEN_POSSIBLY_EXPIRED,
FAILURE_INVOICE_NOT_FOUND,
FAILURE_OTHER,
SENDING,
NOT_SENT,
FAILURE_BOUNCED,
WARNING_AUTO_RESPONSE
sendEmail
boolean

Whether an email of the invoice will be sent to client

sentDate
string<date>

Date the invoice was sent

lastViewedDate
string<date>

The last date the client viewed the invoice

reminderSchedule
enum<string>[]

List of payment reminder frequencies for this invoice

List of payment reminder frequencies for this invoice

Available options:
ON_DUE_DATE,
THREE_DAYS_AFTER_DUE_DATE,
EVERY_SEVEN_DAYS_AFTER_DUE_DATE,
AFTER_TWO_MINS,
ON_DUE_DATE,
THREE_DAYS_AFTER_DUE_DATE,
EVERY_SEVEN_DAYS_AFTER_DUE_DATE,
AFTER_TWO_MINS
Example:

"ON_DUE_DATE"

lastCreatedRecurringInvoice
string<date>

Date of the last created recurring invoice

parentId
integer<int64>

Id of parent for recurring invoices

isRecurringParent
boolean

Whether this invoice is a recurring parent

refundStatus
enum<string>

Status of the refund corresponding to this invoice

Available options:
PENDING,
SUCCEEDED,
FAILED,
UNKNOWN
emailErrors
object

Email errors incurred for this invoice

invoicePdfUrl
string

URL at which a PDF of the invoice can be accessed

lineItems
object[]

An array of line items, where each object represents one invoice item.

installments
object[]

An array of installments, for allowing the customer to pay via multiple partial payments.

pendingPaymentAmount
number

The total pending amount from payment(s)

invoiceNo
integer<int32>

Number of the invoice (per business)

clientName
string

Name of the client to whom the invoice was sent

email
string

The email to send the invoice to

ccEmails
string

Comma-delimited list of emails to be cc'ed on the invoice email

bccEmails
string

Comma-delimited list of emails to be bcc'ed on the invoice email

businessName
string

Name of the business sending the invoice

businessAddress1
string

Address of the business sending the invoice

businessAddress2
string

Secondary address of the business sending the invoice

businessCity
string

City of the business sending the invoice

businessState
string

State of the business sending the invoice

businessZip
string

Zip code of the business sending the invoice

businessLogoUrl
string

Logo of the business sending the invoice

businessPhoneNumber
string

Phone number of the business sending the invoice

clientInvoiceKey
string

ClientInvoiceKey of the invoice being sent

amountPaid
number

The total amount of payments on the invoice

paidDate
string<date>

Date the invoice was paid

acceptACH
boolean

If set to true, the client can pay by cash/check. At least one of acceptCredit or acceptCash or acceptACH must be set to true.

acceptCredit
boolean

Whether the client can pay by debit/credit card. At least one of acceptCredit, acceptCash, or acceptACH must be true.

acceptCash
boolean

Whether the client can pay by cash/check. At least one of acceptCash, acceptCredit, or acceptACH must be true.

salesTax
number
invoiceSubTotal
number
v6Id
string

Id of the v6 invoice entity

Example:

"inv_1123144594"

customData
object

Custom JSON in which you can store any data with max length of 2000 characters

apiName
enum<string>

Name of the API from which this invoice originated

Available options:
USER_ENTRY,
QBO,
XERO,
PARTNER_IMPLEMENTATION
Example:

"USER_ENTRY"

userId
string

Id of the user (from the Tight Partner's DB) that created this invoice

paymentClientSecret
string

secret key used for invoice payment

paymentMethodId
string

Id of the stored payment method

senderEmail
string

Email of the user that created this invoice

brandColor
string

Brand color of the user that created the invoice as a hex code

customerSessionClientSecret
string

Client secret for customer session