cybersource-rest-client
Version:
Node.js SDK for the CyberSource REST API
378 lines (255 loc) • 15.4 kB
Markdown
All URIs are relative to *https://apitest.cybersource.com*
Method | HTTP request | Description
------------- | ------------- | -------------
[**getCardArtAsset**](NetworkTokensApi.md
[**getTokenizedCard**](NetworkTokensApi.md
[**postIssuerLifeCycleSimulation**](NetworkTokensApi.md
[**postTokenPaymentCredentials**](NetworkTokensApi.md
[**postTokenPaymentCredentialsV3**](NetworkTokensApi.md
[**postTokenizedCard**](NetworkTokensApi.md
[**postTokenizedCardDelete**](NetworkTokensApi.md
<a name="getCardArtAsset"></a>
> InlineResponse2002 getCardArtAsset(instrumentIdentifierId, tokenProvider, assetType)
Retrieve Card Art
Retrieves Card Art for a specific Instrument Identifier. The Card Art is a visual representation of the cardholder's payment card. Card Art is only available if a Network Token is successfully provisioned.
### Example
```javascript
var CyberSource = require('CyberSource');
var apiInstance = new CyberSource.NetworkTokensApi();
var instrumentIdentifierId = "instrumentIdentifierId_example"; // String | The Id of an Instrument Identifier.
var tokenProvider = "tokenProvider_example"; // String | The token provider.
var assetType = "assetType_example"; // String | The type of asset.
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getCardArtAsset(instrumentIdentifierId, tokenProvider, assetType, callback);
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**instrumentIdentifierId** | **String**| The Id of an Instrument Identifier. |
**tokenProvider** | **String**| The token provider. |
**assetType** | **String**| The type of asset. |
[**InlineResponse2002**](InlineResponse2002.md)
No authorization required
- **Content-Type**: application/json;charset=utf-8
- **Accept**: application/json;charset=utf-8
<a name="getTokenizedCard"></a>
> InlineResponse2001 getTokenizedCard(tokenizedCardId, opts)
Retrieve a Tokenized Card
|**Tokenized Cards**<br>A Tokenized Card represents a network token. Network tokens perform better than regular card numbers and they are not necessarily invalidated when a cardholder loses their card, or it expires. This API returns the details of a tokenized card stored in TMS. You can use this API to check the status of a tokenized card and retrieve details such as the last four digits of the underlying card, expiration date, and card type.
### Example
```javascript
var CyberSource = require('CyberSource');
var apiInstance = new CyberSource.NetworkTokensApi();
var tokenizedCardId = "tokenizedCardId_example"; // String | The Id of a tokenized card.
var opts = {
'profileId': "profileId_example" // String | The Id of a profile containing user specific TMS configuration.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getTokenizedCard(tokenizedCardId, opts, callback);
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**tokenizedCardId** | **String**| The Id of a tokenized card. |
**profileId** | **String**| The Id of a profile containing user specific TMS configuration. | [optional]
[**InlineResponse2001**](InlineResponse2001.md)
No authorization required
- **Content-Type**: application/json;charset=utf-8
- **Accept**: application/json;charset=utf-8
<a name="postIssuerLifeCycleSimulation"></a>
> postIssuerLifeCycleSimulation(profileId, tokenizedCardId, postIssuerLifeCycleSimulationRequest)
Simulate Issuer Life Cycle Management Events
**Lifecycle Management Events**<br>Simulates an issuer life cycle manegement event for updates on the tokenized card. The events that can be simulated are: - Token status changes (e.g. active, suspended, deleted) - Updates to the underlying card, including card art changes, expiration date changes, and card number suffix. **Note:** This is only available in CAS environment.
### Example
```javascript
var CyberSource = require('CyberSource');
var apiInstance = new CyberSource.NetworkTokensApi();
var profileId = "profileId_example"; // String | The Id of a profile containing user specific TMS configuration.
var tokenizedCardId = "tokenizedCardId_example"; // String | The Id of a tokenized card.
var postIssuerLifeCycleSimulationRequest = new CyberSource.PostIssuerLifeCycleSimulationRequest(); // PostIssuerLifeCycleSimulationRequest |
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.postIssuerLifeCycleSimulation(profileId, tokenizedCardId, postIssuerLifeCycleSimulationRequest, callback);
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**profileId** | **String**| The Id of a profile containing user specific TMS configuration. |
**tokenizedCardId** | **String**| The Id of a tokenized card. |
**postIssuerLifeCycleSimulationRequest** | [**PostIssuerLifeCycleSimulationRequest**](PostIssuerLifeCycleSimulationRequest.md)| |
null (empty response body)
No authorization required
- **Content-Type**: application/json;charset=utf-8
- **Accept**: application/json;charset=utf-8
<a name="postTokenPaymentCredentials"></a>
> 'String' postTokenPaymentCredentials(tokenId, postPaymentCredentialsRequest, opts)
Generate Payment Credentials v2
**Note**: This resource will be replace by [payment credentials version 3](
```javascript
var CyberSource = require('CyberSource');
var apiInstance = new CyberSource.NetworkTokensApi();
var tokenId = "tokenId_example"; // String | The Id of a token representing a Customer, Payment Instrument or Instrument Identifier.
var postPaymentCredentialsRequest = new CyberSource.PostPaymentCredentialsRequest1(); // PostPaymentCredentialsRequest1 |
var opts = {
'profileId': "profileId_example" // String | The Id of a profile containing user specific TMS configuration.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.postTokenPaymentCredentials(tokenId, postPaymentCredentialsRequest, opts, callback);
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**tokenId** | **String**| The Id of a token representing a Customer, Payment Instrument or Instrument Identifier. |
**postPaymentCredentialsRequest** | [**PostPaymentCredentialsRequest1**](PostPaymentCredentialsRequest1.md)| |
**profileId** | **String**| The Id of a profile containing user specific TMS configuration. | [optional]
**'String'**
No authorization required
- **Content-Type**: application/json;charset=utf-8
- **Accept**: application/jose;charset=utf-8
<a name="postTokenPaymentCredentialsV3"></a>
> InlineResponse2011 postTokenPaymentCredentialsV3(tokenId, postPaymentCredentialsRequest, opts)
Generate Payment Credentials Latest Version v3
**Payment Credentials**<br>Contains payment information such as the network token, generated TAVV cryptogram for Visa & MasterCard, dynamic CVV for Amex, or DTVV cryptogram for VISA. This latest version (v3) returns the Primary Account Number details, if the network token is not present. The response is provided in JSON Web Encryption (JWE) format. <br>Your system can use this API to retrieve the Payment Credentials for an existing Customer, Payment Instrument, Instrument Identifier or Tokenized Card.<br>Optionally, **authenticated identities** information from Passkey authentication can be provided to potentially achieve liability shift, which may result in the return of an e-commerce indicator of 5 if successful.
### Example
```javascript
var CyberSource = require('CyberSource');
var apiInstance = new CyberSource.NetworkTokensApi();
var tokenId = "tokenId_example"; // String | The Id of a token representing a Customer, Payment Instrument or Instrument Identifier.
var postPaymentCredentialsRequest = new CyberSource.PostPaymentCredentialsRequest(); // PostPaymentCredentialsRequest |
var opts = {
'profileId': "profileId_example" // String | The Id of a profile containing user specific TMS configuration.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.postTokenPaymentCredentialsV3(tokenId, postPaymentCredentialsRequest, opts, callback);
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**tokenId** | **String**| The Id of a token representing a Customer, Payment Instrument or Instrument Identifier. |
**postPaymentCredentialsRequest** | [**PostPaymentCredentialsRequest**](PostPaymentCredentialsRequest.md)| |
**profileId** | **String**| The Id of a profile containing user specific TMS configuration. | [optional]
[**InlineResponse2011**](InlineResponse2011.md)
No authorization required
- **Content-Type**: application/json;charset=utf-8
- **Accept**: application/jose;charset=utf-8
<a name="postTokenizedCard"></a>
> InlineResponse2001 postTokenizedCard(postTokenizedCardRequest, opts)
Create a Tokenized Card
**Tokenized cards**<br>A Tokenized card represents a network token. Network tokens perform better than regular card numbers and they are not necessarily invalidated when a cardholder loses their card, or it expires. This API submits a request to the card association to create a network token. If successful, a tokenized card will be created in TMS to represent the network token.
### Example
```javascript
var CyberSource = require('CyberSource');
var apiInstance = new CyberSource.NetworkTokensApi();
var postTokenizedCardRequest = new CyberSource.PostTokenizedCardRequest(); // PostTokenizedCardRequest |
var opts = {
'profileId': "profileId_example" // String | The Id of a profile containing user specific TMS configuration.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.postTokenizedCard(postTokenizedCardRequest, opts, callback);
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**postTokenizedCardRequest** | [**PostTokenizedCardRequest**](PostTokenizedCardRequest.md)| |
**profileId** | **String**| The Id of a profile containing user specific TMS configuration. | [optional]
[**InlineResponse2001**](InlineResponse2001.md)
No authorization required
- **Content-Type**: application/json;charset=utf-8
- **Accept**: application/json;charset=utf-8
<a name="postTokenizedCardDelete"></a>
> postTokenizedCardDelete(tokenizedCardId, opts)
Delete a Tokenized Card
This API attempts to delete a network token from the card association with a specified reason. | If successful, the corresponding tokenized card will be deleted. | The reason for deletion can be specified to provide context for the deletion operation.
```javascript
var CyberSource = require('CyberSource');
var apiInstance = new CyberSource.NetworkTokensApi();
var tokenizedCardId = "tokenizedCardId_example"; // String | The Id of a tokenized card.
var opts = {
'profileId': "profileId_example", // String | The Id of a profile containing user specific TMS configuration.
'postTokenizedCardDeleteRequest': new CyberSource.TmsTokenizedCardDeleteRequest() // TmsTokenizedCardDeleteRequest |
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
};
apiInstance.postTokenizedCardDelete(tokenizedCardId, opts, callback);
```
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**tokenizedCardId** | **String**| The Id of a tokenized card. |
**profileId** | **String**| The Id of a profile containing user specific TMS configuration. | [optional]
**postTokenizedCardDeleteRequest** | [**TmsTokenizedCardDeleteRequest**](TmsTokenizedCardDeleteRequest.md)| | [optional]
null (empty response body)
No authorization required
- **Content-Type**: application/json;charset=utf-8
- **Accept**: application/json;charset=utf-8