Ana içeriğe geç

getSessions

Ödeme oturumlarının listesini al 🔐 Bu yöntem yetkilendirme gerektirir.

Payments.getSessions(offset, limit)

const value = await Payments.getSessions()
Şema

offset: number
Sayfalama için isteğe bağlı parametre, varsayılan 0'dır
örnek: 0

limit: number
Sayfalama için isteğe bağlı parametre, varsayılan 30'dur
örnek: 30

Bu yöntem, bir ödeme oturumunun listesini alır. Bir ödeme oturumu nesnesine çözülmek üzere bir Promise döner.

Örnek dönüş:

{
"total": 100,
"items": [
{
"id": 1764,
"updatedDate": "2024-06-21T09:51:57.785Z",
"type": "session",
"status": "completed",
"orderId": 1,
"paymentAccountId": 1,
"paymentUrl": "https://checkout.stripe.com/c/pay/cs_test_a1iOHnSWAmeN3SN5IgYtPv8Fzv48vGUmKxFuhxD0FOjkOaTAlgiwNY9OYW#fid2BXKsdWBEZmZqcGtxJz8nZGZmcVo0VTZjazFUb2Z8YEBRYkxHJyknZHVsTmB8Jz8ndW5acWB2cVowNEpKcW43TVVBa1NSMU5ST3JfY3VcRGlRSUR8cVx0XFxOXG9Cbn1oM1V0QUExR0RRRnJwV0FCYlNcXUtGdGtzcndgcmJxQVNkQnxvcDBTY0ZpUjZCd319UTU1ME5rXDJIVjYnKSdjd2poVmB3c2B3Jz9xd3BgKSdpZHxqcHFRfHVgJz8ndmxrYmlgWmxxYGgnKSdga2RnaWBVaWRmYG1qaWFgd3YnP3F3cGB4JSUl",
"clientSecret": "pi_3MtwBwLkdIwHu7ix28a3tqPa_secret_YrKJUKribcBjcG8HVhfZluoGH"
}
]
}
Şema

id: number
nesne tanımlayıcısı
örnek: 1764

updatedDate: string
nesne güncelleme tarihi

version: number
nesne güncelleme sürüm numarası
örnek: 10

identifier: string
kayıt alanı için metin tanımlayıcı
örnek: catalog

type: string
tür 'session' veya 'intent' olabilir
örnek: session

lineItems: array
ürünlerin listesi

orderId: number
sipariş tanımlayıcısı
örnek: 1

paymentAccountId: number
ödeme hesabı nesne tanımlayıcısı
örnek: 1

status: string
ödeme durumu
örnek: completed

sessionId: string
harici bir sağlayıcıdan alınan Ödeme ID'si
örnek: 9BE88048TU058770M

paymentUrl: string
ödeme bağlantısı
örnek: https://www.sandbox.paypal.com/checkoutnow?token=9BE88048TU058770M

successUrl: string
başarılı ödeme sonrası yönlendirme bağlantısı
örnek: https://example.com/success

cancelUrl string
ödeme iptali sonrası yönlendirme bağlantısı
örnek: https://example.com/cancel

intent string
örnek:

{
"amount": 1,
"currency": "usd"
}

intentId number
niyet nesne tanımlayıcısı
örnek: 1

clientSecret string
müşteri gizli anahtarı
örnek: pi_3Oyz2kQWzXG1R23w144qG7o4_secret_OeScuCwTpHmyOM1atbm7pWJw2