Body of a receipt validation request

interface Body {
    additionalData?: {
        applicationUsername?: string | number;
    };
    billingPeriod?: string | number;
    billingPeriodUnit?: SubscriptionPeriodUnit;
    countryCode?: string;
    currency?: string;
    device?: DeviceInfo;
    group?: string;
    id?: string;
    introPriceMicros?: number;
    introPricePeriod?: string | number;
    introPricePeriodUnit?: SubscriptionPeriodUnit;
    license?: {
        storeIdKey_collections?: string;
        storeIdKey_purchases?: string;
    };
    offers?: {
        id: string;
        pricingPhases: CdvPurchase.PricingPhase[];
    }[];
    priceMicros?: number;
    products: {
        id: string;
        offers: {
            id: string;
            pricingPhases: CdvPurchase.PricingPhase[];
        }[];
        type: ProductType;
    }[];
    transaction?: ApiValidatorBodyTransaction;
    trialPeriod?: string | number;
    trialPeriodUnit?: SubscriptionPeriodUnit;
    type?: ProductType;
}

Properties

additionalData?: {
    applicationUsername?: string | number;
}

Additional data about the purchase

Type declaration

  • Optional applicationUsername?: string | number

    Attach the purchases to the given application user. Should be a string.

    See /documentation/application-username for more information.

    Optional

billingPeriod?: string | number

Number of periods units of between payments.

billingPeriodUnit?: SubscriptionPeriodUnit

Period unit used to define the billing interval (Day, Week, Month or Year)

countryCode?: string

The requesting users' 3 letters ISO Country Code.

currency?: string

Currency used for this product price (cf priceMicros)

device?: DeviceInfo

Metadata about the user's device

group?: string

The subscription group this product is part of

id?: string

Identifier of the product you want to validate. On iOS, can be set to your application identifier.

Required

introPriceMicros?: number

Define the price of this product in the introductory period, in micro units, for the associated currency

introPricePeriod?: string | number

Number of periods units of introductory pricing

introPricePeriodUnit?: SubscriptionPeriodUnit

Period unit of introductory pricing (Day, Week, Month or Year)

license?: {
    storeIdKey_collections?: string;
    storeIdKey_purchases?: string;
}

Microsoft license information

Type declaration

  • Optional storeIdKey_collections?: string

    Microsoft b2bKey for collections.

    Optional

  • Optional storeIdKey_purchases?: string

    Microsoft b2bKey for purchases.

    Optional

offers?: {
    id: string;
    pricingPhases: CdvPurchase.PricingPhase[];
}[]

Type declaration

priceMicros?: number

Define the price of the product in micro units (i.e. price / 1000000) for the associated currency

products: {
    id: string;
    offers: {
        id: string;
        pricingPhases: CdvPurchase.PricingPhase[];
    }[];
    type: ProductType;
}[]

List of products available in the store

Type declaration

  • id: string

    Product identifier on the store (unique per platform)

  • offers: {
        id: string;
        pricingPhases: CdvPurchase.PricingPhase[];
    }[]

    List of offers available for this product

  • type: ProductType

    Type of product (subscription, consumable, etc.)

Details about the native transaction.

Can be:

Required

trialPeriod?: string | number

Define the duration of the trial period, number of period units

trialPeriodUnit?: SubscriptionPeriodUnit

Define the unit for the duration of the trial period (Day, Week, Month, Year)

Type of product being validated. Possible values:

  • `application` – Validate the application download (Apple only).
  • `paid subscription` – An auto-renewing subscription.
  • `non renewing subscription` – A non renewing subscription.
  • `consumable` – A consumable product.
  • `non consumable` – A non-consumable product.

Required