> ## Documentation Index
> Fetch the complete documentation index at: https://vowena.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# reject_migration

> Rejects a pending plan migration request. The subscriber stays on their current plan at the current price. Clears the migration flag from the subscription.

```rust theme={null}
fn reject_migration(env: Env, subscriber: Address, sub_id: u64)
```

Rejects a pending migration for a subscription. The `migration_target` field is cleared and the subscriber continues on their current plan with no changes.

***

## Parameters

| Name         | Type      | Description                                                  |
| ------------ | --------- | ------------------------------------------------------------ |
| `subscriber` | `Address` | The subscriber's Stellar address. Must sign the transaction. |
| `sub_id`     | `u64`     | The subscription ID with a pending migration.                |

***

## Authorization

```rust theme={null}
subscriber.require_auth();
```

Only the subscriber on the subscription can reject the migration.

***

## Return value

None (`void`).

***

## Events emitted

| Event        | Topics                 | Data              |
| ------------ | ---------------------- | ----------------- |
| `mig_reject` | `subscriber`, `sub_id` | Rejection details |

***

## Error cases

| Code | Name                 | Description                                            |
| ---- | -------------------- | ------------------------------------------------------ |
| 9    | `Unauthorized`       | Caller is not the subscriber on this subscription.     |
| 12   | `NoMigrationPending` | No migration has been requested for this subscription. |

***

## Examples

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    import { VowenaClient, NETWORKS } from "@vowena/sdk";

    const client = new VowenaClient({
      contractId: NETWORKS.mainnet.contractId,
      rpcUrl: NETWORKS.mainnet.rpcUrl,
      networkPassphrase: NETWORKS.mainnet.networkPassphrase,
    });

    // Reject the pending migration - stay on current plan
    const tx = await client.buildRejectMigration(
      "GSUBSCRIBER...ADDR",   // Subscriber's address
      subscriptionId            // Subscription ID
    );

    const signedXdr = await signTransaction(tx);
    await client.submitTransaction(signedXdr);
    ```
  </Tab>

  <Tab title="Soroban CLI">
    ```bash theme={null}
    soroban contract invoke \
      --id CONTRACT_ID \
      --network mainnet \
      --source SUBSCRIBER_SECRET \
      -- \
      reject_migration \
      --subscriber GSUBSCRIBER...ADDR \
      --sub_id 1
    ```
  </Tab>
</Tabs>

<Note>
  Rejecting a migration has no side effects. The subscription continues as normal on the current plan, billing proceeds unchanged, and the subscriber can still cancel at any time.
</Note>
