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
Property | Data type | Description |
---|---|---|
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"]
}
Response parameters
Property | Data type | Description |
---|---|---|
id | string | Account 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 ] |
paymentReference | string | The bank account number associated with the payment. |
purchaseId | string | Unique ID to customers purchase |
myPagesLiveUrl | string | URL to our “live invoice” for the customer |
scheduledPaymentAmount | Number (Decimal) | Amount for scheduled payments |
scheduledPaymentChargeDate | String (DateTime) | Charge day for scheduled payments |
transactions | ||
description | string | A shorter description of the item (that would typically appear on an invoice line) |
notes | string | An optional longer description of the item that might or might not be displayed on the invoice. |
amount | decimal | The item amount. Can be negative, zero or positive. The tax amount should be included in the amount. |
taxCode | string | The tax code. The value should be in %. If tax code are 25% send in 25. |
taxAmount | decimal | The item tax amount. Can be zero or positive. |
transactionType | string | Type of the transaction |
transactionDate | string (DateTime) | Date of the transaction in ISO 8601 format |
orderReference | string | 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) | Original order amount |
receiver | string | Payment receiver – Avarda |
bankAccount | string | Avarda bank account where to pay the invoice |
aprData | ||
creditAmount | number | Credit amount |
months | number | Number of months for the credit |
perMonth | number | Amount per month |
percent | number | APR percentage |
totalCredit | number | Total credit amount |
totalAmount | number | Total amount including interest |
interestRate | number | Interest rate percentage |
invoiceFee | number | Invoice fee amount |
orderReference | string | Merchant custom ID reference |