# Move an omnichannel subscription

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


[Idempotency Supported](/docs/api/idempotency)

Moves an `omnichannel_subscription` to another customer in Chargebee.

### Prerequisites[](#prerequisites)

-   The target customer must already exist in Chargebee (or be creatable via your usual customer APIs before calling this operation).
-   The omnichannel subscription must already be recorded in Chargebee.

### Impacts[](#impacts)

-   Updates the omnichannel subscription's `customer_id` and related records to the target customer.
-   Triggers the [`omnichannel_subscription_moved_in`](/docs/api/events/webhook/omnichannel_subscription_moved_in) webhook with the new customer details.

This operation does **not** change the underlying Apple or Google purchase; it only reassigns ownership inside Chargebee.

## Sample Request

#### cURL

```bash
curl  https://{site}.chargebee.com/api/v2/omnichannel_subscriptions/os___dev__XpbBs6UUtfPr5b5/move \
     -u {site_api_key}:\
     -d to_customer_id="new_customer_id"
```

#### .NET

```dotnet
using ChargeBee.Api;
using ChargeBee.Models;

ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = OmnichannelSubscription.Move("os___dev__XpbBs6UUtfPr5b5")
		.ToCustomerId("new_customer_id")
		.Request();

OmnichannelSubscription omnichannelSubscription = result.OmnichannelSubscription;
```

#### Go

```go
package main
import (
    "fmt"
    "github.com/chargebee/chargebee-go/v3"
    omnichannelsubscriptionAction "github.com/chargebee/chargebee-go/v3/actions/omnichannelsubscription"
    "github.com/chargebee/chargebee-go/v3/models/omnichannelsubscription"
)
func main() {
    chargebee.Configure("{site_api_key}","{site}");
    res,err := omnichannelsubscriptionAction.Move("os___dev__XpbBs6UUtfPr5b5", &omnichannelsubscription.MoveRequestParams{
        ToCustomerId : "new_customer_id",
    }).Request()
    if err != nil {
        fmt.Println(err)
    } else {
        OmnichannelSubscription := res.OmnichannelSubscription
    }
}
```

#### Go

```go
package main

import (
  "fmt"
  "github.com/chargebee/chargebee-go/v4"
)

func main() {
  config := &chargebee.ClientConfig{
    SiteName: "{site}",
    ApiKey: "{site_api_key}",
  }    
  client := chargebee.NewClient(config)
  req := &chargebee.OmnichannelSubscriptionMoveRequest{
    ToCustomerId : "new_customer_id",
}
  res, err := client.OmnichannelSubscription.Move("os___dev__XpbBs6UUtfPr5b5", req)
      if err != nil {
        fmt.Println(err)
    } else {
        OmnichannelSubscription := res.OmnichannelSubscription
    }
}
```

#### Java

```java
import com.chargebee.*;
import com.chargebee.ListResult;
import com.chargebee.models.*;
import com.chargebee.models.enums.*;
import java.io.IOException;

public class Sample {

    public static void main(String args[]) throws IOException, Exception {
        Environment.configure("{site}", "{site_api_key}");
        Result result = OmnichannelSubscription.move("os___dev__XpbBs6UUtfPr5b5")
            .toCustomerId("new_customer_id")
            .request();

        OmnichannelSubscription omnichannelSubscription = result.omnichannelSubscription();
    }
}
```

#### Java

```java
import com.chargebee.v4.client.ChargebeeClient;
import com.chargebee.v4.models.omnichannelSubscription.OmnichannelSubscription;
import com.chargebee.v4.models.omnichannelSubscription.params.OmnichannelSubscriptionMoveParams;
import com.chargebee.v4.models.omnichannelSubscription.responses.OmnichannelSubscriptionMoveResponse;

public class OmnichannelSubscriptionMove {

    public static void main(String[] args) {
        ChargebeeClient client = ChargebeeClient.builder()
            .apiKey("{site_api_key}")
            .siteName("{site}")
            .build();

        OmnichannelSubscriptionMoveParams params = OmnichannelSubscriptionMoveParams.builder()
            .toCustomerId("new_customer_id")
            .build();

        OmnichannelSubscriptionMoveResponse response = client
            .omnichannelSubscriptions()
            .move("os___dev__XpbBs6UUtfPr5b5", params);

        OmnichannelSubscription omnichannelSubscription = response.getOmnichannelSubscription();
    }
}
```

#### Node.js

```node
import Chargebee from "chargebee";

const chargebee = new Chargebee({
    site: "{site}",
    apiKey: "{site_api_key}",
});

try {
    const result = await chargebee.omnichannelSubscription.move("os___dev__XpbBs6UUtfPr5b5", {
        to_customer_id: "new_customer_id"
    });

    console.log(result);
    const omnichannelSubscription = result.omnichannel_subscription;
} catch (err) {
    console.log(err);
}
```

#### PHP

```php
<?php

require __DIR__ . '/vendor/autoload.php';

use Chargebee\ChargebeeClient;

$chargebee = new ChargebeeClient(options: [
    "site" => "{site}",
    "apiKey" => "{site_api_key}",
]);
$result = $chargebee->omnichannelSubscription()->move("os___dev__XpbBs6UUtfPr5b5", [
    "to_customer_id" => "new_customer_id"
]);
$omnichannelSubscription = $result->omnichannel_subscription;
```

#### Python

```python
from chargebee import Chargebee

cb_client = Chargebee(api_key="{site_api_key}", site="{site}")
response = cb_client.OmnichannelSubscription.move("os___dev__XpbBs6UUtfPr5b5",
    cb_client.OmnichannelSubscription.MoveParams(
        to_customer_id="new_customer_id"
    )
)
omnichannel_subscription = response.omnichannel_subscription
```

#### Ruby

```ruby
require 'chargebee'

ChargeBee.configure(:site => "{site}",
  :api_key => "{site_api_key}")

result = ChargeBee::OmnichannelSubscription.move("os___dev__XpbBs6UUtfPr5b5",{
  :to_customer_id => "new_customer_id"
})

omnichannel_subscription = result.omnichannel_subscription
```

## Sample Response

```json
{
  "omnichannel_subscription": {
    "id": "os___dev__XpbBs6UUtfPr5b5",
    "id_at_source": "2000000964948913",
    "app_id": "as_app___dev__XpbBs6UUtfPUHM2",
    "source": "apple_app_store",
    "customer_id": "new_customer_id",
    "created_at": 1755006365,
    "resource_version": 1755006365336,
    "initial_purchase_transaction": {
      "id": "ot___dev__XpbBs6UUtfPr5F4",
      "id_at_source": "2000000964948913",
      "app_id": "as_app___dev__XpbBs6UUtfPUHM2",
      "price_currency": "INR",
      "price_units": 0,
      "price_nanos": 0,
      "type": "purchase",
      "transacted_at": 1752839196,
      "created_at": 1755006365,
      "resource_version": 1755006365000,
      "object": "omnichannel_transaction"
    },
    "object": "omnichannel_subscription",
    "omnichannel_subscription_items": [
      {
        "id": "osi___dev__XpbBs6UUtfPr5d6",
        "item_id_at_source": "gold-yearly",
        "status": "active",
        "expired_at": 1752839796,
        "expiration_reason": "other",
        "resource_version": 1755006365339,
        "object": "omnichannel_subscription_item"
      },
      {..}
    ]
  }
}
```

## URL Format

**POST** https://[site].chargebee.com/api/v2/omnichannel_subscriptions/{omnichannel-subscription-id}/move

## Input Parameters

- `to_customer_id` (required, string, max chars=50)
  Specifies the unique ID of the `customer` resource to which the subscription will be moved.

## Returns

- `omnichannel_subscription` (Omnichannel subscription object)
  Resource object representing Omnichannel subscription.
