# Internalize an external transaction (receive payment).

> For the complete documentation index, see [llms.txt](https://bsvblockchain.com/docs/llms.txt).

**POST** `/actions/internalize`

Base URL: `https://{host}/storage/v1`

Corresponds to `StorageProvider.internalizeAction(auth, args)`.
Credits one or more outputs of an external transaction to the
authenticated user's wallet.  Returns `isMerge: true` if the
transaction was already known (replay guard for BRC-121).

## Body

Content type: `application/json`

- `tx` (integer[], required)
  Atomic BEEF bytes of the transaction to internalize.
- `outputs` (object[], required)
- `description` (string, required)

Example:

```json
{
  "tx": [
    0
  ],
  "outputs": [
    {}
  ],
  "description": "string"
}
```

## Responses

### 200

Internalization result.

- `accepted` (boolean, required)
- `isMerge` (boolean, required)
  true if the transaction was already known to storage.
  Used by BRC-121 as a replay guard.
- `txid` (string, required)
- `satoshis` (integer, required)
  Net satoshi change credited to the user.
- `sendWithResults` (object[])
- `notDelayedResults` (object[])
  - `txid` (string, required)
  - `status` ("success" | "doubleSpend" | "serviceError" | "invalidTx", required)
  - `competingTxs` (string[])
  - `competingBeef` (integer[])

Example:

```json
{
  "accepted": true,
  "isMerge": true,
  "txid": "string",
  "satoshis": 0,
  "sendWithResults": [
    {}
  ],
  "notDelayedResults": [
    {
      "txid": "string",
      "status": "success",
      "competingTxs": [
        "string"
      ],
      "competingBeef": [
        0
      ]
    }
  ]
}
```

### 400

Bad request — invalid arguments.

- `error` (string, required)
- `code` (string)
  Machine-readable error code (see specs/errors.md).

Example:

```json
{
  "error": "string",
  "code": "string"
}
```

### 401

Authentication required or token invalid.

- `error` (string, required)
- `code` (string)
  Machine-readable error code (see specs/errors.md).

Example:

```json
{
  "error": "string",
  "code": "string"
}
```

### 500

Internal storage error.

- `error` (string, required)
- `code` (string)
  Machine-readable error code (see specs/errors.md).

Example:

```json
{
  "error": "string",
  "code": "string"
}
```