getSessions
Get list of payment sessions 🔐 This method requires authorization.
Payments.getSessions(offset, limit)
const value = await Payments.getSessions()
Schema
offset: number
Optional parameter for pagination, default is 0
example: 0
limit: number
Optional parameter for pagination, default is 30
example: 30
This method get list of a payment session. It returns a Promise that resolves to a payment session object.
Example return:
{
"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"
}
]
}
Schema
id: number
object identifier
example: 1764
updatedDate: string
object modification date
version: number
object modification version number
example: 10
identifier: string
text identifier for the record field
example: catalog
type: string
type may be 'session' or 'intent'
example: session
lineItems: array
list of items
orderId: number
order identifier
example: 1
paymentAccountId: number
payment account object identifier
example: 1
status: string
payment status
example: completed
sessionId: string
Payment ID from an external provider
example: 9BE88048TU058770M
paymentUrl: string
payment link
example: https://www.sandbox.paypal.com/checkoutnow?token=9BE88048TU058770M
successUrl: string
redirect link after successful payment
example: https://example.com/success
cancelUrl string
redirect link after payment cancellation
example: https://example.com/cancel
intent string
example:
{
"amount": 1,
"currency": "usd"
}
intentId number
intent object identifier
example: 1
clientSecret string
client secret key
example: pi_3Oyz2kQWzXG1R23w144qG7o4_secret_OeScuCwTpHmyOM1atbm7pWJw2