# Container.bindOnTransaction

Binds a container's onTransaction event to a custom callback. The event is triggered when a transaction is completed.

**Kind:** Function

**Environments:** Game

## Game

``` { .lua .api-signature }
container:bindOnTransaction( callback, object? )
```

[Open the full Game reference](../Game-Script-Environment/Userdata/Container.md#bindontransaction)

**Availability:** Server only

**Parameters:**

| Name | Type | Description |
| --- | --- | --- |
| `container` | [Container](../Game-Script-Environment/Userdata/Container.md) | The container instance. |
| `callback` | string | The name of the Lua function to bind. |
| `object` *(optional)* | table | The object that will receive the callback. (optional) |
