POST
/
invoices

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Payload to create invoice

accountId
string
required
endDate
string
required
lineItems
object[]
required
startDate
string
required
status
enum<string>
required

Status to create an invoice in.

Available options:
DRAFT,
DUE,
PAID
applyCredits
boolean

This property defines the behaviour of whether or not to use credits to net off with the invoice amount. Default: true

applyWalletBalance
boolean

This property defines the behaviour of whether or not to use wallet amount to net off with the invoice amount. Default: true

autoAdvance
boolean

This property defines the behaviour of status transition of the invoice. If true, invoice auto transitions from DRAFT to DUE or PAID at the end of pricing cycle. If false, the invoice’s state doesn’t automatically advance without an explicit action. Default: false

idempotencyKey
string
ownerType
enum<string>
Available options:
ACCOUNT,
INVOICE_GROUP

Response

201 - application/json

Structure of invoice

id
string
required

Identifier of invoice

Maximum length: 50
invoiceClass
enum<string>
required

Represents the class of entity( INVOICE/ORDER/BILLABLE)

Available options:
INVOICE,
ORDER,
BILLABLE
invoiceDate
string
required

Invoice date of the invoice

invoiceType
enum<string>
required

Represents the type of entity(STANDARD/AD_HOC/COMPOSITE)

Available options:
STANDARD,
AD_HOC,
CUSTOM,
COMPOSITE,
STANDARD_ADVANCED,
ADHOC_ADVANCED
netTermDays
integer
required

Number of days from the invoice date after which an invoice is considered overdue.

paidAmount
number
required
status
enum<string>
required

Status of the invoice

Available options:
DRAFT,
DUE,
PAID,
VOID,
UN_COLLECTIBLE,
REFUND_INITIATED,
REFUND_COMPLETED,
MERGED,
PARTIALLY_PAID
totalAmount
number
required
updatedAt
string
required
autoAdvance
boolean
customerId
string
dueDate
string

Due date of the invoice

endDate
string

End date of the invoice

endDateInclusive
string

Inclusive end date of the invoice

finalizingStatus
enum<string>
Available options:
FINALIZING,
FINALIZED
generatedAt
string
info
object[]
invoiceDetails
object
metadata
object
ownerId
string
pdfUrl
string

Download URL of the pdf file corresponding to the invoice

pricePlanId
string
revenueInfo
object
sequenceId
string

Sequence id of the invoice

startDate
string

Start date of the invoice

usageInfo
object[]