v1

latestOpenAPI 3.0.3Apache 2.02026-07-13121230447.8 KB
Invoices

Create a custom invoice for an account

Create a custom invoice for an account.

post/invoices

Request body

accountIdstring required
ownerType'ACCOUNT' | 'INVOICE_GROUP'
startDatestring date-time required
endDatestring date-time required
idempotencyKeystring
status'DRAFT' | 'DUE' | 'PAID' required

Status to create an invoice in.

autoAdvanceboolean

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

applyCreditsboolean

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

applyWalletBalanceboolean

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

Example request

{
  "accountId": "ACC001",
  "startDate": "2020-06-04T12:00:00.000Z",
  "endDate": "2020-07-04T12:00:00.000Z",
  "idempotencyKey": "1234567890",
  "status": "DUE"
}

Response

Response for Get invoice requests

idstring required

Identifier of invoice

customerIdstring
ownerIdstring
pricePlanIdstring
status'DRAFT' | 'DUE' | 'PAID' | 'VOID' | 'UN_COLLECTIBLE' | 'REFUND_INITIATED' | 'REFUND_COMPLETED' | 'MERGED' | 'PARTIALLY_PAID' required

Status of the invoice

finalizingStatus'FINALIZING' | 'FINALIZED'
invoiceClass'INVOICE' | 'ORDER' | 'BILLABLE' required

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

invoiceType'STANDARD' | 'AD_HOC' | 'CUSTOM' | 'COMPOSITE' | 'STANDARD_ADVANCED' | 'ADHOC_ADVANCED' required

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

autoAdvanceboolean
startDatestring date-time

Start date of the invoice

endDatestring date-time

End date of the invoice

endDateInclusivestring date-time

Inclusive end date of the invoice

invoiceDatestring date-time required

Invoice date of the invoice

dueDatestring date-time

Due date of the invoice

generatedAtstring date-time
updatedAtstring date-time required
metadataobject
sequenceIdstring

Sequence id of the invoice

pdfUrlstring

Download URL of the pdf file corresponding to the invoice

totalAmountnumber required
paidAmountnumber required
netTermDaysinteger required

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

Example response

{
  "autoAdvance": true,
  "startDate": "2020-07-04T12:00:00.000Z",
  "endDate": "2020-07-04T12:00:00.000Z",
  "endDateInclusive": "2020-07-03T11:59:59.999Z",
  "invoiceDate": "2020-07-04T12:00:00.000Z",
  "dueDate": "2020-07-04T12:00:00.000Z"
}