Lewati ke konten utama

getAccounts

Dapatkan semua akun pembayaran sebagai array.

Deskripsi

Metode ini mendapatkan akun pembayaran sebagai array. Ini mengembalikan Promise yang menyelesaikan menjadi objek akun pembayaran IAccountsEntity.

Pembayaran.getAccounts();

Contoh

Contoh minimal

const response = await Payments.getAccounts();

Contoh respons

[
{
"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": true,
"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"
}
]

Skema respons

Skema: IAccountsEntity

id: number
Pengidentifikasi objek.
contoh: 12345

localizeInfos: ILocalizeInfo
Deskripsi Json dari objek akun pembayaran.

identifier: string
Pengidentifikasi teks untuk bidang pencatatan.
contoh: "payment_12345"

type: 'stripe' | 'custom'
Tipe dapat berupa 'stripe' atau 'custom'.
contoh: 'stripe'

isVisible: boolean
Indikator visibilitas akun pembayaran.
contoh: true

isUsed: boolean
Indikator penggunaan akun pembayaran.
contoh: false

testMode: boolean
Menunjukkan apakah akun pembayaran dalam mode uji.
contoh: true

settings: IPaymentAccountSettings
Pengaturan akun pembayaran.
contoh:

{ "status": "connected" }

settings.status: string
Status koneksi dari akun pembayaran langsung (non-uji).
contoh: "connected"

testSettings: object
Pengaturan mode uji untuk akun pembayaran.

updatedDate: string
Tanggal modifikasi objek.
contoh: "2025-02-26T10:13:16.839Z"