Skip to main content

Invoices

Create New Invoice​

post /businesses/:urlKey/invoices

This endpoint allows you to create an invoice

Path Params

urlKey - will be provided by us

Headers

NameTypeValue Description
Content-Type *stringapplication-json
Authorization *stringBearer <jwt>

Body

NameTypeValue Description
invoiceTitlestringInvoice Title
invoiceSubTitlestringInvoice Subtitle
contactobjectContact Details
contact.phonestringphone of contact
contact.emailstringemail of contact
invoiceNumberstringInvoice number - must be unique among your invoices. If not passed in the API call, invoice number will auto-incremented from the last invoice. If the last number is APP-2020-0004 next will be APP-2020-0005
invoiceDatestringISO 8601 Formatted Date String. If not provided, current timestamp will be used.
dueDatestringISO 8601 Formatted Date String
invoiceTypestring (enum)INVOICE -> Tax Invoice
BOS -> Invoice/Bill without tax
currencystringISO 4217 Currency Code -> Default INR
billedTo *objectCustomer's billing details
billedTo.name *stringCustomer's Name
billedTo.streetstringCustomer's String Address
billedTo.pincodestringCustomer's Zip/Postal code
billedTo.gstStatestring(Required Only for India) Vendor's gst state code
billedTo.statestringCustomer's State or province (Ignored for India)
billedTo.country *stringISO 3166-1 alpha-2 Country code
billedTo.panNumberstringPAN (India Only)
billedTo.gstinstringGSTIN Number (India Only)
billedTo.phonestringCustomer's Phone in international format, example - +91 97394 32668
billedTo.emailemailCustomer's email
billedTo.emailShowInInvoicebooleanShow the customer's email on the invoice
billedTo.phoneShowInInvoicebooleanShow the customer's phone on the invoice
billedByobjectVendor's billing details -> In same format as billedTo, including emailShowInInvoice and phoneShowInInvoice
shippedToobjectShipping recipient's details -> In same format as billedTo
shippedFromobjectShipping sender's details -> In same format as billedTo
transportDetailsobjectRequired for EWB generation in India
transportDetails.vehicleNumberstringVehicle number
transportDetails.vehicleTypestring (enum)REGULAR, OVERDIMENSIONALCARGO
transportDetails.transportModestring (enum)ROAD, RAIL, AIR, SHIP -- required when passing vehicleNumber
transportDetails.transporterobjectTransporter details
transportDetails.transporter.namestringRequired when passing transporter.transporterId
transportDetails.transporter.transporterIdstringTransporter GSTIN (15 chars) or TransId
transportDetails.challanNumberstringChallan number
transportDetails.challanDatestringISO 8601 formatted date string
transportDetails.subSupplyTypestringFor example, supply
items *array[object]Invoice line items array
items[].name *stringLine item name
items[].rate *numberunit price of line item
items[].quantity *numbertotal quantity sold of line item
items[].gstRate
or items[].taxRate
numbertax rate if applicable
additionalChargesarray[object]Additional charges or invoice-level discounts. Applied after tax, on the post-tax amount.
additionalCharges[].labelstringCharge/Discount Label
additionalCharges[].amountnumberCharge/Discount amount
additionalCharges[].typestring (enum)PERCENTAGE, FIXED_AMOUNT
additionalCharges[].multipliernumber1 = additional charge; -1 = discount
termsarray[object]Invoice terms
terms[].labelstringTerms label
terms[].termsarray[string]List of term strings
tagsarray[string]Pass tag IDs. Contact Support to get IDs for tags created in your business.
emailobjectAdd if email should be sent after invoice creation to specified recipients
email.toobjectMain recipient of email
email.to.namestringName of main recipient
email.to.emailemailEmail of main recipient
email.ccarray[object]email CC list
email.cc[].namestringName of recipient
email.cc[].emailemailEmail of recipient

Find Invoices​

get /businesses/:urlKey/invoices

This endpoint allows you to find created invoices

Path Params

urlKey - will be provided by us

Headers

NameTypeValue Description
Content-Type *stringapplication-json
Authorization *stringBearer <jwt>

Query Prams

Optional - Can be used for limiting results

NameTypeValue Description
$limitnumberwill return only the number of results you specify
$skipnumberwill skip the specified number of results.
$sortobjectwill sort based on the object you provide.
$sort[createdAt]numbersort order on created date (1 ascending, -1 descending)
$sort[invoiceNumber]numbersort order on invoice number (1 ascending, -1 descending)
$sort[invoiceDate]numbersort order on invoice date (1 ascending, -1 descending)

Get Invoice​

get /businesses/:urlKey/invoices/:invoiceId

This endpoint allows you to get a invoice via invoiceId (_id)

Path Params

urlKey - will be provided by us

invoiceId - unique id of an invoice. (_id returned in create response or find response)

Headers

NameTypeValue Description
Content-Type *stringapplication-json
Authorization *stringBearer <jwt>

Cancel Invoice​

patch /businesses/:urlKey/invoices/:invoice?cancelPayment=true

This endpoint allows you to update an invoice for a specific business.

Path Params

urlKey - The unique identifier of the business.
invoice - The invoice ID for which the status is to be updated.

Query Params

NameTypeValue Description
cancelPaymentbooleanSet to true if you want to cancel the associated payments.

Headers

NameTypeValue Description
Content-Type *stringapplication-json
Authorization *stringBearer <jwt>

Body

{
"status": "CANCELED"
}