# PaycometRestApi.PaymentsApi

All URIs are relative to *https://rest.paycomet.com*

Method | HTTP request | Description
------------- | ------------- | -------------
[**executePurchase**](PaymentsApi.md#executePurchase) | **POST** /v1/payments | Executes a payment
[**executePurchaseRtoken**](PaymentsApi.md#executePurchaseRtoken) | **POST** /v1/payments/rtoken | Executes a payment by refence
[**operationInfo**](PaymentsApi.md#operationInfo) | **POST** /v1/payments/{order}/info | Get info of a order
[**operationSearch**](PaymentsApi.md#operationSearch) | **POST** /v1/payments/search | Search orders

<a name="executePurchase"></a>
# **executePurchase**
> InlineResponse20014 executePurchase(opts)

Executes a payment

Generate a purchase. It will confirms a charge or send a challenge URL to the commerce.

### Example
```javascript
import {PaycometRestApi} from 'paycomet_rest_api';

let apiInstance = new PaycometRestApi.PaymentsApi();
let opts = { 
  'body': new PaycometRestApi.V1PaymentsBody(), // V1PaymentsBody | 
  'PAYCOMET_API_TOKEN': "PAYCOMET_API_TOKEN_example" // String | PAYCOMET API key (Authorization privilege required)
};
apiInstance.executePurchase(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**V1PaymentsBody**](V1PaymentsBody.md)|  | [optional] 
 **PAYCOMET_API_TOKEN** | **String**| PAYCOMET API key (Authorization privilege required) | [optional] 

### Return type

[**InlineResponse20014**](InlineResponse20014.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="executePurchaseRtoken"></a>
# **executePurchaseRtoken**
> InlineResponse20021 executePurchaseRtoken(opts)

Executes a payment by refence

Generate a purchase with reference. It will confirms a charge or send a challenge URL to the commerce.

### Example
```javascript
import {PaycometRestApi} from 'paycomet_rest_api';

let apiInstance = new PaycometRestApi.PaymentsApi();
let opts = { 
  'body': new PaycometRestApi.PaymentsRtokenBody(), // PaymentsRtokenBody | 
  'PAYCOMET_API_TOKEN': "PAYCOMET_API_TOKEN_example" // String | PAYCOMET API key (Authorization privilege required)
};
apiInstance.executePurchaseRtoken(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**PaymentsRtokenBody**](PaymentsRtokenBody.md)|  | [optional] 
 **PAYCOMET_API_TOKEN** | **String**| PAYCOMET API key (Authorization privilege required) | [optional] 

### Return type

[**InlineResponse20021**](InlineResponse20021.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="operationInfo"></a>
# **operationInfo**
> InlineResponse20016 operationInfo(order, PAYCOMET_API_TOKEN, opts)

Get info of a order

operation_info

### Example
```javascript
import {PaycometRestApi} from 'paycomet_rest_api';

let apiInstance = new PaycometRestApi.PaymentsApi();
let order = "order_example"; // String | 
let PAYCOMET_API_TOKEN = "PAYCOMET_API_TOKEN_example"; // String | PAYCOMET API key (Query privilege required)
let opts = { 
  'body': new PaycometRestApi.OrderInfoBody() // OrderInfoBody | 
};
apiInstance.operationInfo(order, PAYCOMET_API_TOKEN, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **order** | **String**|  | 
 **PAYCOMET_API_TOKEN** | **String**| PAYCOMET API key (Query privilege required) | 
 **body** | [**OrderInfoBody**](OrderInfoBody.md)|  | [optional] 

### Return type

[**InlineResponse20016**](InlineResponse20016.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="operationSearch"></a>
# **operationSearch**
> InlineResponse20017 operationSearch(PAYCOMET_API_TOKEN, opts)

Search orders

operation_search

### Example
```javascript
import {PaycometRestApi} from 'paycomet_rest_api';

let apiInstance = new PaycometRestApi.PaymentsApi();
let PAYCOMET_API_TOKEN = "PAYCOMET_API_TOKEN_example"; // String | PAYCOMET API key (Query privilege required)
let opts = { 
  'body': new PaycometRestApi.PaymentsSearchBody() // PaymentsSearchBody | 
};
apiInstance.operationSearch(PAYCOMET_API_TOKEN, opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **PAYCOMET_API_TOKEN** | **String**| PAYCOMET API key (Query privilege required) | 
 **body** | [**PaymentsSearchBody**](PaymentsSearchBody.md)|  | [optional] 

### Return type

[**InlineResponse20017**](InlineResponse20017.md)

### Authorization

No authorization required

### HTTP request headers

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

