# PaycometRestApi.CardsApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**addUser**](CardsApi.md#addUser) | **POST** /v1/cards | Tokenizes a card. Either card number and CVC2 or jetToken are required. For you to send directly the card data you should be PCI certified or the accepting the requirement to submit quarterly SAQ-AEP and get ASV scans. For most users is strongly recommended getting the jetToken with JETIFRAME or using GET integration to register the cards instead of REST.
[**editUser**](CardsApi.md#editUser) | **POST** /v1/cards/edit | Changes the expiry date, cvc2 or both
[**infoUser**](CardsApi.md#infoUser) | **POST** /v1/cards/info | Get card info
[**physicalAddCard**](CardsApi.md#physicalAddCard) | **POST** /v1/cards/physical | Tokenize a card by physical encrypted data
[**physicalEditCard**](CardsApi.md#physicalEditCard) | **POST** /v1/cards/physical/edit | Edit a card entered by physical encrypted data
[**removeUser**](CardsApi.md#removeUser) | **POST** /v1/cards/delete | Removes a card

<a name="addUser"></a>
# **addUser**
> InlineResponse2001 addUser(opts)

Tokenizes a card. Either card number and CVC2 or jetToken are required. For you to send directly the card data you should be PCI certified or the accepting the requirement to submit quarterly SAQ-AEP and get ASV scans. For most users is strongly recommended getting the jetToken with JETIFRAME or using GET integration to register the cards instead of REST.

This method supposes the registration of the card in PAYCOMET, it is not valid for subsequent charges with the exception of MIT. To register the card against the processor for subsequent recurring charges, it is necessary to charge for a secure environment, regardless of the amount.

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

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

### Parameters

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

### Return type

[**InlineResponse2001**](InlineResponse2001.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="editUser"></a>
# **editUser**
> InlineResponse2001 editUser(opts)

Changes the expiry date, cvc2 or both

edit_user

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

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

### Parameters

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

### Return type

[**InlineResponse2001**](InlineResponse2001.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="infoUser"></a>
# **infoUser**
> InlineResponse2002 infoUser(opts)

Get card info

Info about an user card.

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

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

### Parameters

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

### Return type

[**InlineResponse2002**](InlineResponse2002.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="physicalAddCard"></a>
# **physicalAddCard**
> InlineResponse2004 physicalAddCard(opts)

Tokenize a card by physical encrypted data

cards_physical

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

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

### Parameters

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

### Return type

[**InlineResponse2004**](InlineResponse2004.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="physicalEditCard"></a>
# **physicalEditCard**
> InlineResponse2005 physicalEditCard(opts)

Edit a card entered by physical encrypted data

cards_physical_edit

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

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

### Parameters

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

### Return type

[**InlineResponse2005**](InlineResponse2005.md)

### Authorization

No authorization required

### HTTP request headers

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

<a name="removeUser"></a>
# **removeUser**
> InlineResponse2003 removeUser(opts)

Removes a card

Deletes the user.

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

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

### Parameters

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

### Return type

[**InlineResponse2003**](InlineResponse2003.md)

### Authorization

No authorization required

### HTTP request headers

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

