Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
Java SDK to be used with a First Data Gateway account. This SDK has been created and packaged to offer the easiest way to integrate your application into the First Data Gateway. This SDK gives you the ability to run transactions such as sales, preauthorizations, postauthorizations, credits, voids, and returns; transaction inquiries; setting up scheduled payments and much more.
/*
* Payment Gateway API Specification.
* The documentation here is designed to provide all of the technical guidance required to consume and integrate with our APIs for payment processing. To learn more about our APIs please visit https://docs.firstdata.com/org/gateway.
*
* The version of the OpenAPI document: 21.2.0.20210406.001
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.github.GBSEcom.api;
import com.github.GBSEcom.client.ApiCallback;
import com.github.GBSEcom.client.ApiClient;
import com.github.GBSEcom.client.ApiException;
import com.github.GBSEcom.client.ApiResponse;
import com.github.GBSEcom.client.Configuration;
import com.github.GBSEcom.client.Pair;
import com.github.GBSEcom.client.ProgressRequestBody;
import com.github.GBSEcom.client.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import com.github.GBSEcom.model.ErrorResponse;
import com.github.GBSEcom.model.PaymentCardPaymentTokenUpdateRequest;
import com.github.GBSEcom.model.PaymentTokenUpdateResponse;
import com.github.GBSEcom.model.PaymentTokenizationErrorResponse;
import com.github.GBSEcom.model.PaymentTokenizationRequest;
import com.github.GBSEcom.model.PaymentTokenizationResponse;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class PaymentTokenApi {
private ApiClient localVarApiClient;
public PaymentTokenApi() {
this(Configuration.getDefaultApiClient());
}
public PaymentTokenApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
/**
* Build call for createPaymentToken
* @param contentType Content type. (required)
* @param clientRequestId A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format. (required)
* @param apiKey Key given to merchant after boarding associating their requests with the appropriate app in Apigee. (required)
* @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins). (required)
* @param paymentTokenizationRequest Accepted request types: PaymentCardPaymentTokenizationRequest, PaymentDevicePaymentTokenizationRequest, and ReferencedOrderPaymentTokenizationRequest. (required)
* @param messageSignature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal. (optional)
* @param authorization The access token previously generated with the access-tokens call. Use the format 'Bearer {access-token}'. (optional)
* @param region Indicates the region where the client wants the transaction to be processed. This will override the default processing region identified for the client. Available options are argentina, brazil, germany, india and northamerica. Region specific store setup and APIGEE boarding is required in order to use an alternate region for processing. (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
Status Code
Description
Response Headers
200
Success response.
-
400
The request cannot be validated.
-
401
The request was unauthorized.
-
404
The requested resource doesn't exist.
-
409
The attempted action is not valid according to gateway rules. For example, when the gateway is too busy then the transaction is not processed.
-
422
The processor declined the transaction.
-
500
An unexpected internal server error occurred.
-
*/
public okhttp3.Call createPaymentTokenCall(String contentType, String clientRequestId, String apiKey, Long timestamp, PaymentTokenizationRequest paymentTokenizationRequest, String messageSignature, String authorization, String region, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = paymentTokenizationRequest;
// create path and map variables
String localVarPath = "/payment-tokens";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
if (contentType != null) {
localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType));
}
if (clientRequestId != null) {
localVarHeaderParams.put("Client-Request-Id", localVarApiClient.parameterToString(clientRequestId));
}
if (apiKey != null) {
localVarHeaderParams.put("Api-Key", localVarApiClient.parameterToString(apiKey));
}
if (timestamp != null) {
localVarHeaderParams.put("Timestamp", localVarApiClient.parameterToString(timestamp));
}
if (messageSignature != null) {
localVarHeaderParams.put("Message-Signature", localVarApiClient.parameterToString(messageSignature));
}
if (authorization != null) {
localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
}
if (region != null) {
localVarHeaderParams.put("Region", localVarApiClient.parameterToString(region));
}
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call createPaymentTokenValidateBeforeCall(String contentType, String clientRequestId, String apiKey, Long timestamp, PaymentTokenizationRequest paymentTokenizationRequest, String messageSignature, String authorization, String region, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'contentType' is set
if (contentType == null) {
throw new ApiException("Missing the required parameter 'contentType' when calling createPaymentToken(Async)");
}
// verify the required parameter 'clientRequestId' is set
if (clientRequestId == null) {
throw new ApiException("Missing the required parameter 'clientRequestId' when calling createPaymentToken(Async)");
}
// verify the required parameter 'apiKey' is set
if (apiKey == null) {
throw new ApiException("Missing the required parameter 'apiKey' when calling createPaymentToken(Async)");
}
// verify the required parameter 'timestamp' is set
if (timestamp == null) {
throw new ApiException("Missing the required parameter 'timestamp' when calling createPaymentToken(Async)");
}
// verify the required parameter 'paymentTokenizationRequest' is set
if (paymentTokenizationRequest == null) {
throw new ApiException("Missing the required parameter 'paymentTokenizationRequest' when calling createPaymentToken(Async)");
}
okhttp3.Call localVarCall = createPaymentTokenCall(contentType, clientRequestId, apiKey, timestamp, paymentTokenizationRequest, messageSignature, authorization, region, _callback);
return localVarCall;
}
/**
* Create a payment token from a payment card.
* Use this to create a payment token from a payment card.
* @param contentType Content type. (required)
* @param clientRequestId A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format. (required)
* @param apiKey Key given to merchant after boarding associating their requests with the appropriate app in Apigee. (required)
* @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins). (required)
* @param paymentTokenizationRequest Accepted request types: PaymentCardPaymentTokenizationRequest, PaymentDevicePaymentTokenizationRequest, and ReferencedOrderPaymentTokenizationRequest. (required)
* @param messageSignature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal. (optional)
* @param authorization The access token previously generated with the access-tokens call. Use the format 'Bearer {access-token}'. (optional)
* @param region Indicates the region where the client wants the transaction to be processed. This will override the default processing region identified for the client. Available options are argentina, brazil, germany, india and northamerica. Region specific store setup and APIGEE boarding is required in order to use an alternate region for processing. (optional)
* @return PaymentTokenizationResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
Status Code
Description
Response Headers
200
Success response.
-
400
The request cannot be validated.
-
401
The request was unauthorized.
-
404
The requested resource doesn't exist.
-
409
The attempted action is not valid according to gateway rules. For example, when the gateway is too busy then the transaction is not processed.
-
422
The processor declined the transaction.
-
500
An unexpected internal server error occurred.
-
*/
public PaymentTokenizationResponse createPaymentToken(String contentType, String clientRequestId, String apiKey, Long timestamp, PaymentTokenizationRequest paymentTokenizationRequest, String messageSignature, String authorization, String region) throws ApiException {
ApiResponse localVarResp = createPaymentTokenWithHttpInfo(contentType, clientRequestId, apiKey, timestamp, paymentTokenizationRequest, messageSignature, authorization, region);
return localVarResp.getData();
}
/**
* Create a payment token from a payment card.
* Use this to create a payment token from a payment card.
* @param contentType Content type. (required)
* @param clientRequestId A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format. (required)
* @param apiKey Key given to merchant after boarding associating their requests with the appropriate app in Apigee. (required)
* @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins). (required)
* @param paymentTokenizationRequest Accepted request types: PaymentCardPaymentTokenizationRequest, PaymentDevicePaymentTokenizationRequest, and ReferencedOrderPaymentTokenizationRequest. (required)
* @param messageSignature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal. (optional)
* @param authorization The access token previously generated with the access-tokens call. Use the format 'Bearer {access-token}'. (optional)
* @param region Indicates the region where the client wants the transaction to be processed. This will override the default processing region identified for the client. Available options are argentina, brazil, germany, india and northamerica. Region specific store setup and APIGEE boarding is required in order to use an alternate region for processing. (optional)
* @return ApiResponse<PaymentTokenizationResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
Status Code
Description
Response Headers
200
Success response.
-
400
The request cannot be validated.
-
401
The request was unauthorized.
-
404
The requested resource doesn't exist.
-
409
The attempted action is not valid according to gateway rules. For example, when the gateway is too busy then the transaction is not processed.
-
422
The processor declined the transaction.
-
500
An unexpected internal server error occurred.
-
*/
public ApiResponse createPaymentTokenWithHttpInfo(String contentType, String clientRequestId, String apiKey, Long timestamp, PaymentTokenizationRequest paymentTokenizationRequest, String messageSignature, String authorization, String region) throws ApiException {
okhttp3.Call localVarCall = createPaymentTokenValidateBeforeCall(contentType, clientRequestId, apiKey, timestamp, paymentTokenizationRequest, messageSignature, authorization, region, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Create a payment token from a payment card. (asynchronously)
* Use this to create a payment token from a payment card.
* @param contentType Content type. (required)
* @param clientRequestId A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format. (required)
* @param apiKey Key given to merchant after boarding associating their requests with the appropriate app in Apigee. (required)
* @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins). (required)
* @param paymentTokenizationRequest Accepted request types: PaymentCardPaymentTokenizationRequest, PaymentDevicePaymentTokenizationRequest, and ReferencedOrderPaymentTokenizationRequest. (required)
* @param messageSignature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal. (optional)
* @param authorization The access token previously generated with the access-tokens call. Use the format 'Bearer {access-token}'. (optional)
* @param region Indicates the region where the client wants the transaction to be processed. This will override the default processing region identified for the client. Available options are argentina, brazil, germany, india and northamerica. Region specific store setup and APIGEE boarding is required in order to use an alternate region for processing. (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
Status Code
Description
Response Headers
200
Success response.
-
400
The request cannot be validated.
-
401
The request was unauthorized.
-
404
The requested resource doesn't exist.
-
409
The attempted action is not valid according to gateway rules. For example, when the gateway is too busy then the transaction is not processed.
-
422
The processor declined the transaction.
-
500
An unexpected internal server error occurred.
-
*/
public okhttp3.Call createPaymentTokenAsync(String contentType, String clientRequestId, String apiKey, Long timestamp, PaymentTokenizationRequest paymentTokenizationRequest, String messageSignature, String authorization, String region, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createPaymentTokenValidateBeforeCall(contentType, clientRequestId, apiKey, timestamp, paymentTokenizationRequest, messageSignature, authorization, region, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for deletePaymentToken
* @param contentType Content type. (required)
* @param clientRequestId A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format. (required)
* @param apiKey Key given to merchant after boarding associating their requests with the appropriate app in Apigee. (required)
* @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins). (required)
* @param tokenId Identifies a payment token. (required)
* @param messageSignature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal. (optional)
* @param authorization The access token previously generated with the access-tokens call. Use the format 'Bearer {access-token}'. (optional)
* @param region Indicates the region where the client wants the transaction to be processed. This will override the default processing region identified for the client. Available options are argentina, brazil, germany, india and northamerica. Region specific store setup and APIGEE boarding is required in order to use an alternate region for processing. (optional)
* @param storeId (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
Status Code
Description
Response Headers
200
Success response.
-
400
The request cannot be validated.
-
401
The request was unauthorized.
-
404
The requested resource doesn't exist.
-
500
An unexpected internal server error occurred.
-
*/
public okhttp3.Call deletePaymentTokenCall(String contentType, String clientRequestId, String apiKey, Long timestamp, String tokenId, String messageSignature, String authorization, String region, String storeId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/payment-tokens/{token-id}"
.replaceAll("\\{" + "token-id" + "\\}", localVarApiClient.escapeString(tokenId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (storeId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("storeId", storeId));
}
Map localVarHeaderParams = new HashMap();
if (contentType != null) {
localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType));
}
if (clientRequestId != null) {
localVarHeaderParams.put("Client-Request-Id", localVarApiClient.parameterToString(clientRequestId));
}
if (apiKey != null) {
localVarHeaderParams.put("Api-Key", localVarApiClient.parameterToString(apiKey));
}
if (timestamp != null) {
localVarHeaderParams.put("Timestamp", localVarApiClient.parameterToString(timestamp));
}
if (messageSignature != null) {
localVarHeaderParams.put("Message-Signature", localVarApiClient.parameterToString(messageSignature));
}
if (authorization != null) {
localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
}
if (region != null) {
localVarHeaderParams.put("Region", localVarApiClient.parameterToString(region));
}
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { };
return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call deletePaymentTokenValidateBeforeCall(String contentType, String clientRequestId, String apiKey, Long timestamp, String tokenId, String messageSignature, String authorization, String region, String storeId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'contentType' is set
if (contentType == null) {
throw new ApiException("Missing the required parameter 'contentType' when calling deletePaymentToken(Async)");
}
// verify the required parameter 'clientRequestId' is set
if (clientRequestId == null) {
throw new ApiException("Missing the required parameter 'clientRequestId' when calling deletePaymentToken(Async)");
}
// verify the required parameter 'apiKey' is set
if (apiKey == null) {
throw new ApiException("Missing the required parameter 'apiKey' when calling deletePaymentToken(Async)");
}
// verify the required parameter 'timestamp' is set
if (timestamp == null) {
throw new ApiException("Missing the required parameter 'timestamp' when calling deletePaymentToken(Async)");
}
// verify the required parameter 'tokenId' is set
if (tokenId == null) {
throw new ApiException("Missing the required parameter 'tokenId' when calling deletePaymentToken(Async)");
}
okhttp3.Call localVarCall = deletePaymentTokenCall(contentType, clientRequestId, apiKey, timestamp, tokenId, messageSignature, authorization, region, storeId, _callback);
return localVarCall;
}
/**
* Delete a payment token.
* Use this to delete a payment token.
* @param contentType Content type. (required)
* @param clientRequestId A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format. (required)
* @param apiKey Key given to merchant after boarding associating their requests with the appropriate app in Apigee. (required)
* @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins). (required)
* @param tokenId Identifies a payment token. (required)
* @param messageSignature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal. (optional)
* @param authorization The access token previously generated with the access-tokens call. Use the format 'Bearer {access-token}'. (optional)
* @param region Indicates the region where the client wants the transaction to be processed. This will override the default processing region identified for the client. Available options are argentina, brazil, germany, india and northamerica. Region specific store setup and APIGEE boarding is required in order to use an alternate region for processing. (optional)
* @param storeId (optional)
* @return PaymentTokenizationResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
Status Code
Description
Response Headers
200
Success response.
-
400
The request cannot be validated.
-
401
The request was unauthorized.
-
404
The requested resource doesn't exist.
-
500
An unexpected internal server error occurred.
-
*/
public PaymentTokenizationResponse deletePaymentToken(String contentType, String clientRequestId, String apiKey, Long timestamp, String tokenId, String messageSignature, String authorization, String region, String storeId) throws ApiException {
ApiResponse localVarResp = deletePaymentTokenWithHttpInfo(contentType, clientRequestId, apiKey, timestamp, tokenId, messageSignature, authorization, region, storeId);
return localVarResp.getData();
}
/**
* Delete a payment token.
* Use this to delete a payment token.
* @param contentType Content type. (required)
* @param clientRequestId A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format. (required)
* @param apiKey Key given to merchant after boarding associating their requests with the appropriate app in Apigee. (required)
* @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins). (required)
* @param tokenId Identifies a payment token. (required)
* @param messageSignature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal. (optional)
* @param authorization The access token previously generated with the access-tokens call. Use the format 'Bearer {access-token}'. (optional)
* @param region Indicates the region where the client wants the transaction to be processed. This will override the default processing region identified for the client. Available options are argentina, brazil, germany, india and northamerica. Region specific store setup and APIGEE boarding is required in order to use an alternate region for processing. (optional)
* @param storeId (optional)
* @return ApiResponse<PaymentTokenizationResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
Status Code
Description
Response Headers
200
Success response.
-
400
The request cannot be validated.
-
401
The request was unauthorized.
-
404
The requested resource doesn't exist.
-
500
An unexpected internal server error occurred.
-
*/
public ApiResponse deletePaymentTokenWithHttpInfo(String contentType, String clientRequestId, String apiKey, Long timestamp, String tokenId, String messageSignature, String authorization, String region, String storeId) throws ApiException {
okhttp3.Call localVarCall = deletePaymentTokenValidateBeforeCall(contentType, clientRequestId, apiKey, timestamp, tokenId, messageSignature, authorization, region, storeId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Delete a payment token. (asynchronously)
* Use this to delete a payment token.
* @param contentType Content type. (required)
* @param clientRequestId A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format. (required)
* @param apiKey Key given to merchant after boarding associating their requests with the appropriate app in Apigee. (required)
* @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins). (required)
* @param tokenId Identifies a payment token. (required)
* @param messageSignature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal. (optional)
* @param authorization The access token previously generated with the access-tokens call. Use the format 'Bearer {access-token}'. (optional)
* @param region Indicates the region where the client wants the transaction to be processed. This will override the default processing region identified for the client. Available options are argentina, brazil, germany, india and northamerica. Region specific store setup and APIGEE boarding is required in order to use an alternate region for processing. (optional)
* @param storeId (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
Status Code
Description
Response Headers
200
Success response.
-
400
The request cannot be validated.
-
401
The request was unauthorized.
-
404
The requested resource doesn't exist.
-
500
An unexpected internal server error occurred.
-
*/
public okhttp3.Call deletePaymentTokenAsync(String contentType, String clientRequestId, String apiKey, Long timestamp, String tokenId, String messageSignature, String authorization, String region, String storeId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deletePaymentTokenValidateBeforeCall(contentType, clientRequestId, apiKey, timestamp, tokenId, messageSignature, authorization, region, storeId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getPaymentTokenDetails
* @param contentType Content type. (required)
* @param clientRequestId A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format. (required)
* @param apiKey Key given to merchant after boarding associating their requests with the appropriate app in Apigee. (required)
* @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins). (required)
* @param tokenId Identifies a payment token. (required)
* @param messageSignature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal. (optional)
* @param authorization The access token previously generated with the access-tokens call. Use the format 'Bearer {access-token}'. (optional)
* @param region Indicates the region where the client wants the transaction to be processed. This will override the default processing region identified for the client. Available options are argentina, brazil, germany, india and northamerica. Region specific store setup and APIGEE boarding is required in order to use an alternate region for processing. (optional)
* @param storeId (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
Status Code
Description
Response Headers
200
Success response.
-
400
The request cannot be validated.
-
401
The request was unauthorized.
-
404
The requested resource doesn't exist.
-
500
An unexpected internal server error occurred.
-
*/
public okhttp3.Call getPaymentTokenDetailsCall(String contentType, String clientRequestId, String apiKey, Long timestamp, String tokenId, String messageSignature, String authorization, String region, String storeId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/payment-tokens/{token-id}"
.replaceAll("\\{" + "token-id" + "\\}", localVarApiClient.escapeString(tokenId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
if (storeId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("storeId", storeId));
}
Map localVarHeaderParams = new HashMap();
if (contentType != null) {
localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType));
}
if (clientRequestId != null) {
localVarHeaderParams.put("Client-Request-Id", localVarApiClient.parameterToString(clientRequestId));
}
if (apiKey != null) {
localVarHeaderParams.put("Api-Key", localVarApiClient.parameterToString(apiKey));
}
if (timestamp != null) {
localVarHeaderParams.put("Timestamp", localVarApiClient.parameterToString(timestamp));
}
if (messageSignature != null) {
localVarHeaderParams.put("Message-Signature", localVarApiClient.parameterToString(messageSignature));
}
if (authorization != null) {
localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
}
if (region != null) {
localVarHeaderParams.put("Region", localVarApiClient.parameterToString(region));
}
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getPaymentTokenDetailsValidateBeforeCall(String contentType, String clientRequestId, String apiKey, Long timestamp, String tokenId, String messageSignature, String authorization, String region, String storeId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'contentType' is set
if (contentType == null) {
throw new ApiException("Missing the required parameter 'contentType' when calling getPaymentTokenDetails(Async)");
}
// verify the required parameter 'clientRequestId' is set
if (clientRequestId == null) {
throw new ApiException("Missing the required parameter 'clientRequestId' when calling getPaymentTokenDetails(Async)");
}
// verify the required parameter 'apiKey' is set
if (apiKey == null) {
throw new ApiException("Missing the required parameter 'apiKey' when calling getPaymentTokenDetails(Async)");
}
// verify the required parameter 'timestamp' is set
if (timestamp == null) {
throw new ApiException("Missing the required parameter 'timestamp' when calling getPaymentTokenDetails(Async)");
}
// verify the required parameter 'tokenId' is set
if (tokenId == null) {
throw new ApiException("Missing the required parameter 'tokenId' when calling getPaymentTokenDetails(Async)");
}
okhttp3.Call localVarCall = getPaymentTokenDetailsCall(contentType, clientRequestId, apiKey, timestamp, tokenId, messageSignature, authorization, region, storeId, _callback);
return localVarCall;
}
/**
* Get payment card details associated with token.
* Get payment card details associated with token.
* @param contentType Content type. (required)
* @param clientRequestId A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format. (required)
* @param apiKey Key given to merchant after boarding associating their requests with the appropriate app in Apigee. (required)
* @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins). (required)
* @param tokenId Identifies a payment token. (required)
* @param messageSignature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal. (optional)
* @param authorization The access token previously generated with the access-tokens call. Use the format 'Bearer {access-token}'. (optional)
* @param region Indicates the region where the client wants the transaction to be processed. This will override the default processing region identified for the client. Available options are argentina, brazil, germany, india and northamerica. Region specific store setup and APIGEE boarding is required in order to use an alternate region for processing. (optional)
* @param storeId (optional)
* @return PaymentTokenizationResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
Status Code
Description
Response Headers
200
Success response.
-
400
The request cannot be validated.
-
401
The request was unauthorized.
-
404
The requested resource doesn't exist.
-
500
An unexpected internal server error occurred.
-
*/
public PaymentTokenizationResponse getPaymentTokenDetails(String contentType, String clientRequestId, String apiKey, Long timestamp, String tokenId, String messageSignature, String authorization, String region, String storeId) throws ApiException {
ApiResponse localVarResp = getPaymentTokenDetailsWithHttpInfo(contentType, clientRequestId, apiKey, timestamp, tokenId, messageSignature, authorization, region, storeId);
return localVarResp.getData();
}
/**
* Get payment card details associated with token.
* Get payment card details associated with token.
* @param contentType Content type. (required)
* @param clientRequestId A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format. (required)
* @param apiKey Key given to merchant after boarding associating their requests with the appropriate app in Apigee. (required)
* @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins). (required)
* @param tokenId Identifies a payment token. (required)
* @param messageSignature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal. (optional)
* @param authorization The access token previously generated with the access-tokens call. Use the format 'Bearer {access-token}'. (optional)
* @param region Indicates the region where the client wants the transaction to be processed. This will override the default processing region identified for the client. Available options are argentina, brazil, germany, india and northamerica. Region specific store setup and APIGEE boarding is required in order to use an alternate region for processing. (optional)
* @param storeId (optional)
* @return ApiResponse<PaymentTokenizationResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
Status Code
Description
Response Headers
200
Success response.
-
400
The request cannot be validated.
-
401
The request was unauthorized.
-
404
The requested resource doesn't exist.
-
500
An unexpected internal server error occurred.
-
*/
public ApiResponse getPaymentTokenDetailsWithHttpInfo(String contentType, String clientRequestId, String apiKey, Long timestamp, String tokenId, String messageSignature, String authorization, String region, String storeId) throws ApiException {
okhttp3.Call localVarCall = getPaymentTokenDetailsValidateBeforeCall(contentType, clientRequestId, apiKey, timestamp, tokenId, messageSignature, authorization, region, storeId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get payment card details associated with token. (asynchronously)
* Get payment card details associated with token.
* @param contentType Content type. (required)
* @param clientRequestId A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format. (required)
* @param apiKey Key given to merchant after boarding associating their requests with the appropriate app in Apigee. (required)
* @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins). (required)
* @param tokenId Identifies a payment token. (required)
* @param messageSignature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal. (optional)
* @param authorization The access token previously generated with the access-tokens call. Use the format 'Bearer {access-token}'. (optional)
* @param region Indicates the region where the client wants the transaction to be processed. This will override the default processing region identified for the client. Available options are argentina, brazil, germany, india and northamerica. Region specific store setup and APIGEE boarding is required in order to use an alternate region for processing. (optional)
* @param storeId (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
Status Code
Description
Response Headers
200
Success response.
-
400
The request cannot be validated.
-
401
The request was unauthorized.
-
404
The requested resource doesn't exist.
-
500
An unexpected internal server error occurred.
-
*/
public okhttp3.Call getPaymentTokenDetailsAsync(String contentType, String clientRequestId, String apiKey, Long timestamp, String tokenId, String messageSignature, String authorization, String region, String storeId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getPaymentTokenDetailsValidateBeforeCall(contentType, clientRequestId, apiKey, timestamp, tokenId, messageSignature, authorization, region, storeId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for updatePaymentToken
* @param contentType Content type. (required)
* @param clientRequestId A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format. (required)
* @param apiKey Key given to merchant after boarding associating their requests with the appropriate app in Apigee. (required)
* @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins). (required)
* @param paymentCardPaymentTokenUpdateRequest Accepted request type: PaymentCardPaymentTokenUpdateRequest. (required)
* @param messageSignature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal. (optional)
* @param authorization The access token previously generated with the access-tokens call. Use the format 'Bearer {access-token}'. (optional)
* @param region Indicates the region where the client wants the transaction to be processed. This will override the default processing region identified for the client. Available options are argentina, brazil, germany, india and northamerica. Region specific store setup and APIGEE boarding is required in order to use an alternate region for processing. (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
Status Code
Description
Response Headers
200
Success response.
-
400
The request cannot be validated.
-
401
The request was unauthorized.
-
404
The requested resource doesn't exist.
-
409
The attempted action is not valid according to gateway rules. For example, when the gateway is too busy then the transaction is not processed.
-
422
The processor declined the transaction.
-
500
An unexpected internal server error occurred.
-
*/
public okhttp3.Call updatePaymentTokenCall(String contentType, String clientRequestId, String apiKey, Long timestamp, PaymentCardPaymentTokenUpdateRequest paymentCardPaymentTokenUpdateRequest, String messageSignature, String authorization, String region, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = paymentCardPaymentTokenUpdateRequest;
// create path and map variables
String localVarPath = "/payment-tokens";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
if (contentType != null) {
localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType));
}
if (clientRequestId != null) {
localVarHeaderParams.put("Client-Request-Id", localVarApiClient.parameterToString(clientRequestId));
}
if (apiKey != null) {
localVarHeaderParams.put("Api-Key", localVarApiClient.parameterToString(apiKey));
}
if (timestamp != null) {
localVarHeaderParams.put("Timestamp", localVarApiClient.parameterToString(timestamp));
}
if (messageSignature != null) {
localVarHeaderParams.put("Message-Signature", localVarApiClient.parameterToString(messageSignature));
}
if (authorization != null) {
localVarHeaderParams.put("Authorization", localVarApiClient.parameterToString(authorization));
}
if (region != null) {
localVarHeaderParams.put("Region", localVarApiClient.parameterToString(region));
}
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { };
return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call updatePaymentTokenValidateBeforeCall(String contentType, String clientRequestId, String apiKey, Long timestamp, PaymentCardPaymentTokenUpdateRequest paymentCardPaymentTokenUpdateRequest, String messageSignature, String authorization, String region, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'contentType' is set
if (contentType == null) {
throw new ApiException("Missing the required parameter 'contentType' when calling updatePaymentToken(Async)");
}
// verify the required parameter 'clientRequestId' is set
if (clientRequestId == null) {
throw new ApiException("Missing the required parameter 'clientRequestId' when calling updatePaymentToken(Async)");
}
// verify the required parameter 'apiKey' is set
if (apiKey == null) {
throw new ApiException("Missing the required parameter 'apiKey' when calling updatePaymentToken(Async)");
}
// verify the required parameter 'timestamp' is set
if (timestamp == null) {
throw new ApiException("Missing the required parameter 'timestamp' when calling updatePaymentToken(Async)");
}
// verify the required parameter 'paymentCardPaymentTokenUpdateRequest' is set
if (paymentCardPaymentTokenUpdateRequest == null) {
throw new ApiException("Missing the required parameter 'paymentCardPaymentTokenUpdateRequest' when calling updatePaymentToken(Async)");
}
okhttp3.Call localVarCall = updatePaymentTokenCall(contentType, clientRequestId, apiKey, timestamp, paymentCardPaymentTokenUpdateRequest, messageSignature, authorization, region, _callback);
return localVarCall;
}
/**
* Update one or more payment tokens.
* Use this update one or more payment tokens.
* @param contentType Content type. (required)
* @param clientRequestId A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format. (required)
* @param apiKey Key given to merchant after boarding associating their requests with the appropriate app in Apigee. (required)
* @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins). (required)
* @param paymentCardPaymentTokenUpdateRequest Accepted request type: PaymentCardPaymentTokenUpdateRequest. (required)
* @param messageSignature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal. (optional)
* @param authorization The access token previously generated with the access-tokens call. Use the format 'Bearer {access-token}'. (optional)
* @param region Indicates the region where the client wants the transaction to be processed. This will override the default processing region identified for the client. Available options are argentina, brazil, germany, india and northamerica. Region specific store setup and APIGEE boarding is required in order to use an alternate region for processing. (optional)
* @return PaymentTokenUpdateResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
Status Code
Description
Response Headers
200
Success response.
-
400
The request cannot be validated.
-
401
The request was unauthorized.
-
404
The requested resource doesn't exist.
-
409
The attempted action is not valid according to gateway rules. For example, when the gateway is too busy then the transaction is not processed.
-
422
The processor declined the transaction.
-
500
An unexpected internal server error occurred.
-
*/
public PaymentTokenUpdateResponse updatePaymentToken(String contentType, String clientRequestId, String apiKey, Long timestamp, PaymentCardPaymentTokenUpdateRequest paymentCardPaymentTokenUpdateRequest, String messageSignature, String authorization, String region) throws ApiException {
ApiResponse localVarResp = updatePaymentTokenWithHttpInfo(contentType, clientRequestId, apiKey, timestamp, paymentCardPaymentTokenUpdateRequest, messageSignature, authorization, region);
return localVarResp.getData();
}
/**
* Update one or more payment tokens.
* Use this update one or more payment tokens.
* @param contentType Content type. (required)
* @param clientRequestId A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format. (required)
* @param apiKey Key given to merchant after boarding associating their requests with the appropriate app in Apigee. (required)
* @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins). (required)
* @param paymentCardPaymentTokenUpdateRequest Accepted request type: PaymentCardPaymentTokenUpdateRequest. (required)
* @param messageSignature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal. (optional)
* @param authorization The access token previously generated with the access-tokens call. Use the format 'Bearer {access-token}'. (optional)
* @param region Indicates the region where the client wants the transaction to be processed. This will override the default processing region identified for the client. Available options are argentina, brazil, germany, india and northamerica. Region specific store setup and APIGEE boarding is required in order to use an alternate region for processing. (optional)
* @return ApiResponse<PaymentTokenUpdateResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
Status Code
Description
Response Headers
200
Success response.
-
400
The request cannot be validated.
-
401
The request was unauthorized.
-
404
The requested resource doesn't exist.
-
409
The attempted action is not valid according to gateway rules. For example, when the gateway is too busy then the transaction is not processed.
-
422
The processor declined the transaction.
-
500
An unexpected internal server error occurred.
-
*/
public ApiResponse updatePaymentTokenWithHttpInfo(String contentType, String clientRequestId, String apiKey, Long timestamp, PaymentCardPaymentTokenUpdateRequest paymentCardPaymentTokenUpdateRequest, String messageSignature, String authorization, String region) throws ApiException {
okhttp3.Call localVarCall = updatePaymentTokenValidateBeforeCall(contentType, clientRequestId, apiKey, timestamp, paymentCardPaymentTokenUpdateRequest, messageSignature, authorization, region, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Update one or more payment tokens. (asynchronously)
* Use this update one or more payment tokens.
* @param contentType Content type. (required)
* @param clientRequestId A client-generated ID for request tracking and signature creation, unique per request. This is also used for idempotency control. We recommend 128-bit UUID format. (required)
* @param apiKey Key given to merchant after boarding associating their requests with the appropriate app in Apigee. (required)
* @param timestamp Epoch timestamp in milliseconds in the request from a client system. Used for Message Signature generation and time limit (5 mins). (required)
* @param paymentCardPaymentTokenUpdateRequest Accepted request type: PaymentCardPaymentTokenUpdateRequest. (required)
* @param messageSignature Used to ensure the request has not been tampered with during transmission. The Message-Signature is the Base64 encoded HMAC hash (SHA256 algorithm with the API Secret as the key.) For more information, refer to the supporting documentation on the Developer Portal. (optional)
* @param authorization The access token previously generated with the access-tokens call. Use the format 'Bearer {access-token}'. (optional)
* @param region Indicates the region where the client wants the transaction to be processed. This will override the default processing region identified for the client. Available options are argentina, brazil, germany, india and northamerica. Region specific store setup and APIGEE boarding is required in order to use an alternate region for processing. (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
Status Code
Description
Response Headers
200
Success response.
-
400
The request cannot be validated.
-
401
The request was unauthorized.
-
404
The requested resource doesn't exist.
-
409
The attempted action is not valid according to gateway rules. For example, when the gateway is too busy then the transaction is not processed.
-
422
The processor declined the transaction.
-
500
An unexpected internal server error occurred.
-
*/
public okhttp3.Call updatePaymentTokenAsync(String contentType, String clientRequestId, String apiKey, Long timestamp, PaymentCardPaymentTokenUpdateRequest paymentCardPaymentTokenUpdateRequest, String messageSignature, String authorization, String region, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = updatePaymentTokenValidateBeforeCall(contentType, clientRequestId, apiKey, timestamp, paymentCardPaymentTokenUpdateRequest, messageSignature, authorization, region, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
}