# Cyclos411Api.PendingPaymentsApi

All URIs are relative to *https://138.197.145.149:8080/cyclos/eCloudAtm/api*

Method | HTTP request | Description
------------- | ------------- | -------------
[**authorizePendingPayment**](PendingPaymentsApi.md#authorizePendingPayment) | **POST** /pending-payments/{key}/authorize | Authorizes a pending payment.
[**cancelPendingPayment**](PendingPaymentsApi.md#cancelPendingPayment) | **POST** /pending-payments/{key}/cancel | Cancels the authorization process of a pending payment.
[**denyPendingPayment**](PendingPaymentsApi.md#denyPendingPayment) | **POST** /pending-payments/{key}/deny | Denies a pending payment.


<a name="authorizePendingPayment"></a>
# **authorizePendingPayment**
> TransactionAuthorizationLevelData authorizePendingPayment(key, params, opts)

Authorizes a pending payment.

Authorizes a payment / scheduled payment / recurring payment whose authorization status is &#x60;pending&#x60;. 

### Example
```javascript
var Cyclos411Api = require('cyclos_411_api');
var defaultClient = Cyclos411Api.ApiClient.instance;

// Configure API key authorization: accessClient
var accessClient = defaultClient.authentications['accessClient'];
accessClient.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//accessClient.apiKeyPrefix = 'Token';

// Configure HTTP basic authorization: basic
var basic = defaultClient.authentications['basic'];
basic.username = 'YOUR USERNAME';
basic.password = 'YOUR PASSWORD';

// Configure API key authorization: session
var session = defaultClient.authentications['session'];
session.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//session.apiKeyPrefix = 'Token';

var apiInstance = new Cyclos411Api.PendingPaymentsApi();

var key = "key_example"; // String | Either the id or transaction number.

var params = new Cyclos411Api.PendingPaymentActionParams(); // PendingPaymentActionParams | Contains the action comments

var opts = { 
  'fields': ["fields_example"], // [String] | Select which fields to include on returned data. If nothing is set, all object fields are returned. Unprefixed field names will be handled like a whitelist (only listed fields will be included), while names starting with a minus (-) or exclamation mark (!) will be handled as blacklist (listed fields will not be included). This works for nesting as well. For example: `a,b.b1,c.-c1,c.-c2` will return the fields `a`, `b` (containing only the `b1` field) and `c` (containing all its fields except for `c1` or `c2`).  
  'confirmationPassword': "confirmationPassword_example" // String | The password used to confirm this action, if needed. The actual password type, if any, depends on the Cyclos configuration for the current channel. 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.authorizePendingPayment(key, params, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **key** | **String**| Either the id or transaction number. | 
 **params** | [**PendingPaymentActionParams**](PendingPaymentActionParams.md)| Contains the action comments | 
 **fields** | [**[String]**](String.md)| Select which fields to include on returned data. If nothing is set, all object fields are returned. Unprefixed field names will be handled like a whitelist (only listed fields will be included), while names starting with a minus (-) or exclamation mark (!) will be handled as blacklist (listed fields will not be included). This works for nesting as well. For example: &#x60;a,b.b1,c.-c1,c.-c2&#x60; will return the fields &#x60;a&#x60;, &#x60;b&#x60; (containing only the &#x60;b1&#x60; field) and &#x60;c&#x60; (containing all its fields except for &#x60;c1&#x60; or &#x60;c2&#x60;).   | [optional] 
 **confirmationPassword** | **String**| The password used to confirm this action, if needed. The actual password type, if any, depends on the Cyclos configuration for the current channel.  | [optional] 

### Return type

[**TransactionAuthorizationLevelData**](TransactionAuthorizationLevelData.md)

### Authorization

[accessClient](../README.md#accessClient), [basic](../README.md#basic), [session](../README.md#session)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="cancelPendingPayment"></a>
# **cancelPendingPayment**
> cancelPendingPayment(key, params, opts)

Cancels the authorization process of a pending payment.

Cancels a payment / scheduled payment / recurring payment whose authorization status is &#x60;pending&#x60;. This action is performed by the payer. 

### Example
```javascript
var Cyclos411Api = require('cyclos_411_api');
var defaultClient = Cyclos411Api.ApiClient.instance;

// Configure API key authorization: accessClient
var accessClient = defaultClient.authentications['accessClient'];
accessClient.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//accessClient.apiKeyPrefix = 'Token';

// Configure HTTP basic authorization: basic
var basic = defaultClient.authentications['basic'];
basic.username = 'YOUR USERNAME';
basic.password = 'YOUR PASSWORD';

// Configure API key authorization: session
var session = defaultClient.authentications['session'];
session.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//session.apiKeyPrefix = 'Token';

var apiInstance = new Cyclos411Api.PendingPaymentsApi();

var key = "key_example"; // String | Either the id or transaction number.

var params = new Cyclos411Api.PendingPaymentActionParams(); // PendingPaymentActionParams | Contains the action comments

var opts = { 
  'confirmationPassword': "confirmationPassword_example" // String | The password used to confirm this action, if needed. The actual password type, if any, depends on the Cyclos configuration for the current channel. 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.cancelPendingPayment(key, params, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **key** | **String**| Either the id or transaction number. | 
 **params** | [**PendingPaymentActionParams**](PendingPaymentActionParams.md)| Contains the action comments | 
 **confirmationPassword** | **String**| The password used to confirm this action, if needed. The actual password type, if any, depends on the Cyclos configuration for the current channel.  | [optional] 

### Return type

null (empty response body)

### Authorization

[accessClient](../README.md#accessClient), [basic](../README.md#basic), [session](../README.md#session)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="denyPendingPayment"></a>
# **denyPendingPayment**
> denyPendingPayment(key, params, opts)

Denies a pending payment.

Denies a payment / scheduled payment / recurring payment whose authorization status is &#x60;pending&#x60;. 

### Example
```javascript
var Cyclos411Api = require('cyclos_411_api');
var defaultClient = Cyclos411Api.ApiClient.instance;

// Configure API key authorization: accessClient
var accessClient = defaultClient.authentications['accessClient'];
accessClient.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//accessClient.apiKeyPrefix = 'Token';

// Configure HTTP basic authorization: basic
var basic = defaultClient.authentications['basic'];
basic.username = 'YOUR USERNAME';
basic.password = 'YOUR PASSWORD';

// Configure API key authorization: session
var session = defaultClient.authentications['session'];
session.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//session.apiKeyPrefix = 'Token';

var apiInstance = new Cyclos411Api.PendingPaymentsApi();

var key = "key_example"; // String | Either the id or transaction number.

var params = new Cyclos411Api.PendingPaymentActionParams(); // PendingPaymentActionParams | Contains the action comments

var opts = { 
  'confirmationPassword': "confirmationPassword_example" // String | The password used to confirm this action, if needed. The actual password type, if any, depends on the Cyclos configuration for the current channel. 
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.denyPendingPayment(key, params, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **key** | **String**| Either the id or transaction number. | 
 **params** | [**PendingPaymentActionParams**](PendingPaymentActionParams.md)| Contains the action comments | 
 **confirmationPassword** | **String**| The password used to confirm this action, if needed. The actual password type, if any, depends on the Cyclos configuration for the current channel.  | [optional] 

### Return type

null (empty response body)

### Authorization

[accessClient](../README.md#accessClient), [basic](../README.md#basic), [session](../README.md#session)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

