SaligPay (Main Client)
| Method | Returns | Description |
|---|---|---|
authenticate() | Promise<SaligPayAuthTokens> | Authenticate and store tokens |
isAuthenticated() | boolean | Check if currently authenticated |
getAccessToken() | string or undefined | Get current access token |
ensureAuthenticated() | Promise<void> | Ensure authentication, refresh if needed |
AuthResource
| Method | Returns | Description |
|---|---|---|
authenticate(clientId?, clientSecret?) | Promise<SaligPayAuthTokens> | Get access tokens |
refreshToken(refreshToken) | Promise<SaligPayAuthTokens> | Refresh access token |
loginAndRetrieveCredentials(email, password, adminKey?) | Promise<LoginResult> | Full login flow |
validateToken(accessToken) | Promise<boolean> | Validate token validity |
CheckoutResource
| Method | Returns | Description |
|---|---|---|
create(options, accessToken?) | Promise<CreateCheckoutApiResponse> | Create checkout session |
setAccessToken(token) | void | Set default access token |
WebhookResource
| Method | Returns | Description |
|---|---|---|
constructEvent(payload) | SaligPayWebhookPayload | Parse webhook body |
listen(req, res, handler) | Promise<void> | Express middleware handler |
process(payload, handler) | Promise<void> | Manual processing |
Last modified on
