Properties of the invoice object
{
/* Id, non-mutable and set by Upodi */
"id": "guid",
"customerid": "guid",
"subscriptionid": "guid",
"description": "string",
"currencycode": "string",
/* Total amount incl. VAT, set by Upodi. */
"totalamount": "decimal",
"total": "decimal",
/* Total VAT, set by Upodi. */
"totalvat": "decimal",
"invoicedate": "datetime",
"duedate": "datetime",
"paymentdate": "datetime",
/*
See table below.
*/
"paymentstatus": "integer",
/*
SettlementStatus set by Upodi.
0=notsettled,2=partiallysettled,4=settled,8=oversettled
*/
"settlementstatus": "integer",
/*
Invoice status set by Upodi.
1024=failed,0=draft,2=pendingbooked,10=booked,50=cancelled
*/
"invoicestatus": "integer",
/* custom key, example a remote id */
"refkey": "string",
/* a reference for the purchase, useful for a purchase order number or similar */
"invoicereference": "string",
/* payment method associated with the invoice */
"paymentmethodid": "guid",
"paymentmethod": "paymentmethod object",
/* text representation of the payment method */
"paymentdescriptor": "string",
/* payment provider specific data related to last payment */
"paymentreference": "string",
/* the card issuer fx visa or mastercard */
"paymentissuer": "string",
/* true if invoice is a credit note. read-only */
"iscreditnote" : "boolean",
/* 1=delivered, 2=read, 0=notset */
"emailstatus" : "integer",
/* date of email first delivery */
"emaildelivereddate" : "datetime",
/* date of email first opened */
"emailopeneddate" : "datetime",
/* the payment service provider used for the payment fx stripe */
"paymentprovider": "string",
"paymentterm": "integer",
/* 0=Invoice, 1=Amendment */
"invoicetype": "integer",
/* text representation of the invoice (example INV-0002130) */
"invoicenumber": "string",
/* numeric of the invoice number (example 2130) */
"invoicenumeric" : "long",
"invoicecounter": "long",
"subscription": "subscription object",
"customer": "customer object",
/* if the invoice is billed to parent, this is the child customer that holds the subscription */
"childid": "guid",
"child": "customer object",
"businessunitid": "guid",
"businessunit": "businessunit object",
"invoicelines": "invoicelines[] array",
/* set by Upodi - state of dunning, see below */
"dunningstatus" : "integer",
"dunningschemeid": "guid",
"dunningscheme": "dunningscheme",
"dunningstep": "integer",
/* set by Upodi - external ERP id */
"externalfinance" : "string",
/* normal=0, draft=1, booked=2, failedbook=1024 */
"externalstatecode" : "integer",
/* the error received from the receiving system of the invoice */
"externalerror": "string",
/* used for integration, can be set to a custom value */
"refkey" : "string",
"nextretry": "datetime",
/* set by upodi */
"createdby": "guid",
/* set by upodi */
"modifiedby": "guid",
/* set by upodi */
"createddate": "datetime",
/* set by upodi */
"modifieddate": "datetime"
}
Invoice PaymentStatus
Int. Read-only. Set by Upodi.
Value | Identification | Description |
---|---|---|
0 | NotPaid | Invoice is not paid. Default value. |
20 | Paid | Invoice is paid. |
50 | Cancelled | Invoice is cancelled. |
60 | PendingPayment | Intermediate stage. Before payment is run. |
70 | PendingResponse | Invoice is scheduled and awaits final payment response. |
71 | PendingResponseCallback | Invoice is scheduled and awaits final payment response from webhook. |
72 | ProcessingWebhook | Intermediate step from PendingResponseCallback. |
80 | Declined | Payment of invoice is declined. |
90 (depreciated) | PendingRetry | Depreciated. |
100 (depreciated) | Dunning | Depreciated. |
1024 | Failure | An unhandled payment error occued. |
Invoice InvoiceStatus
Int. Read-only. Set by Upodi.
Value | Identification | Description |
---|---|---|
0 | Draft | Invoice can be altered. |
2 | Pending booked. | Intermediate state between draft and booked. An invoice in this state, is being booked. |
3 | Pending graceful booking. | Intermediate state between draft and booked. An invoice in this state has been requested booked via graceful booking (asynchronious). |
5 | Collective draft. | Invoice is a collective draft. |
10 | Booked | Invoice is booked. |
50 | Cancelled | Invoice was booked, but now cancelled. |
1024 | Failed | Booking of invoice caused an unhandled failure. Staff of Upodi is alerted. |
Invoice DunningStatus
Int. Read-only. Set by Upodi.
Value | Identification | Description |
---|---|---|
1 | InDunning | Dunning is currently running. Please see NextRetry and DunningStep to determine next possible action. |
2 | Completed | Dunning have completed. All steps are run on the invoice. |
3 | Cancelled | Dunning was cancelled. |
0 | Not set | Default state. No dunning on invoice. |