getSessionById
Get one payment session object by its identifier 🔐 This method requires authorization.
Payments.getSessionById(id)
const value = await Payments.getSessionById(1764)
Schema
id:* number
Identifier of the retrieved payment session object
example: 12
This method get a single payment session object by its identifier. It returns a Promise that resolves to a payment session object.
Example return:
{
"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...",
"clientSecret": "pi_3MtwBwLkdIwHu7ix28a3tqPa_secret..."
}
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_3Oyz2kQWz...