Ana içeriğe geç

getAccounts

Tüm ödeme hesaplarını dizi olarak alır.

Açıklama

Bu yöntem, ödeme hesabını bir dizi olarak alır. Bir ödeme hesabı nesnesi olan IAccountsEntity'ye çözülen bir Promise döner.

Ödemeler.getAccounts();

Örnekler

Minimal örnek

const response = await Payments.getAccounts();

Örnek yanıt

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

Yanıt şeması

Şema: IAccountsEntity

id: number
Nesne tanımlayıcısı.
örnek: 12345

localizeInfos: ILocalizeInfo
Ödeme hesabı nesnesinin Json tanımı.

identifier: string
Kayıt alanı için metin tanımlayıcısı.
örnek: "payment_12345"

type: 'stripe' | 'custom'
Tür 'stripe' veya 'custom' olabilir.
örnek: 'stripe'

isVisible: boolean
Ödeme hesabının görünürlük göstergesi.
örnek: true

isUsed: boolean
Ödeme hesabının kullanım göstergesi.
örnek: false

testMode: boolean
Ödeme hesabının test modunda olup olmadığını gösterir.
örnek: true

settings: IPaymentAccountSettings
Ödeme hesabı ayarları.
örnek: { "status": "connected" }

settings.status: string
Canlı (test olmayan) ödeme hesabının bağlantı durumu.
örnek: "connected"

testSettings: object
Ödeme hesabı için test modu ayarları.

updatedDate: string
Nesne değişiklik tarihi.
örnek: "2025-02-26T10:13:16.839Z"