getSessionById
Get one payment session object by its identifier. 🔐 This method requires authorization.
Description
This method get a single payment session object by its identifier. It returns a Promise that resolves to a payment session object.
Payments.getSessionById(
id
);
Parameters schema
Schema
id(required): number
Identifier of the retrieved payment session object
example: 12345
Examples
Minimal example
const value = await Payments.getSessionById(1764);
Example response
{
"id": 21,
"createdDate": "2025-02-26T10:13:16.839Z",
"updatedDate": "2025-02-26T10:13:16.839Z",
"type": "session",
"status": "waiting",
"paymentAccountId": 1,
"orderId": 43,
"paymentUrl": null
}
Response schema
Schema: ISessionEntity
id: number
Object identifier.
example: 1764
createdDate: string
Object creation date.
example: "2025-02-26T10:13:16.839Z"
updatedDate: string
Object modification date.
example: "2025-02-26T10:13:16.839Z"
type: string
Type may be 'session' or 'intent'.
example: "session"
status: string
Payment status.
example: "completed"
paymentAccountId: number
Payment ID from an external provider.
example: NaN
orderId: number
Order identifier.
example: 1
paymentUrl: string | null
payment link.
example: " https://www.sandbox.paypal.com/checkoutnow?token=9BE88048TU058770M"