# DepositTransactionAsyncApi

All URIs are relative to *http://localhost:8889/api*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**makeDepositAsync**](#makedepositasync) | **POST** /deposits/{depositAccountId}/transactions/deposits | Create deposit transaction|
|[**makeWithdrawalAsync**](#makewithdrawalasync) | **POST** /deposits/{depositAccountId}/transactions/withdrawals | Create withdrawal transaction|

# **makeDepositAsync**
> makeDepositAsync(depositTransactionInput)


### Example

```typescript
import {
    DepositTransactionAsyncApi,
    Configuration,
    DepositTransactionInput
} from './api';

const configuration = new Configuration();
const apiInstance = new DepositTransactionAsyncApi(configuration);

let depositAccountId: string; //The ID or encoded key of the deposit that the transaction will be created for. (default to undefined)
let depositTransactionInput: DepositTransactionInput; //Represents the information needed to create a deposit transaction.
let idempotencyKey: string; //Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. (optional) (default to undefined)

const { status, data } = await apiInstance.makeDepositAsync(
    depositAccountId,
    depositTransactionInput,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **depositTransactionInput** | **DepositTransactionInput**| Represents the information needed to create a deposit transaction. | |
| **depositAccountId** | [**string**] | The ID or encoded key of the deposit that the transaction will be created for. | defaults to undefined|
| **idempotencyKey** | [**string**] | Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. | (optional) defaults to undefined|


### Return type

void (empty response body)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**102** | Your idempotent request was already submitted and is currently being processed, try again later. |  -  |
|**202** | The deposit transaction has been accepted. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | The deposit account was not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **makeWithdrawalAsync**
> makeWithdrawalAsync(withdrawalDepositTransactionInput)


### Example

```typescript
import {
    DepositTransactionAsyncApi,
    Configuration,
    WithdrawalDepositTransactionInput
} from './api';

const configuration = new Configuration();
const apiInstance = new DepositTransactionAsyncApi(configuration);

let depositAccountId: string; //The ID or encoded key of the deposit that the transaction will be created for. (default to undefined)
let withdrawalDepositTransactionInput: WithdrawalDepositTransactionInput; //Represents the information for a withdrawal transaction.
let idempotencyKey: string; //Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. (optional) (default to undefined)

const { status, data } = await apiInstance.makeWithdrawalAsync(
    depositAccountId,
    withdrawalDepositTransactionInput,
    idempotencyKey
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **withdrawalDepositTransactionInput** | **WithdrawalDepositTransactionInput**| Represents the information for a withdrawal transaction. | |
| **depositAccountId** | [**string**] | The ID or encoded key of the deposit that the transaction will be created for. | defaults to undefined|
| **idempotencyKey** | [**string**] | Key that can be used to support idempotency on this POST. Must be a valid UUID(version 4 is recommended) string and can only be used with the exact same request. Can be used in retry mechanisms to prevent double posting. | (optional) defaults to undefined|


### Return type

void (empty response body)

### Authorization

[basic](../README.md#basic)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/vnd.mambu.v2+json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**102** | Your idempotent request was already submitted and is currently being processed, try again later. |  -  |
|**202** | The withdrawal transaction has been accepted. |  -  |
|**400** | A validation error occurred |  -  |
|**401** | Unauthorized |  -  |
|**403** | Forbidden |  -  |
|**404** | The deposit account was not found. |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

