getSessions
Get list of payment sessions. 🔐 This method requires authorization.
Description
This method get list of a payment session. It returns a Promise that resolves to a payment session object ISessionsEntity.
Payments.getSessions(
offset,
limit
);
Parameters schema
Schema
offset: number
Optional parameter for pagination. Default: 0
example: 0
limit: number
Optional parameter for pagination. Default: 30
example: 30
By default, you can retrieve 10 objects. This is due to the record limit in the module's permissions settings.
For pagination to work correctly, you need to configure Module permissions according to your needs in the corresponding section.
Examples
Minimal example
const response = await Payments.getSessions();
Example with attributes
const response = await Payments.getSessions(0, 30);
Example response
{
"items": [
{
"id": 47,
"createdDate": "2025-11-06T06:42:12.463Z",
"updatedDate": "2025-11-06T06:42:12.463Z",
"type": "session",
"status": "waiting",
"paymentAccountId": 3,
"orderId": 205,
"paymentUrl": "https://checkout.stripe.com/c/pay/cs_test_a19RuP9hh4gGmaSOQwb57OBpnypIifa0FDnGhYe7od5XkRXRUpYXUKDRtm#fidnandhYHdWcXxpYCc%2FJ2FgY2RwaXEnKSd2cXdsdWBEZmZqcGtxJz8nZGZmcVo0VHJuTndEZlZqS2YybGBzJyknZHVsTmB8Jz8ndW5acWB2cVowNEtDcERXRG9vaE89NUZTa2tDan1AdkJNaHN2YnE2Tmw8YE5zVUJCb1ZTYXBkQEBgSXNkZ3JTVj1UbmZDUTVVTXA0cH1CMkZXXDVfUUM0YUJRQTVLTGZPbjU1d0tkcmFoNV8nKSdjd2poVmB3c2B3Jz9xd3BgKSdnZGZuYndqcGthRmppancnPycmY2NjY2NjJyknaWR8anBxUXx1YCc%2FJ3Zsa2JpYFpscWBoJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
},
{
"id": 46,
"createdDate": "2025-11-05T11:41:05.450Z",
"updatedDate": "2025-11-06T06:42:12.457Z",
"type": "session",
"status": "canceled",
"paymentAccountId": 3,
"orderId": 205,
"paymentUrl": "https://checkout.stripe.com/c/pay/cs_test_a13zyOnaZK22i261vea98XHczmJnyl4e3FuPOtOQRougzYxnkScUQAFmU0#fidnandhYHdWcXxpYCc%2FJ2FgY2RwaXEnKSd2cXdsdWBEZmZqcGtxJz8nZGZmcVo0VHJuTndEZlZqS2YybGBzJyknZHVsTmB8Jz8ndW5acWB2cVowNEtDcERXRG9vaE89NUZTa2tDan1AdkJNaHN2YnE2Tmw8YE5zVUJCb1ZTYXBkQEBgSXNkZ3JTVj1UbmZDUTVVTXA0cH1CMkZXXDVfUUM0YUJRQTVLTGZPbjU1d0tkcmFoNV8nKSdjd2poVmB3c2B3Jz9xd3BgKSdnZGZuYndqcGthRmppancnPycmY2NjY2NjJyknaWR8anBxUXx1YCc%2FJ3Zsa2JpYFpscWBoJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
},
{
"id": 45,
"createdDate": "2025-10-29T00:20:12.994Z",
"updatedDate": "2025-11-06T06:42:12.457Z",
"type": "session",
"status": "canceled",
"paymentAccountId": 3,
"orderId": 205,
"paymentUrl": "https://checkout.stripe.com/c/pay/cs_test_a1pJTQv77bFhh4exkyAWdh1I0klTQ68qA7ug69hkoUFVBTMdE1d7JLB5b6#fidnandhYHdWcXxpYCc%2FJ2FgY2RwaXEnKSd2cXdsdWBEZmZqcGtxJz8nZGZmcVo0VHJuTndEZlZqS2YybGBzJyknZHVsTmB8Jz8ndW5acWB2cVowNEtDcERXRG9vaE89NUZTa2tDan1AdkJNaHN2YnE2Tmw8YE5zVUJCb1ZTYXBkQEBgSXNkZ3JTVj1UbmZDUTVVTXA0cH1CMkZXXDVfUUM0YUJRQTVLTGZPbjU1d0tkcmFoNV8nKSdjd2poVmB3c2B3Jz9xd3BgKSdnZGZuYndqcGthRmppancnPycmY2NjY2NjJyknaWR8anBxUXx1YCc%2FJ3Zsa2JpYFpscWBoJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
},
"..."
],
"total": 43
}
Response schema
Schema: ISessionsEntity
total: number
Total number of found records.
example: 100
items: ISessionEntity
Array of session objects.
example:
[
{
"id": 27,
"createdDate": "2025-06-04T04:38:32.849Z",
"updatedDate": "2025-06-04T04:38:32.849Z",
"type": "session",
"status": "waiting",
"paymentAccountId": 1,
"orderId": 55,
"paymentUrl": null
}
]
items.id: number
Object identifier.
example: 1764
items.createdDate: string
Object creation date.
example: "2025-02-26T10:13:16.839Z"
items.updatedDate: string
Object modification date.
example: "2025-02-26T10:13:16.839Z"
items.type: string
Type may be 'session' or 'intent'.
example: "session"
items.status: string
Payment status.
example: "completed"
items.paymentAccountId: number
Payment ID from an external provider.
example: NaN
items.orderId: number
Order identifier.
example: 1
items.paymentUrl: string | null
payment link.
example: " https://www.sandbox.paypal.com/checkoutnow?token=9BE88048TU058770M"