public class BatchUploadwithMTLSApi extends Object
Supports multiple authentication mechanisms: JKS keystore/truststore, PKCS#12 client certificates, and direct private key/certificate objects. Handles PGP encryption of files before upload.
| Constructor and Description |
|---|
BatchUploadwithMTLSApi() |
| Modifier and Type | Method and Description |
|---|---|
ApiResponse<String> |
uploadBatchAPI(File inputFile,
String environmentHostname,
org.bouncycastle.openpgp.PGPPublicKey pgpPublicKey,
PrivateKey clientPrivateKey,
X509Certificate clientCert,
Collection<X509Certificate> serverTrustCerts)
Uploads a batch file using mutual TLS authentication with client private key and certificates as objects.
|
ApiResponse<String> |
uploadBatchAPI(File inputFile,
String environmentHostname,
String pgpEncryptionCertPath,
String clientCertP12FilePath,
char[] clientCertP12Password,
String serverTrustCertPath)
Uploads a batch file using mutual TLS authentication with a PKCS#12 (.p12/.pfx) client certificate file.
|
ApiResponse<String> |
uploadBatchAPI(File inputFile,
String environmentHostname,
String pgpEncryptionCertPath,
String keystorePath,
char[] keystorePassword,
String truststorePath,
char[] truststorePassword)
Uploads a batch file using mutual TLS authentication with JKS keystore and truststore.
|
public ApiResponse<String> uploadBatchAPI(File inputFile, String environmentHostname, String pgpEncryptionCertPath, String keystorePath, char[] keystorePassword, String truststorePath, char[] truststorePassword) throws ApiException, Exception
inputFile - The file to be uploaded.environmentHostname - The environment hostname (e.g., secure-batch-test.cybersource.com).pgpEncryptionCertPath - Path to the PGP encryption certificate.keystorePath - Path to the JKS keystore file containing client certificates.keystorePassword - Password for the keystore.truststorePath - Path to the JKS truststore file containing trusted server certificates. Optional: Can be null if not required.truststorePassword - Password for the truststore.ApiException - If an API error occurs.Exception - If a general error occurs.public ApiResponse<String> uploadBatchAPI(File inputFile, String environmentHostname, String pgpEncryptionCertPath, String clientCertP12FilePath, char[] clientCertP12Password, String serverTrustCertPath) throws ApiException, Exception
inputFile - The file to be uploaded.environmentHostname - The environment hostname (e.g., api.cybersource.com).pgpEncryptionCertPath - Path to the PGP encryption certificate.clientCertP12FilePath - Path to the PKCS#12 client certificate file (.p12 or .pfx).clientCertP12Password - Password for the PKCS#12 client certificate.serverTrustCertPath - Path to the server trust certificate(s) in PEM format. Optional: Can be null if not required.ApiException - If an API error occurs.Exception - If a general error occurs.public ApiResponse<String> uploadBatchAPI(File inputFile, String environmentHostname, org.bouncycastle.openpgp.PGPPublicKey pgpPublicKey, PrivateKey clientPrivateKey, X509Certificate clientCert, Collection<X509Certificate> serverTrustCerts) throws ApiException, Exception
inputFile - The file to be uploaded.environmentHostname - The environment hostname (e.g., api.cybersource.com).pgpPublicKey - The PGP public key for encryption.clientPrivateKey - The client's private key.clientCert - The client's X509 certificate.serverTrustCerts - A collection of server's trusted X509 certificates (can be a certificate chain). Optional: Can be null or empty if not required.ApiException - If an API error occurs.Exception - If a general error occurs.Copyright © 2026. All rights reserved.