v2.1.0

PaymentManager

Payment status of a Bitrix24 application — extracted from app.info.

PaymentManager wraps the payment-related fields of app.info (PAYMENT_EXPIRED, DAYS). Created when LoadDataType.App is requested; reachable through B24HelperManager.paymentInfo.

Usage

import { useB24Helper, LoadDataType } from '@bitrix24/b24jssdk'

const { initB24Helper, getB24Helper } = useB24Helper()
await initB24Helper($b24, [LoadDataType.App])

const payment = getB24Helper().paymentInfo.data
if (payment.isExpired) {
  console.warn(`Paid period ended ${payment.days} day(s) ago`)
}

Getter data

get data(): TypePayment
FieldTypeDescription
isExpiredbooleantrue once the paid period or the trial has ended.
daysnumberDays remaining (when isExpired === false) or days since expiration (when isExpired === true).