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,
"identifier": "stripe",
"isVisible": true,
"localizeInfos": {
"title": "Stripe"
},
"type": "stripe",
"isUsed": true,
"testMode": true,
"settings": {
"status": "not_connected"
},
"testSettings": {
"cancelUrl": "https://stage.oneentry.cloud/",
"successUrl": "https://stage.oneentry.cloud/",
"sessionTimeout": 15,
"stripeAccountId": "acct_1QwkKrAcSoNc7iev",
"stripeRedirectUrl": "https://connect.stripe.com/setup/s/acct_1QwkKrAcSoNc7iev/P86lOscuMN2o",
"stripeOnboardingComplete": true,
"stripePublishableKey": "pk_test_51NFuARAjjmJ80CVnnFoxEsGHmvsgt3Ki9eKvPGGjSVduaEEeLvabwVS8QkcFT0PHu1uxG7CRY0ZTF1dGTD0NIcJk00rNawdm0Z",
"status": "connected"
},
"updatedDate": "2025-02-26T13:04:12.806Z"
},
{
"id": 2,
"identifier": "paypal",
"isVisible": true,
"localizeInfos": {
"title": "PayPal"
},
"type": "custom",
"isUsed": false,
"testMode": true,
"settings": {
"status": "connected"
},
"testSettings": {
"status": "connected"
},
"updatedDate": "2025-02-25T08:56:32.384Z"
},
{
"id": 1,
"identifier": "cash",
"isVisible": true,
"localizeInfos": {
"title": "Cash"
},
"type": "custom",
"isUsed": true,
"testMode": true,
"settings": {
"status": "connected"
},
"testSettings": {
"status": "connected"
},
"updatedDate": "2025-02-25T08:55:43.957Z"
}
]
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