MyPages API
Accounts

List of all accounts on a specific customer

To get a complete list of all accounts that belongs to a certain customer you just need to send one of their purchaseIds. This will not contain details on the accounts but could be used to present an overview of all accounts and their current status.

GET/Accounts

* Required

PropertyData typeDescription
PATH:
purchaseId *stringpurchaseId
HEADER:
customerAuthToken *stringUnique token per customer
customerTokenProvider *string (Enum)Available values: [ Self, Google
customerAuthenticationReturnUrl *stringURL customer will return to
after identification. Since loans are considered sensitive information, the customer must show that they are permitted to access that information sensitive information
BODY:
empty

Response

Code: 202

{
  "redirectUrl": "string"
}

redirectURL – to redirect customer for identification

Code: 200

{
  "id": "string",
  "currency": "SEK",
  "balance": 0,
  "type": "Invoice",
  "dueDate": "2021-11-27T16:30:11.848Z",
  "accountDate": "2021-11-27T16:30:11.848Z",
  "state": "Unpaid",
  "paymentReference": "string",
  "purchaseId": ["string"],
  "myPagesLiveUrl": "string",
  "scheduledPaymentAmount": 0,
  "scheduledPaymentChargeDate": "2021-11-27T16:30:11.848Z",
  "transactions": [
    {
      "description": "string",
      "notes": "string",
      "amount": 0,
      "taxAmount": 0,
      "taxCode": "string",
      "transactionType": "string",
      "transactionDate": "2021-11-27T16:30:11.848Z",
      "orderReference": "string"
    }
  ],
  "minimumAmountToPay": 0,
  "originalAmount": 0,
  "receiver": "string",
  "bankAccount": "string",
  "aprData": {
    "creditAmount": 0,
    "months": 0,
    "perMonth": 0,
    "percent": 0,
    "totalCredit": 0,
    "totalAmount": 0,
    "interestRate": 0,
    "invoiceFee": 0
  },
  "orderReference": ["string"]
}

Response parameters

PropertyData typeDescription
idstringAccount ID
currency *string (Enum)CurrencyCodes: [ SEK, EUR, NOK, DKK ]
balance *number (decimal)
type *string (Enum)AccountType: [ Invoice, Loan, LargeAmountLoan, B2BInvoice, DirectInvoice ]
dueDate *string (DateTime)Account due date
accountDate *string (DateTime)Account date
state *string (Enum)PaymentStatusTypes: [ Unpaid, Paid, Postponed, Overdue, NotProduced, Transferred, PaymentScheduled, ProcessingPayment ]
paymentReferencestringThe bank account number associated with the payment.
purchaseIdstringUnique ID to customers purchase
myPagesLiveUrlstringURL to our “live invoice” for the customer
scheduledPaymentAmountNumber (Decimal)Amount for scheduled payments
scheduledPaymentChargeDateString (DateTime)Charge day for scheduled payments
transactions
descriptionstringA shorter description of the item (that would typically appear on an invoice line)
notesstringAn optional longer description of the item that might or might not be displayed on the invoice.
amountdecimalThe item amount. Can be negative, zero or positive. The tax amount should be included in the amount.
taxCodestringThe tax code. The value should be in %. If tax code are 25% send in 25.
taxAmountdecimalThe item tax amount. Can be zero or positive.
transactionTypestringType of the transaction
transactionDatestring (DateTime)Date of the transaction in ISO 8601 format
orderReferencestringMerchants order reference on transaction
minimumAmountToPay *number (Decimal)Lowest amount customer can pay. If a customer pay an invoice and choose to pay an amount lower than total amount of the invoice, they will be rolled over to loan.
originalAmount *number (Decimal)Original order amount
receiverstringPayment receiver – Avarda
bankAccountstringAvarda bank account where to pay the invoice
aprData
creditAmountnumberCredit amount
monthsnumberNumber of months for the credit
perMonthnumberAmount per month
percentnumberAPR percentage
totalCreditnumberTotal credit amount
totalAmountnumberTotal amount including interest
interestRatenumberInterest rate percentage
invoiceFeenumberInvoice fee amount
orderReferencestringMerchant custom ID reference