# Omnichannel transactions

> For the complete machine-readable documentation index, see [llms.txt](https://apidocs.chargebee.com/llms.txt).


A unified representation of a store purchase or renewal transaction across Apple App Store and Google Play Store.

Use `id_at_source` to correlate with the store-native transaction identifier:

-   **Apple App Store**: App Store **Transaction ID**
-   **Google Play Store**: Google Play **Order ID** (`GPA.…`)

Parent subscription / one-time-order resources use purchase-token semantics for Google `id_at_source`; do not treat those as interchangeable with this transaction Order ID.

### Apple App Store[](#apple-app-store)

The [price](https://developer.apple.com/documentation/appstoreservernotifications/price) value reflects the price you configured in App Store Connect, which the system records at the time of transaction ([transacted\_at](/docs/api/omnichannel_transactions/omnichannel_transaction-object#transacted_at)) after the discount if any offers are applied.

**Important** For financial and accounting purposes, use the App Store Connect reporting tools. For more information, see [Download financial reports](https://developer.apple.com/help/app-store-connect/getting-paid/download-financial-reports) and [Overview of reporting tools](https://developer.apple.com/help/app-store-connect/measure-app-performance/overview-of-reporting-tools). [Learn more](https://developer.apple.com/documentation/appstoreservernotifications/price) about price in Apple App Store.

### Google Play Store[](#google-play-store)

Google Play does not always expose a complete transaction amount or purchase time for every notification path. When Google provides price / time data for a transaction, Chargebee records `price_*` and `transacted_at`; otherwise these attributes may be absent. Some Google one-time-order samples include price and `transacted_at` on `purchase_transaction`.

Transactions can be linked to subscriptions and/or one-time orders via `linked_omnichannel_subscriptions` and `linked_omnichannel_one_time_orders`. Chargebee may also emit [`omnichannel_transaction_created`](/docs/api/events/webhook/omnichannel_transaction_created) when a new transaction row is recorded.

## Sample Omnichannel transaction

```json
{
  "id": "__test__ot_LKedfs123ld1",
  "app_id": "__test__aas_sdfwerzx5134",
  "id_at_source": "20000006743",
  "price_currency": "USD",
  "price_units": 1,
  "price_nanos": 230000000,
  "type": "purchase",
  "created_at": 1517487053,
  "transacted_at": 1517487053,
  "object": "omnichannel_transaction"
}
```

## Omnichannel transactions attributes

## Input Parameters

- `id` (required, string, max chars=40)
  The ID generated by Chargebee for the omnichannel transaction.

- `id_at_source` (required, string, max chars=100)
  The store-native identifier for this transaction.
  
  **Apple App Store**: The App Store **Transaction ID** for this purchase or renewal.
  
  **Google Play Store**: The Google Play **Order ID** (typically `GPA.…`) — not the subscription or one-time-order **purchase token** (those live on `omnichannel_subscription.id_at_source` / `omnichannel_one_time_order.id_at_source`).

- `app_id` (required, string, max chars=100)
  App Identifier in Chargebee. This is the handle created by Chargebee for your app. To get the `app_id`:
  
  -   For **Apple**, follow [these steps](https://www.chargebee.com/docs/billing/2.0/mobile-subscriptions/omnichannel-app-store#create-an-omnichannel-subscription-for-in-app-purchases).
  -   For **Google**, follow [these steps](https://www.chargebee.com/docs/billing/2.0/mobile-subscriptions/omnichannel-play-store#connect-google-app-to-chargebee-to-generate-unique-app-id-and-notifications-url).

- `price_currency` (optional, string, max chars=3)
  The three-letter ISO 4217 currency code associated with the transaction (`price_currency`), when price data is available.

- `price_units` (optional, long)
  The whole units of the amount, when price data is available. For example: if `price_currency` is **USD** (two-decimal currency), then the unit value for **USD** **1.23** will be **1** if `price_currency` is **JPY** (zero-decimal currency), then the unit value for **JPY** **123** will be **123** if `price_currency` is **BHD** (three-decimal currency), then the unit value for **BHD** **1.234** will be **1**

- `price_nanos` (optional, long)
  The fraction part of the amount, when price data is available. The value must be between **0** and **+999,999,999** inclusive. For example: If `price_currency` is **USD** (two-decimal currency), then nanos value for **USD** **1.23** will be **230,000,000** If `price_currency` is **JPY** (zero-decimal currency), then nanos value for **JPY** **123** will be **0** If `price_currency` is **BHD** (three-decimal currency), then nanos value for **BHD** **1.234** will be **234,000,000**

- `type` (required, enumerated string)
  Type of omnichannel transaction. Applies to both subscription and one-time-order purchase flows.
  Possible enum values:
    - `purchase`
      Indicates an initial purchase transaction (subscription or one-time order).
    - `renewal`
      Indicates a renewal transaction for a previously completed subscription purchase. Not used for one-time orders.

- `transacted_at` (optional, timestamp(UTC) in seconds)
  Timestamp when the transaction occurred in the store, when available.

- `created_at` (required, timestamp(UTC) in seconds)
  Timestamp when the omnichannel transaction was created in Chargebee.

- `resource_version` (optional, long)
  Version number of this resource. The `resource_version` is updated with a new timestamp in milliseconds for every change made to the resource.

- `linked_omnichannel_subscriptions` (optional, list of linked_omnichannel_subscription)
  A list of `omnichannel_subscription` objects linked to this transaction.
  - `omnichannel_subscription_id` (optional, string, max chars=100)
    The `id` of a linked [`omnichannel_subscription`](/docs/api/omnichannel_subscriptions/omnichannel_subscription-object#id).

- `linked_omnichannel_one_time_orders` (optional, list of linked_omnichannel_one_time_order)
  A list of `omnichannel_one_time_order` objects linked to this transaction.
  - `omnichannel_one_time_order_id` (optional, string, max chars=100)
    The `id` of a linked [`omnichannel_one_time_order`](/docs/api/omnichannel_one_time_orders/omnichannel_one_time_order-object#id).

