API reference
Design
Platform
getPlatformInfo
API reference for the getPlatformInfo method.
This version of the API is deprecated. This version will soon be unsupported. You should use a stable version of the API in your app.
Returns information about the platform on which the app is running.
Usage
import { getPlatformInfo } from "@canva/platform";const info = getPlatformInfo();console.log(info); // => { ... }
TS
Returns
result
object
REQUIRED
Information about the platform on which the app is running.
result.canAcceptPayments
boolean
REQUIRED
If true
, the app is allowed to directly link to payment and upgrade flows.
This is sometimes false
to comply with the policies of the platforms on which Canva is available. For example, some platforms only allow payment-related actions that use their own payment mechanisms, and apps are therefore not allowed to render payment-related call-to-actions while running on those platforms.
To learn more, see Payment links.