# TransferzeroSdk.AccountDebitsApi All URIs are relative to *https://api-sandbox.transferzero.com/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**postAccountsDebits**](AccountDebitsApi.md#postAccountsDebits) | **POST** /accounts/debits | Creating an account debit # **postAccountsDebits** > DebitListResponse postAccountsDebits(debitRequestWrapper) Creating an account debit Creates a new account debit finding transaction through the internal balance To successfully fund a transaction - - The currency needs to be the same as the input_currency on the transaction - The amount has to be the same as the input_amount on the transaction - The to_id is the id of the transaction - You need to have enough balance of the appropriate currency inside your wallet Once the transaction is funded, we will immediately start trying to pay out the recipient(s). It is also possible to create multiple account debits by supplying an array of debit objects ### Example ```javascript import { AccountDebitsApi } from 'transferzero-sdk'; // Configure API key authorization const apiClient = new ApiClient(); apiClient.apiKey = ''; apiClient.apiSecret = ''; apiClient.basePath = 'https://api-sandbox.transferzero.com/v1'; let apiInstance = new AccountDebitsApi(apiClient); apiInstance.postAccountsDebits(debitRequestWrapper).then((data) => { console.log('API called successfully. Returned data: ' + data); }, (error) => { if (error.isValidationError) { let result = error.getResponseObject(); console.log(result); console.error("WARN: Validation error occurred when calling the endpoint"); } else { console.error("Exception when calling AccountDebitsApi#postAccountsDebits"); throw error; } }); ``` ### Parameters Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **debitRequestWrapper** | [**DebitRequestWrapper**](DebitRequestWrapper.md)| | ### Return type [**DebitListResponse**](DebitListResponse.md) ### Authorization You can set the API Key and Secret by passing a config object when creating an ApiClient: ```js const apiClient = new ApiClient({ apiKey: '', apiSecret: '', basePath: 'https://api-sandbox.transferzero.com/v1' }); ``` Or by setting the properties on an ApiClient instance: ```js const apiClient = new ApiClient(); apiClient.apiKey = ''; apiClient.apiSecret = ''; apiClient.basePath = 'https://api-sandbox.transferzero.com/v1'; ``` ### HTTP request headers - **Content-Type**: application/json - **Accept**: application/json