Skip to main content

getAccounts

Get all payment accounts as array.

Description

This method get payment account as an array. It returns a Promise that resolves to a payment account object IAccountsEntity.

Payments.getAccounts();

Examples

Minimal example

const response = await Payments.getAccounts();

Example response

[
{
"id": 3,
"localizeInfos": {
"title": "Stripe"
},
"identifier": "stripe",
"type": "stripe",
"isVisible": true,
"isUsed": true
},
{
"id": 2,
"localizeInfos": {
"title": "PayPal"
},
"identifier": "paypal",
"type": "custom",
"isVisible": true,
"isUsed": false
},
{
"id": 1,
"localizeInfos": {
"title": "Cash"
},
"identifier": "cash",
"type": "custom",
"isVisible": true,
"isUsed": true
}
]

Response schema

Schema: IAccountsEntity

id: number
Object identifier.
example: 12345

localizeInfos: ILocalizeInfo
Json description of the payment account object.

identifier: string
Text identifier for the recording field.
example: "payment_12345"

type: 'stripe' | 'custom'
Type may be 'stripe' or 'custom'.
example: 'stripe'

isVisible: boolean
Visibility indicator of the payment account.
example: true

isUsed: boolean
Usage indicator of the payment account.
example: false