createSession
Create payment session. 🔐 This method requires authorization?.
Payments?.createSession( orderId?, type?, automaticTaxEnabled? );
Minimal example
const value = await Payments.createSession(1, 'session')
Schema
orderId(required): number
Order identifier
example: 12345
type(required): 'session' | 'intent'
Session type. Possible values: "session" or "intent"
example: 'session'
automaticTaxEnabled: boolean
Automatic calculation of the tax rate. Default: false
example: false
This method creation of a payment session. It returns a Promise that resolves to a payment session object.
Example response
{
"id": 1764,
"updatedDate": "2024-06-21T09:53:28.898Z",
"version": 10,
"identifier": "my-id",
"paymentUrl": "https://paymewntlink.com"
}
Schema
id: number
Object identifier.
example: 12345
updatedDate: string
Object modification date.
example: "2023-10-01T12:00:00Z"
version: number
Version of the object.
example: 1
identifier: string
Text identifier for the recording field.
example: "payment_12345"
paymentUrl: string
Payment link.
example: "https://example.com/payment/12345"