# Transactions

## List transactions

{% hint style="info" %}
**OAuth:** This endpoint requires one of the following scopes: `transaction:manage`, `transaction:write` or `transaction:read`.
{% endhint %}

{% openapi src="<https://app.textmaster.com/api-docs/v1/clients/specs.yaml>" path="/v1/clients/transactions" method="get" %}
<https://app.textmaster.com/api-docs/v1/clients/specs.yaml>
{% endopenapi %}

#### Parameters

| Name    | Type             | Description                                                                 |
| ------- | ---------------- | --------------------------------------------------------------------------- |
| `types` | array of strings | The transaction types to filter against. See list of supported types below. |

#### Transaction types

You will find below the list of supported transaction types to filter against:

```
Transaction::CashWithdrawal::BundleCancellation
Transaction::CashWithdrawal::BundleRefund
Transaction::CreditExchange::GivenByManager
Transaction::CreditExchange::GivenToSubordinate
Transaction::CreditPayment::AdminLoan
Transaction::CreditPayment::AdminRefund
Transaction::CreditPayment::CompletingAJob
Transaction::CreditPayment::ExpiringWallet
Transaction::CreditPayment::FinancialCompensation
Transaction::CreditPurchase::AdminLevy
Transaction::CreditPurchase::BuyingACreditBundle
Transaction::CreditPurchase::EarningFromReferredClient
Transaction::CreditPurchase::ExpiringCredits
Transaction::CreditPurchase::FinancialCompensation
Transaction::CreditPurchase::RedeemingAPromoCode
Transaction::CreditPurchase::Rollback
Transaction::NonCreditPurchase::InHouseServiceFee
Transaction::NonCreditPurchase::SubscriptionPrepayment
Transaction::NonCreditSpending::SubscriptionInstallment
Transaction::ProjectSpending::AdminProjectLevy
Transaction::ProjectSpending::AdminProjectRefund
Transaction::ProjectSpending::CancelingAProject
Transaction::ProjectSpending::LaunchingAProject
Transaction::ProjectSpending::RepoDocWithCanceledProject
```

#### Code samples

```shell
curl -G "https://api.textmaster.com/v1/clients/transactions" \
  --data-urlencode "types[]=Transaction%3A%3AProjectSpending%3A%3ACancelingAProject" \
  --data-urlencode "types[]=Transaction%3A%3AProjectSpending%3A%3ALaunchingAProject" \
  -H "Authorization: Bearer 0c950ba36bc15a8a10a6d179ca3db112e0cd5e29dca1aa03f4d2b53f01c06db8"
```

## List invoices

{% hint style="info" %}
**OAuth:** This endpoint requires one of the following scopes: `transaction:manage`, `transaction:write` or `transaction:read`.
{% endhint %}

#### Parameters

| Name    | Type             | Description                                                                         |
| ------- | ---------------- | ----------------------------------------------------------------------------------- |
| `types` | array of strings | The invoice transaction types to filter against. See list of supported types below. |

#### Transaction types

You will find below the list of supported transaction types that include an invoice, to filter against:

```
Transaction::CashWithdrawal::BundleCancellation
Transaction::CashWithdrawal::BundleRefund
Transaction::CreditPurchase::BuyingACreditBundle
Transaction::NonCreditPurchase::InHouseServiceFee
Transaction::NonCreditPurchase::SubscriptionPrepayment
```

{% openapi src="<https://app.textmaster.com/api-docs/v1/clients/specs.yaml>" path="/v1/clients/invoices" method="get" %}
<https://app.textmaster.com/api-docs/v1/clients/specs.yaml>
{% endopenapi %}

#### Code samples

```shell
curl -G "https://api.textmaster.com/v1/clients/invoices" \
  --data-urlencode "types[]=Transaction%3A%3ACashWithdrawal%3A%3ABundleCancellation" \
  --data-urlencode "types[]=Transaction%3A%3ACashWithdrawal%3A%3ABundleRefund" \
  --data-urlencode "types[]=Transaction%3A%3ACreditPurchase%3A%3ABuyingACreditBundle" \
  --data-urlencode "types[]=Transaction%3A%3ANonCreditPurchase%3A%3ABuyingAInHouseServiceFee" \
  --data-urlencode "types[]=Transaction%3A%3ANonCreditPurchase%3A%3ABuyingASubscriptionPrepayment" \
  -H "Authorization: Bearer d8484b69ffe1f749ce720cb370bc65d9fa3e8c3b6e0d19144db676678b0988db"
```

## List receipts

{% hint style="info" %}
**OAuth:** This endpoint requires one of the following scopes: `transaction:manage`, `transaction:write` or `transaction:read`.
{% endhint %}

{% openapi src="<https://app.textmaster.com/api-docs/v1/clients/specs.yaml>" path="/v1/clients/receipts" method="get" %}
<https://app.textmaster.com/api-docs/v1/clients/specs.yaml>
{% endopenapi %}

#### Code samples

```shell
curl -G "https://api.textmaster.com/v1/clients/receipts" \
  -H "Authorization: Bearer 1c1a2c26e3f9a890bd232a987f6b538ded6f48f6a02796e54a7ce405eeeb9b19"
```
