Transactions History

Receive the data from historic invoices

The /credit_risk/get returns the history of invoices (up to 24 months) and payments associated with an account.

Sample response

{
  "source_name": "string",
  "source_type": "Electricity",
  "source_country": "string",
  "accounts": [
    {
      "account_number": "string",
      "account_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "user_number": "string",
      "currency_code": "string",
      "invoices": [
        {
          "invoice_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "invoice_number": "string",
          "invoice_date": "2024-01-11",
          "current_balance": 0,
          "currency_code": "string"
        }
      ],
      "payments": [
        {
          "payment_date": "2024-01-11",
          "payment_amount": 0,
          "currency_code": "string"
        }
      ]
    }
  ]
}

Refer to the API reference section for more details

FieldDescriptionExpected Output
source_nameThe data source or Utility provider that has generated the dataName of Utility provider
source_typeThe type of data sourceElectricity, Water, Fuel, Gas
source_countryThe country where the utility has been consumedCountry
accounts
account_numberThe Unique account number found on the InvoiceNumber
account_idA unique account identifier generated by Deck. Use it to query endpoints to denote a specific accountAlphanumeric value
user_numberThe unique identifier of the consumer, provided by the Utility (on the Invoice)Number
currency_codeThe currency code denotes the billing currency associated with the account3 digit code
invoice
invoice_idUnique identifier of an Invoice that has been fetched from the source. Generated by Deck, use it when you need to retrieve the invoice PDFAlphanumeric value
invoice_numberThe invoice number generated by the Data sourceNumber
invoice_dateThe date the invoice was generated, as printed on the invoiceDate
current_balanceThe current balance as indicated by the invoice
currency_codeThe currency associated with billing for the account3 digit code
payments
payment_dateThe date on which payment was made for the invoiceDate
payment_amountThe payment amount that was processed for the Invoice
currency_codeThe currency associated with billing for the account3 digit code