For the complete documentation index, see llms.txt. This page is also available as Markdown.

IAP.getSubscriptionInfo

Feature description

Get the current status information of a subscription order.

The parameter is { params: { orderId } } Preserve nesting.

Toss app Android 5.253.0, iOS 5.250.0 It can be used on versions above. If called in an unsupported version, UNSUPPORTED_APP_VERSION an error occurs.

Type

IAP.getSubscriptionInfo(args: { params: { orderId: string } }): Promise<IapSubscriptionInfoResponse>;

Params

{
  params: {
    orderId: string;
  }
}

Response

type IapSubscriptionInfoResponse = {
  subscription: IapSubscriptionInfoResult;
};

type IapSubscriptionInfoResult = {
  catalogId: number;
  status:
    "ACTIVE" | "EXPIRED" | "IN_GRACE_PERIOD" | "ON_HOLD" | "PAUSED" | "REVOKED";
  expiresAt: string | null;
  isAutoRenew: boolean;
  gracePeriodExpiresAt: string | null;
  isAccessible: boolean;
};

Error

The error code is the error.code value.

Code
Description

UNSUPPORTED_APP_VERSION

If the running version of the Toss app doesn't support this feature, it occurs immediately upon call. IAP.getSubscriptionInfo.isSupported()Check in advance with error.messageand, if it occurs, show the user the (update guidance message).

Example code

Was this helpful?