invoice object

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.

ValueIdentificationDescription
0NotPaidInvoice is not paid. Default value.
20PaidInvoice is paid.
50CancelledInvoice is cancelled.
60PendingPaymentIntermediate stage. Before payment is run.
70PendingResponseInvoice is scheduled and awaits final payment response.
71PendingResponseCallbackInvoice is scheduled and awaits final payment response from webhook.
72ProcessingWebhookIntermediate step from PendingResponseCallback.
80DeclinedPayment of invoice is declined.
90 (depreciated)PendingRetryDepreciated.
100 (depreciated)DunningDepreciated.
1024FailureAn unhandled payment error occued.

Invoice InvoiceStatus

Int. Read-only. Set by Upodi.

ValueIdentificationDescription
0DraftInvoice can be altered.
2Pending booked.Intermediate state between draft and booked. An invoice in this state, is being booked.
3Pending graceful booking.Intermediate state between draft and booked. An invoice in this state has been requested booked via graceful booking (asynchronious).
5Collective draft.Invoice is a collective draft.
10BookedInvoice is booked.
50CancelledInvoice was booked, but now cancelled.
1024FailedBooking of invoice caused an unhandled failure. Staff of Upodi is alerted.

Invoice DunningStatus

Int. Read-only. Set by Upodi.

ValueIdentificationDescription
1InDunningDunning is currently running. Please see NextRetry and DunningStep to determine next possible action.
2CompletedDunning have completed. All steps are run on the invoice.
3CancelledDunning was cancelled.
0Not setDefault state. No dunning on invoice.