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,
"identifier": "stripe",
"isVisible": true,
"localizeInfos": {
"title": "Stripe"
},
"type": "stripe",
"isUsed": true,
"testMode": true,
"settings": {
"status": "not_connected"
},
"testSettings": {
"status": "connected",
"cancelUrl": "https://your-project.oneentry.cloud/",
"successUrl": "https://your-project.oneentry.cloud/",
"sessionTimeout": 15,
"stripeAccountId": "acct_1QwkKrAcSoNc7iev",
"signingSecretKey": "whsec_erL2VHfoVel9RoPNTSa0Yg23UsVbZjkG",
"stripeRedirectUrl": "https://connect.stripe.com/setup/s/acct_1QwkKrAcSoNc7iev/P86lOscuMN2o",
"stripePublishableKey": "pk_test_51Say4J2eHDtEbbediqZlslL2q7UN3MurGPHNm8m0IGGCh0QQqbu2ILQUqW7WiWWZtF9Iq5FVDvBXacRcKinEDHc900OQ7n6SUk",
"useWebHookValidation": true,
"stripeOnboardingComplete": true
},
"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

testMode: boolean
Indicates whether the payment account is in test mode.
example: true

settings: IPaymentAccountSettings
Payment account settings.
example: { "status": "connected" }

settings.status: string
Connection status of the live (non-test) payment account.
example: "connected"

testSettings: object
Test mode settings for the payment account.

updatedDate: string
Object modification date.
example: "2025-02-26T10:13:16.839Z"