diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 01ffd42..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,84 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -[comment]: <> (## [Unreleased]) - -[comment]: <> (### Added) - -[comment]: <> (### Changed) - -[comment]: <> (### Deprecated) - -[comment]: <> (### Removed) - -[comment]: <> (### Fixed) - -[comment]: <> (### Security) - -## [1.3.1] - 2021-09-21 - -### Fixed - -- Fixed bugs report link in `package.json` - -## [1.3.0] - 2021-08-30 - -### Added - -- CommonJS support ([#4](https://github.com/tamtamchik/apple-iap-tools/issues/4), thx [@btjones](https://github.com/btjones)) - -## [1.2.1] - 2021-08-04 - -### Fixed - -- `getPendingRenewalInfo` helper now returns only latest transaction pending info. - -## [1.2.0] - 2021-04-20 - -### Add - -- `verifyReceipt` can throw `VerifyReceiptFetchError` now which contains original fetch response in `originalResponse`. - - -## [1.1.1] - 2021-04-20 - -### Fixed - -- Fails to import in Node ([#1](https://github.com/tamtamchik/apple-iap-tools/issues/1), thx [@vpzomtrrfrt](https://github.com/vpzomtrrfrt)) - -## [1.1.0] - 2021-03-24 - -### Added - -- Allow one instance of object to `latest_receipt_info` and `pending_renewal_info` props. -- Helper functions for `verifyReceipt` response status validation. -- Helper functions for obtaining data from `verifyReceipt` response. - -## [1.0.2] - 2021-03-22 - -### Removed - -- Duplication in typings. - -## [1.0.1] - 2021-03-22 - -### Fixed - -- Verification over Sandbox environment. - -## [1.0.0] - 2021-03-22 - -Initial release. - -[1.2.0]: https://github.com/tamtamchik/apple-iap-tools/compare/1.1.1...1.2.0 -[1.1.1]: https://github.com/tamtamchik/apple-iap-tools/compare/1.1.0...1.1.1 -[1.1.0]: https://github.com/tamtamchik/apple-iap-tools/compare/1.0.2...1.1.0 -[1.0.2]: https://github.com/tamtamchik/apple-iap-tools/compare/1.0.1...1.0.2 -[1.0.1]: https://github.com/tamtamchik/apple-iap-tools/compare/1.0.0...1.0.1 -[1.0.0]: https://github.com/tamtamchik/apple-iap-tools/releases/tag/1.0.0 - - diff --git a/docs/classes/verifyreceiptfetcherror.html b/docs/classes/verifyreceiptfetcherror.html index 4e1b4db..84dab12 100644 --- a/docs/classes/verifyreceiptfetcherror.html +++ b/docs/classes/verifyreceiptfetcherror.html @@ -1,6 +1,6 @@ VerifyReceiptFetchError | @tamtamchik/apple-iap-tools
Options
All
  • Public
  • Public/Protected
  • All
Menu

Error class for not OK responses.

-

Hierarchy

  • Error
    • VerifyReceiptFetchError

Index

Constructors

Properties

message: string
name: string
originalResponse: Response
stack?: string
prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

Type declaration

    • (err: Error, stackTraces: CallSite[]): any
    • +

Hierarchy

  • Error
    • VerifyReceiptFetchError

Index

Constructors

Properties

message: string
name: string
originalResponse: Response
stack?: string
prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

Type declaration

stackTraceLimit: number

Methods

  • captureStackTrace(targetObject: object, constructorOpt?: Function): void

Hierarchy

  • DeprecatedLatestReceiptInfo

Index

Properties

app_item_id: string
+

Hierarchy

  • DeprecatedLatestReceiptInfo

Index

Properties

app_item_id: string

An identifier that App Store Connect generates and the App Store uses to uniquely identify the app purchased. Treat this value as a 64-bit integer.

-
expires_date: string
+
expires_date: string

The time a subscription expires or when it will renew, in UNIX epoch time format, in milliseconds. Use this time format for processing dates. Note that this field is called expires_date_ms in the transaction.

example

1616411598724

-
expires_date_formatted_pst: string
+
expires_date_formatted_pst: string

The time a subscription expires or when it will renew, in the Pacific time zone. Note that this field is called expires_date_pst in the transaction.

example

2021-01-01 00:00:00 America/Los_Angeles

-
is_in_intro_offer_period: string
+
is_in_intro_offer_period: string

An indicator of whether an auto-renewable subscription is in the introductory price period.

link

https://developer.apple.com/documentation/appstorereceipts/is_in_intro_offer_period

-
is_trial_period: string
+
is_trial_period: string

An indicator of whether a subscription is in the free trial period.

link

https://developer.apple.com/documentation/appstorereceipts/is_trial_period

-
item_id: string
+
item_id: string

An identifier that App Store Connect generates and the App Store uses to uniquely identify the in-app product purchased. Treat this value as a 64-bit integer.

-
original_purchase_date: string
+
original_purchase_date: string

The time of the original app purchase, in a date-time format similar to the ISO 8601 standard.

example

2021-03-01 07:00:00 Etc/GMT

-
original_purchase_date_ms: string
+
original_purchase_date_ms: string

The time of the original app purchase, in UNIX epoch time format, in milliseconds. Use this time format for processing dates. This value indicates the date of the subscription's initial purchase. The original purchase date applies to all product types and remains the same in all transactions for the same product ID. This value corresponds to the original transaction’s transactionDate property in StoreKit.

example

1616411598724

-
original_purchase_date_pst: string
+
original_purchase_date_pst: string

The time of the original app purchase, in the Pacific time zone.

example

2021-01-01 00:00:00 America/Los_Angeles

-
original_transaction_id: string
+
original_transaction_id: string

The transaction identifier of the original purchase.

link

https://developer.apple.com/documentation/appstorereceipts/original_transaction_id

-
product_id: string
+
product_id: string

The unique identifier of the product purchased. You provide this value when creating the product in App Store Connect, and it corresponds to the productIdentifier property of the SKPayment object stored in the transaction’s payment property.

-
purchase_date: string
+
purchase_date: string

The time the App Store charged the user’s account for a subscription purchase or renewal after a lapse, in a date-time format similar to the ISO 8601 standard.

example

2021-03-01 07:00:00 Etc/GMT

-
purchase_date_ms: string
+
purchase_date_ms: string

The time the App Store charged the user’s account for a subscription purchase or renewal after a lapse, in the UNIX epoch time format, in milliseconds. Use this time format for processing dates.

example

1616411598724

-
purchase_date_pst: string
+
purchase_date_pst: string

The time the App Store charged the user’s account for a subscription purchase or renewal after a lapse, in the Pacific time zone.

example

2021-01-01 00:00:00 America/Los_Angeles

-
quantity: string
+
quantity: string

The number of consumable products purchased. This value corresponds to the quantity property of the SKPayment object stored in the transaction’s payment property. The value is usually '1' unless modified with a mutable payment. The maximum value is '10'.

-
transaction_id: string
+
transaction_id: string

A unique identifier for a transaction such as a purchase, restore, or renewal.

link

https://developer.apple.com/documentation/appstorereceipts/transaction_id

-
web_order_line_item_id: string
+
web_order_line_item_id: string

A unique identifier for purchase events across devices, including subscription-renewal events. This value is the primary key for identifying subscription purchases.

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/inapppurchasetransaction.html b/docs/interfaces/inapppurchasetransaction.html index f386562..cf1b8bc 100644 --- a/docs/interfaces/inapppurchasetransaction.html +++ b/docs/interfaces/inapppurchasetransaction.html @@ -1,88 +1,88 @@ InAppPurchaseTransaction | @tamtamchik/apple-iap-tools
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface InAppPurchaseTransaction

The in-app purchase receipt fields for all in-app purchase transactions.

link

https://developer.apple.com/documentation/appstorereceipts/responsebody/receipt/in_app

-

Hierarchy

Index

Properties

cancellation_date?: string
+

Hierarchy

Index

Properties

cancellation_date?: string

The time when Apple customer support canceled a transaction, in a date-time format similar to the ISO 8601. This field is only present for refunded transactions.

example

2013-08-01 07:00:00 Etc/GMT

-
cancellation_date_ms?: string
+
cancellation_date_ms?: string

The time when Apple customer support canceled a transaction, or the time when the user upgraded an auto-renewable subscription plan, in UNIX epoch time format, in milliseconds. This field is only present for refunded transactions. Use this time format for processing dates.

example

1616411598724

-
cancellation_date_pst?: string
+
cancellation_date_pst?: string

The time when Apple customer support canceled a transaction, in the Pacific Time zone. This field is only present for refunded transactions.

example

2021-01-01 00:00:00 America/Los_Angeles

-
cancellation_reason?: BinaryString
+
cancellation_reason?: BinaryString

The reason for a refunded transaction. When a customer cancels a transaction, the App Store gives them a refund and provides a value for this key.

1 - the customer canceled their transaction due to an actual or perceived issue within your app. 0 - the transaction was canceled for another reason; for example, if the customer made the purchase accidentally.

-
expires_date?: string
+
expires_date?: string

The time when a subscription expires or when it will renew, in UNIX epoch time format, in milliseconds. Use this time format for processing dates.

example

2021-03-01 07:00:00 Etc/GMT

-
expires_date_ms: string
+
expires_date_ms: string

The time when a subscription expires or when it will renew, in UNIX epoch time format, in milliseconds. Use this time format for processing dates.

example

1616411598724

-
expires_date_pst: string
+
expires_date_pst: string

The time when a subscription expires or when it will renew, in the Pacific Time zone.

example

2021-01-01 00:00:00 America/Los_Angeles

-
in_app_ownership_type: "FAMILY_SHARED" | "PURCHASED"
+
in_app_ownership_type: "FAMILY_SHARED" | "PURCHASED"

A value that indicates whether the user is the purchaser of the product, or is a family member with access to the product through Family Sharing.

link

https://developer.apple.com/documentation/appstorereceipts/in_app_ownership_type

-
is_in_intro_offer_period?: BooleanString
+
is_in_intro_offer_period?: BooleanString

An indicator of whether an auto-renewable subscription is in the introductory price period.

link

https://developer.apple.com/documentation/appstorereceipts/is_in_intro_offer_period

-
is_trial_period?: BooleanString
+
is_trial_period?: BooleanString

An indicator of whether a subscription is in the free trial period.

link

https://developer.apple.com/documentation/appstorereceipts/is_trial_period

-
original_purchase_date: string
+
original_purchase_date: string

The time of the original app purchase, in a date-time format similar to the ISO 8601 standard.

example

2021-03-01 07:00:00 Etc/GMT

-
original_purchase_date_ms: string
+
original_purchase_date_ms: string

The time of the original app purchase, in UNIX epoch time format, in milliseconds. Use this time format for processing dates. This value indicates the date of the subscription’s initial purchase. The original purchase date applies to all product types and remains the same in all transactions for the same product ID. This value corresponds to the original transaction's transactionDate property in StoreKit.

example

1616411598724

-
original_purchase_date_pst: string
+
original_purchase_date_pst: string

The time of the original app purchase, in the Pacific time zone.

example

2021-01-01 00:00:00 America/Los_Angeles

-
original_transaction_id: string
+
original_transaction_id: string

The transaction identifier of the original purchase.

link

https://developer.apple.com/documentation/appstorereceipts/original_transaction_id

-
product_id: string
+
product_id: string

The unique identifier of the product purchased. You provide this value when creating the product in App Store Connect, and it corresponds to the productIdentifier property of the SKPayment object stored in the transaction’s payment property.

-
promotional_offer_id?: string
+
promotional_offer_id?: string

The identifier of the subscription offer redeemed by the user.

link

https://developer.apple.com/documentation/appstorereceipts/promotional_offer_id

-
purchase_date: string
+
purchase_date: string

The time when the App Store charged the user’s account for a subscription purchase or renewal after a lapse, in a date-time format similar to the ISO 8601 standard.

example

2021-03-01 07:00:00 Etc/GMT

-
purchase_date_ms: string
+
purchase_date_ms: string

The time when the App Store charged the user’s account for a subscription purchase or renewal after a lapse, in the UNIX epoch time format, in milliseconds. Use this time format for processing dates.

example

1616411598724

-
purchase_date_pst: string
+
purchase_date_pst: string

The time when the App Store charged the user’s account for a subscription purchase or renewal after a lapse, in the Pacific time zone.

example

2021-01-01 00:00:00 America/Los_Angeles

-
quantity?: string
+
quantity?: string

The number of consumable products purchased. This value corresponds to the quantity property of the SKPayment object stored in the transaction's payment property. The value is usually '1' unless modified with a mutable payment. The maximum value is '10'.

-
transaction_id: string
+
transaction_id: string

A unique identifier for a transaction such as a purchase, restore, or renewal.

link

https://developer.apple.com/documentation/appstorereceipts/transaction_id

-
web_order_line_item_id?: string
+
web_order_line_item_id?: string

A unique identifier for purchase events across devices, including subscription-renewal events. This value is the primary key to identify subscription purchases.

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/latestreceiptinfo.html b/docs/interfaces/latestreceiptinfo.html index 5c9ccc3..bd8cd60 100644 --- a/docs/interfaces/latestreceiptinfo.html +++ b/docs/interfaces/latestreceiptinfo.html @@ -1,98 +1,98 @@ LatestReceiptInfo | @tamtamchik/apple-iap-tools
Options
All
  • Public
  • Public/Protected
  • All
Menu

An object that contains information about the latest in-app subscription transaction.

link

https://developer.apple.com/documentation/appstoreservernotifications/unified_receipt/latest_receipt_info

-

Hierarchy

Index

Properties

cancellation_date?: string
+

Hierarchy

Index

Properties

cancellation_date?: string

The time when Apple customer support canceled a transaction, in a date-time format similar to the ISO 8601. This field is only present for refunded transactions.

example

2013-08-01 07:00:00 Etc/GMT

-
cancellation_date_ms?: string
+
cancellation_date_ms?: string

The time when Apple customer support canceled a transaction, or the time when the user upgraded an auto-renewable subscription plan, in UNIX epoch time format, in milliseconds. This field is only present for refunded transactions. Use this time format for processing dates.

example

1616411598724

-
cancellation_date_pst?: string
+
cancellation_date_pst?: string

The time when Apple customer support canceled a transaction, in the Pacific Time zone. This field is only present for refunded transactions.

example

2021-01-01 00:00:00 America/Los_Angeles

-
cancellation_reason?: BinaryString
+
cancellation_reason?: BinaryString

The reason for a refunded transaction. When a customer cancels a transaction, the App Store gives them a refund and provides a value for this key.

1 - the customer canceled their transaction due to an actual or perceived issue within your app. 0 - the transaction was canceled for another reason; for example, if the customer made the purchase accidentally.

-
expires_date?: string
+
expires_date?: string

The time when a subscription expires or when it will renew, in UNIX epoch time format, in milliseconds. Use this time format for processing dates.

example

2021-03-01 07:00:00 Etc/GMT

-
expires_date_ms: string
+
expires_date_ms: string

The time when a subscription expires or when it will renew, in UNIX epoch time format, in milliseconds. Use this time format for processing dates.

example

1616411598724

-
expires_date_pst: string
+
expires_date_pst: string

The time when a subscription expires or when it will renew, in the Pacific Time zone.

example

2021-01-01 00:00:00 America/Los_Angeles

-
in_app_ownership_type: "FAMILY_SHARED" | "PURCHASED"
+
in_app_ownership_type: "FAMILY_SHARED" | "PURCHASED"

A value that indicates whether the user is the purchaser of the product, or is a family member with access to the product through Family Sharing.

link

https://developer.apple.com/documentation/appstorereceipts/in_app_ownership_type

-
is_in_intro_offer_period?: BooleanString
+
is_in_intro_offer_period?: BooleanString

An indicator of whether an auto-renewable subscription is in the introductory price period.

link

https://developer.apple.com/documentation/appstorereceipts/is_in_intro_offer_period

-
is_trial_period?: BooleanString
+
is_trial_period?: BooleanString

An indicator of whether a subscription is in the free trial period.

link

https://developer.apple.com/documentation/appstorereceipts/is_trial_period

-
is_upgraded?: true
+
is_upgraded?: true

An indicator that the system canceled a subscription because the user upgraded. This field is only present for upgrade transactions.

-
offer_code_ref_name?: string
+
offer_code_ref_name?: string

The reference name of a subscription offer you configured in App Store Connect. This field is present when a customer redeemed a subscription offer code.

link

https://developer.apple.com/documentation/appstorereceipts/offer_code_ref_name

-
original_purchase_date: string
+
original_purchase_date: string

The time of the original app purchase, in a date-time format similar to the ISO 8601 standard.

example

2021-03-01 07:00:00 Etc/GMT

-
original_purchase_date_ms: string
+
original_purchase_date_ms: string

The time of the original app purchase, in UNIX epoch time format, in milliseconds. Use this time format for processing dates. This value indicates the date of the subscription’s initial purchase. The original purchase date applies to all product types and remains the same in all transactions for the same product ID. This value corresponds to the original transaction's transactionDate property in StoreKit.

example

1616411598724

-
original_purchase_date_pst: string
+
original_purchase_date_pst: string

The time of the original app purchase, in the Pacific time zone.

example

2021-01-01 00:00:00 America/Los_Angeles

-
original_transaction_id: string
+
original_transaction_id: string

The transaction identifier of the original purchase.

link

https://developer.apple.com/documentation/appstorereceipts/original_transaction_id

-
product_id: string
+
product_id: string

The unique identifier of the product purchased. You provide this value when creating the product in App Store Connect, and it corresponds to the productIdentifier property of the SKPayment object stored in the transaction’s payment property.

-
promotional_offer_id?: string
+
promotional_offer_id?: string

The identifier of the subscription offer redeemed by the user.

link

https://developer.apple.com/documentation/appstorereceipts/promotional_offer_id

-
purchase_date: string
+
purchase_date: string

The time when the App Store charged the user’s account for a subscription purchase or renewal after a lapse, in a date-time format similar to the ISO 8601 standard.

example

2021-03-01 07:00:00 Etc/GMT

-
purchase_date_ms: string
+
purchase_date_ms: string

The time when the App Store charged the user’s account for a subscription purchase or renewal after a lapse, in the UNIX epoch time format, in milliseconds. Use this time format for processing dates.

example

1616411598724

-
purchase_date_pst: string
+
purchase_date_pst: string

The time when the App Store charged the user’s account for a subscription purchase or renewal after a lapse, in the Pacific time zone.

example

2021-01-01 00:00:00 America/Los_Angeles

-
quantity?: string
+
quantity?: string

The number of consumable products purchased. This value corresponds to the quantity property of the SKPayment object stored in the transaction's payment property. The value is usually '1' unless modified with a mutable payment. The maximum value is '10'.

-
subscription_group_identifier?: string
+
subscription_group_identifier?: string

The identifier of the subscription group to which the subscription belongs. The value for this field is identical to the subscriptionGroupIdentifier property in SKProduct.

-
transaction_id: string
+
transaction_id: string

A unique identifier for a transaction such as a purchase, restore, or renewal.

link

https://developer.apple.com/documentation/appstorereceipts/transaction_id

-
web_order_line_item_id?: string
+
web_order_line_item_id?: string

A unique identifier for purchase events across devices, including subscription-renewal events. This value is the primary key to identify subscription purchases.

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/pendingrenewalinfo.html b/docs/interfaces/pendingrenewalinfo.html index a1f6b0c..90fd33c 100644 --- a/docs/interfaces/pendingrenewalinfo.html +++ b/docs/interfaces/pendingrenewalinfo.html @@ -1,54 +1,54 @@ PendingRenewalInfo | @tamtamchik/apple-iap-tools
Options
All
  • Public
  • Public/Protected
  • All
Menu

Elements that refers to open auto-renewable subscription renewals or ones that failed in the past.

link

https://developer.apple.com/documentation/appstoreservernotifications/unified_receipt/pending_renewal_info

-

Hierarchy

  • PendingRenewalInfo

Index

Properties

auto_renew_product_id?: string
+

Hierarchy

  • PendingRenewalInfo

Index

Properties

auto_renew_product_id?: string

The current renewal preference for the auto-renewable subscription. The value for this key corresponds to the productIdentifier property of the product that the customer's subscription renews. This field is only present if the user downgrades or cross-grades to a subscription of a different duration for the subsequent subscription period.

-
auto_renew_status: BinaryString
+
auto_renew_status: BinaryString

The current renewal status for the auto-renewable subscription.

1 - Subscription will auto-renew 0 - Customer turned off auto-renew

link

https://developer.apple.com/documentation/appstorereceipts/auto_renew_status

-
expiration_intent?: ExpirationIntent
+
expiration_intent?: ExpirationIntent

The reason a subscription expired. This field is only present for a receipt that contains an expired auto-renewable subscription.

-
grace_period_expires_date?: string
+
grace_period_expires_date?: string

The time at which the grace period for subscription renewals expires, in a date-time format similar to the ISO 8601.

example

2021-03-01 07:00:00 Etc/GMT

-
grace_period_expires_date_ms?: string
+
grace_period_expires_date_ms?: string

The time at which the grace period for subscription renewals expires, in UNIX epoch time format, in milliseconds. This key is only present for apps that have Billing Grace Period enabled and when the user experiences a billing error at the time of renewal. Use this time format for processing dates.

example

1616411598724

-
grace_period_expires_date_pst?: string
+
grace_period_expires_date_pst?: string

The time at which the grace period for subscription renewals expires, in the Pacific Time zone.

example

2021-01-01 00:00:00 America/Los_Angeles

-
is_in_billing_retry_period?: BinaryString
+
is_in_billing_retry_period?: BinaryString

A flag that indicates Apple is attempting to renew an expired subscription automatically. This field is only present if an auto-renewable subscription is in the billing retry state.

1 - Apple is trying to renew the subscription. See grace_period_expires_date to determine when Apple will stop trying. 0 - Apple has stopped attempting to renew.

link

https://developer.apple.com/documentation/appstorereceipts/is_in_billing_retry_period

-
offer_code_ref_name?: string
+
offer_code_ref_name?: string

The reference name of a subscription offer that you configured in App Store Connect. This field is present when a customer redeemed a subscription offer code.

link

https://developer.apple.com/documentation/appstorereceipts/offer_code_ref_name

-
original_transaction_id: string
+
original_transaction_id: string

The transaction identifier of the original purchase.

-
price_consent_status?: BinaryString
+
price_consent_status?: BinaryString

The price consent status for a subscription price increase. This field is only present if the customer was notified of the price increase.

1 - customer accepted the price increase 0 - customer has not yet accepted the price increase

-
product_id: string
+
product_id: string

The unique identifier of the product purchased. You provide this value when creating the product in App Store Connect, and it corresponds to the productIdentifier property of the SKPayment object stored in the transaction's payment property.

-
promotional_offer_id: string
+
promotional_offer_id: string

The identifier of the promotional offer for an auto-renewable subscription that the user redeemed. You provide this value in the Promotional Offer Identifier field when you create the promotional offer in App Store Connect.

diff --git a/docs/interfaces/receipt.html b/docs/interfaces/receipt.html index 73a9a0f..a7d3031 100644 --- a/docs/interfaces/receipt.html +++ b/docs/interfaces/receipt.html @@ -1,88 +1,88 @@ Receipt | @tamtamchik/apple-iap-tools
Options
All
  • Public
  • Public/Protected
  • All
Menu

The decoded version of the encoded receipt data sent with the request to the App Store.

link

https://developer.apple.com/documentation/appstorereceipts/responsebody/receipt

-

Hierarchy

  • Receipt

Index

Properties

adam_id: string
+

Hierarchy

  • Receipt

Index

Properties

adam_id: string

See app_item_id.

-
app_item_id: string
+
app_item_id: string

Generated by App Store Connect and used by the App Store to uniquely identify the app purchased. Apps are assigned this identifier only in production. Treat this value as a 64-bit long integer.

-
application_version: string
+
application_version: string

The app's version number. The app's version number corresponds to the value of CFBundleVersion (in iOS) or CFBundleShortVersionString (in macOS) in the Info.plist. In production, this value is the current version of the app on the device based on the receipt_creation_date_ms. In the sandbox, the value is always '1.0'.

-
bundle_id: string
+
bundle_id: string

The bundle identifier for the app to which the receipt belongs. You provide this string on App Store Connect. This corresponds to the value of CFBundleIdentifier in the Info.plist file of the app.

-
download_id: number
+
download_id: number

A unique identifier for the app download transaction.

-
expiration_date?: string
+
expiration_date?: string

The time the receipt expires for apps purchased through the Volume Purchase Program, in a date-time format similar to the ISO 8601.

example

2021-03-01 07:00:00 Etc/GMT

-
expiration_date_ms?: string
+
expiration_date_ms?: string

The time the receipt expires for apps purchased through the Volume Purchase Program, in UNIX epoch time format, in milliseconds. If this key is not present for apps purchased through the Volume Purchase Program, the receipt does not expire. Use this time format for processing dates.

example

1616411598724

-
expiration_date_pst?: string
+
expiration_date_pst?: string

The time the receipt expires for apps purchased through the Volume Purchase Program, in the Pacific Time zone.

example

2021-01-01 00:00:00 America/Los_Angeles

-
+

An array that contains the in-app purchase receipt fields for all in-app purchase transactions.

-
original_application_version: string
+
original_application_version: string

The version of the app that the user originally purchased. This value does not change, and corresponds to the value of CFBundleVersion (in iOS) or CFBundleShortVersionString (in macOS) in the Info.plist file of the original purchase. In the sandbox environment, the value is always '1.0'.

-
original_purchase_date: string
+
original_purchase_date: string

The time of the original app purchase, in a date-time format similar to ISO 8601.

example

2021-03-01 07:00:00 Etc/GMT

-
original_purchase_date_ms: string
+
original_purchase_date_ms: string

The time of the original app purchase, in UNIX epoch time format, in milliseconds. Use this time format for processing dates.

example

1616411598724

-
original_purchase_date_pst: string
+
original_purchase_date_pst: string

The time of the original app purchase, in the Pacific Time zone.

example

2021-01-01 00:00:00 America/Los_Angeles

-
preorder_date?: string
+
preorder_date?: string

The time the user ordered the app available for pre-order, in a date-time format similar to ISO 8601. Only present if the app was ordered through pre-order.

example

2021-03-01 07:00:00 Etc/GMT

-
preorder_date_ms?: string
+
preorder_date_ms?: string

The time the user ordered the app available for pre-order, in UNIX epoch time format, in milliseconds. This field is only present if the user pre-orders the app. Use this time format for processing dates.

example

1616411598724

-
preorder_date_pst?: string
+
preorder_date_pst?: string

The time the user ordered the app available for pre-order, in the Pacific Time zone.

example

2021-01-01 00:00:00 America/Los_Angeles

-
receipt_creation_date: string
+
receipt_creation_date: string

The time the App Store generated the receipt, in a date-time format similar to ISO 8601.

example

2021-03-01 07:00:00 Etc/GMT

-
receipt_creation_date_ms: string
+
receipt_creation_date_ms: string

The time the App Store generated the receipt, in UNIX epoch time format, in milliseconds. Use this time format for processing dates. This value does not change.

example

1616411598724

-
receipt_creation_date_pst: string
+
receipt_creation_date_pst: string

The time the App Store generated the receipt, in the Pacific Time zone.

example

2021-01-01 00:00:00 America/Los_Angeles

-
receipt_type: "Production" | "ProductionVPP" | "ProductionSandbox" | "ProductionVPPSandbox"
+
receipt_type: "Production" | "ProductionVPP" | "ProductionSandbox" | "ProductionVPPSandbox"

The type of receipt generated. The value corresponds to the environment in which the app or VPP purchase was made.

-
request_date: string
+
request_date: string

The time the request to the verifyReceipt endpoint was processed and the response was generated, in a date-time format similar to ISO 8601.

example

2021-03-01 07:00:00 Etc/GMT

-
request_date_ms: string
+
request_date_ms: string

The time the request to the verifyReceipt endpoint was processed and the response was generated, in UNIX epoch time format, in milliseconds. Use this time format for processing dates.

example

1616411598724

-
request_date_pst: string
+
request_date_pst: string

The time the request to the verifyReceipt endpoint was processed and the response was generated, in the Pacific Time zone.

example

2021-01-01 00:00:00 America/Los_Angeles

-
version_external_identifier: number
+
version_external_identifier: number

An arbitrary number that identifies a revision of your app. In the sandbox, this key's value is '0'.

Legend

  • Constructor
  • Property
  • Property

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/servernotificationresponsebody.html b/docs/interfaces/servernotificationresponsebody.html index 405da98..2f38cbe 100644 --- a/docs/interfaces/servernotificationresponsebody.html +++ b/docs/interfaces/servernotificationresponsebody.html @@ -1,50 +1,50 @@ ServerNotificationResponseBody | @tamtamchik/apple-iap-tools
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ServerNotificationResponseBody

The JSON data sent in the server notification from the App Store.

link

https://developer.apple.com/documentation/appstoreservernotifications/responsebody

-

Hierarchy

  • ServerNotificationResponseBody

Index

Properties

auto_renew_adam_id?: string
+

Hierarchy

  • ServerNotificationResponseBody

Index

Properties

auto_renew_adam_id?: string

An identifier that App Store Connect generates and the App Store uses to uniquely identify the auto-renewable subscription that the user’s subscription renews. Treat this value as a 64-bit integer.

-
auto_renew_product_id?: string
+
auto_renew_product_id?: string

The product identifier of the auto-renewable subscription that the user’s subscription renews.

-
auto_renew_status?: BooleanString
+
auto_renew_status?: BooleanString

The current renewal status for an auto-renewable subscription product. Note that these values are different from those of the auto_renew_status in the receipt.

-
auto_renew_status_change_date: string
+
auto_renew_status_change_date: string

The time at which the user turned on or off the renewal status for an auto-renewable subscription, in a date-time format similar to the ISO 8601 standard.

example

2021-03-01 07:00:00 Etc/GMT

-
auto_renew_status_change_date_ms: string
+
auto_renew_status_change_date_ms: string

The time at which the user turned on or off the renewal status for an auto-renewable subscription, in UNIX epoch time format, in milliseconds. Use this time format to process dates.

example

1616411598724

-
auto_renew_status_change_date_pst: string
+
auto_renew_status_change_date_pst: string

The time at which the user turned on or off the renewal status for an auto-renewable subscription, in the Pacific time zone.

example

2021-01-01 00:00:00 America/Los_Angeles

-
bid: string
+
bid: string

A string that contains the app bundle ID.

-
bvrs: string
+
bvrs: string

A string that contains the app bundle version.

-
environment: "Sandbox" | "PROD"
+
environment: "Sandbox" | "PROD"

The environment for which App Store generated the receipt.

-
expiration_intent?: ExpirationIntent
+
expiration_intent?: ExpirationIntent

The reason a subscription expired. This field is only present for an expired auto-renewable subscription.

-
latest_expired_receipt?: string
+
latest_expired_receipt?: string

The latest expired Base64-encoded app receipt.

deprecated

As of March 10, 2021 this object is no longer provided in production and sandbox environments. Use latest_receipt in the unified_receipt object instead.

-
latest_expired_receipt_info?: DeprecatedLatestReceiptInfo[]
+
latest_expired_receipt_info?: DeprecatedLatestReceiptInfo[]

The latest decoded app receipts.

deprecated

As of March 10, 2021 this object is no longer provided in production and sandbox environments. Use unified_receipt.Latest_receipt_info in the unified_receipt object instead.

-
latest_receipt?: string
+
latest_receipt?: string

The latest Base64-encoded app receipt.

deprecated

As of March 10, 2021 this object is no longer provided in production and sandbox environments. Use the latest_receipt field found in the unified_receipt object instead.

-
latest_receipt_info?: DeprecatedLatestReceiptInfo
+
latest_receipt_info?: DeprecatedLatestReceiptInfo

The latest decoded app receipt.

deprecated

As of March 10, 2021 this object is no longer provided in production and sandbox environments. Use unified_receipt.Latest_receipt_info in the unified_receipt object instead.

-
notification_type: ServerNotificationType
+
notification_type: ServerNotificationType

The subscription event that triggered the notification.

-
password: string
+
password: string

The same value as the shared secret you submit in the password field of the requestBody when validating receipts.

-
unified_receipt: UnifiedReceipt
+
unified_receipt: UnifiedReceipt

An object that contains information about the most-recent, in-app purchase transactions for the app.

Legend

  • Constructor
  • Property
  • Property

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/unifiedreceipt.html b/docs/interfaces/unifiedreceipt.html index 37388b4..796381d 100644 --- a/docs/interfaces/unifiedreceipt.html +++ b/docs/interfaces/unifiedreceipt.html @@ -1,20 +1,20 @@ UnifiedReceipt | @tamtamchik/apple-iap-tools
Options
All
  • Public
  • Public/Protected
  • All
Menu

An object that contains information about the most-recent, in-app purchase transactions for the app.

link

https://developer.apple.com/documentation/appstoreservernotifications/unified_receipt

-

Hierarchy

  • UnifiedReceipt

Index

Properties

environment: "Sandbox" | "Production"
+

Hierarchy

  • UnifiedReceipt

Index

Properties

environment: "Sandbox" | "Production"

The environment for which App Store generated the receipt.

-
latest_receipt: string
+
latest_receipt: string

The latest Base64-encoded app receipt.

-
latest_receipt_info: LatestReceiptInfo[]
+
latest_receipt_info: LatestReceiptInfo[]

An array that contains the latest 100 in-app purchase transactions of the decoded value in latest_receipt. This array excludes transactions for consumable products your app has marked as finished. The contents of this array are identical to those in VerifyReceiptResponseSuccess.latest_receipt_info in the verifyReceipt endpoint response for receipt validation.

-
pending_renewal_info: PendingRenewalInfo[]
+
pending_renewal_info: PendingRenewalInfo[]

An array where each element contains the pending renewal information for each auto-renewable subscription identified in product_id. The contents of this array are identical to those in VerifyReceiptResponseSuccess.latest_receipt_info in the verifyReceipt endpoint response for receipt validation.

-
status: number
+
status: number

The status code, where 0 indicates that the notification is valid.

Legend

  • Constructor
  • Property
  • Property

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/verifyreceiptrequestbody.html b/docs/interfaces/verifyreceiptrequestbody.html index 8f1a4b4..cf0088e 100644 --- a/docs/interfaces/verifyreceiptrequestbody.html +++ b/docs/interfaces/verifyreceiptrequestbody.html @@ -1,11 +1,11 @@ VerifyReceiptRequestBody | @tamtamchik/apple-iap-tools
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface VerifyReceiptRequestBody

The JSON contents you submit with the verifyReceipt request to the App Store.

link

https://developer.apple.com/documentation/appstorereceipts/requestbody

-

Hierarchy

  • VerifyReceiptRequestBody

Index

Properties

exclude-old-transactions?: boolean
+

Hierarchy

  • VerifyReceiptRequestBody

Index

Properties

exclude-old-transactions?: boolean

Set this value to true for the response to include only the latest renewal transaction for any subscriptions. Use this field only for app receipts that contain auto-renewable subscriptions.

-
password: string
+
password: string

Your app’s shared secret, which is a hexadecimal string.

-
receipt-data: string
+
receipt-data: string

The Base64-encoded receipt data.

Legend

  • Constructor
  • Property
  • Property

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/verifyreceiptresponseerror.html b/docs/interfaces/verifyreceiptresponseerror.html index febcc51..ee5479c 100644 --- a/docs/interfaces/verifyreceiptresponseerror.html +++ b/docs/interfaces/verifyreceiptresponseerror.html @@ -1,11 +1,11 @@ VerifyReceiptResponseError | @tamtamchik/apple-iap-tools
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface VerifyReceiptResponseError

The response body of a request that had an error. The receipt was not decoded and returned.

-

Hierarchy

  • VerifyReceiptResponseError

Index

Properties

is-retryable?: BinaryString
+

Hierarchy

  • VerifyReceiptResponseError

Index

Properties

is-retryable?: BinaryString

An indicator that an error occurred during the request.

1 - a temporary issue; retry validation for this receipt at a later time. 0 - an unresolvable issue; do not retry validation for this receipt.

Only applicable to status codes 21100-21199

-
+

An VerifyReceiptErrorStatus status code if there is an error. The status code reflects the status of the app receipt as a whole.

Legend

  • Constructor
  • Property
  • Property

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/verifyreceiptresponsesuccess.html b/docs/interfaces/verifyreceiptresponsesuccess.html index 17b8260..e341e80 100644 --- a/docs/interfaces/verifyreceiptresponsesuccess.html +++ b/docs/interfaces/verifyreceiptresponsesuccess.html @@ -1,20 +1,20 @@ VerifyReceiptResponseSuccess | @tamtamchik/apple-iap-tools
Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface VerifyReceiptResponseSuccess

The response body of a request that had was successful.

-

Hierarchy

  • VerifyReceiptResponseSuccess

Index

Properties

environment: "Sandbox" | "Production"
+

Hierarchy

  • VerifyReceiptResponseSuccess

Index

Properties

environment: "Sandbox" | "Production"

The environment for which the receipt was generated.

-
latest_receipt?: string
+
latest_receipt?: string

The latest Base64 encoded app receipt. Only returned for receipts that contain auto-renewable subscriptions.

-
latest_receipt_info?: LatestReceiptInfo | LatestReceiptInfo[]
+
latest_receipt_info?: LatestReceiptInfo | LatestReceiptInfo[]

An array that contains all in-app purchase transactions. This excludes transactions for consumable products that have been marked as finished by your app. Only returned for receipts that contain auto-renewable subscriptions.

-
pending_renewal_info?: PendingRenewalInfo | PendingRenewalInfo[]
+
pending_renewal_info?: PendingRenewalInfo | PendingRenewalInfo[]

In the JSON file, an array where each element contains the pending renewal information for each auto-renewable subscription identified by the product_id. Only returned for app receipts that contain auto-renewable subscriptions.

-
receipt: Receipt
+
receipt: Receipt

A JSON representation of the receipt that was sent for verification.

-
+

Either 0 if the receipt is valid, or a status code if there is an error. The status code reflects the status of the app receipt as a whole.

Legend

  • Constructor
  • Property
  • Property

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules.html b/docs/modules.html index f248380..b5d3f4f 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -1,12 +1,12 @@ -@tamtamchik/apple-iap-tools
Options
All
  • Public
  • Public/Protected
  • All
Menu

@tamtamchik/apple-iap-tools

Index

Type aliases

BinaryString: "1" | "0"
BooleanString: "true" | "false"

Functions