Created with Sketch.
Created with Sketch.
Mypages Partner 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 * string purchaseId
HEADER:
customerAuthToken * string Unique token per customer
customerTokenProvider * string (Enum)Available values: [ Self, Google
customerAuthenticationReturnUrl * string URL 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"
  ]
}
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.
purchaseId[string]Unique 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
[ Transaction {
description
notes
amount*
taxAmount*
taxCode
transactionType transactionDate*

orderReference
}]
string
string
number (Decimal)
number (Decimal)
string
string

string(DateTime)
string

Transactions on invoice
Merchants description
Merchants item notes
Item price
Tax amount
Tax code

Date of transaction
Merchants 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) 
receiverstringPayment receiver – Avarda
bankAccountstringAvarda bank account where to pay the invoice
aprData 
AprData {
creditAmount*
months*
perMonth*
percent*
totalCredit* totalAmount* interestRate* invoiceFee*
}
number (Decimal) Integer (int32)
number (Decimal) number (Decimal) number (Decimal) number (Decimal) number (Decimal) number (Decimal)
orderReference[string]Merchant custom ID reference