# Issuing Transaction

The Issuing Transaction resource represents a change in your issuing balance.

Each purchase, invoice payment, withdrawal, or fee generates an issuing transaction.

Use transactions to reconcile your issuing balance and understand fund movements.

### The Issuing Transaction object

**Attributes**

| Name | Type | Description |
| --- | --- | --- |
| `id` | STRING | Unique identifier for the issuing transaction. |
| `amount` | INTEGER | Transaction amount in cents. Positive for credits, negative for debits. |
| `balance` | INTEGER | Issuing balance in cents after this transaction. |
| `description` | STRING | Description of the transaction. |
| `source` | STRING | Source entity that generated this transaction. |
| `tags` | LIST OF STRINGS | Tags associated with the transaction. |
| `created` | STRING | Creation datetime. Example: "2022-01-01T00:00:00.000000+00:00". |

### List Issuing Transactions

`GET /v2/issuing-transaction`

Get a list of issuing transactions in chunks of at most 100.

**Parameters**

| Name | Required | Description |
| --- | --- | --- |
| `limit` | OPTIONAL | Number of results per cursor. Max = 100. |
| `cursor` | OPTIONAL | String used to get the next batch of results. Our SDKs handle this for you. |
| `after` | OPTIONAL | Filter entities created after this date. |
| `before` | OPTIONAL | Filter entities created before this date. |
| `tags` | OPTIONAL | Filter entities that contain the specified tags. |
| `ids` | OPTIONAL | List of strings to get specific entities by ids. |
| `externalIds` | OPTIONAL | List of strings to get specific entities by their external ids. |
| `source` | OPTIONAL | Filter entities by the source entity that generated the transaction. |

**Request**

```python
import starkinfra

transactions = starkinfra.issuingtransaction.query(
    limit=10,
    after="2022-01-01",
    before="2022-12-31",
    tags=["tony", "stark"]
)

for transaction in transactions:
    print(transaction)
```

**Response**

```python
IssuingTransaction(
    id=5715709195239424,
    amount=-1500,
    balance=5000000,
    description=Issuing purchase 6724771005489152,
    source=issuingPurchase/6724771005489152,
    tags=['tony', 'stark'],
    created=2022-01-01 00:00:00
)
```

### Get an Issuing Transaction

`GET /v2/issuing-transaction/:id`

Get a single issuing transaction by its id.

**Parameters**

| Name | Required | Description |
| --- | --- | --- |
| `id` | REQUIRED | Id of the issuing transaction entity. |

**Request**

```python
import starkinfra

transaction = starkinfra.issuingtransaction.get("5715709195239424")

print(transaction)
```

**Response**

```python
IssuingTransaction(
    id=5715709195239424,
    amount=-1500,
    balance=5000000,
    description=Issuing purchase 6724771005489152,
    source=issuingPurchase/6724771005489152,
    tags=['tony', 'stark'],
    created=2022-01-01 00:00:00
)
```

## Available Languages

Code samples on this page are in Python. The same content is available with samples in:

- [Python](https://docs.starkinfra.com/api/v2/issuing-transaction-python.md)
- [Node.js](https://docs.starkinfra.com/api/v2/issuing-transaction-node.md)
- [PHP](https://docs.starkinfra.com/api/v2/issuing-transaction-php.md)
- [Java](https://docs.starkinfra.com/api/v2/issuing-transaction-java.md)
- [Ruby](https://docs.starkinfra.com/api/v2/issuing-transaction-ruby.md)
- [Elixir](https://docs.starkinfra.com/api/v2/issuing-transaction-elixir.md)
- [.NET](https://docs.starkinfra.com/api/v2/issuing-transaction-dotnet.md)
- [Go](https://docs.starkinfra.com/api/v2/issuing-transaction-go.md)
- [Clojure](https://docs.starkinfra.com/api/v2/issuing-transaction-clojure.md)
- [cURL](https://docs.starkinfra.com/api/v2/issuing-transaction-curl.md)
