Overview
Oceanpayment provides merchants with a secure and reliable report transfer service. It supports multiple data formats and transfer protocols, ensuring business data is delivered accurately and on time.
SFTP Connection Information
Before You Connect
Accessing reports via SFTP requires registering your server IP addresses on our whitelist. Please contact Oceanpayment Technical Support to add your IPs.
- Production
- Sandbox
Host: sftp.oceanpayment.com
Port: 226
Protocol: SFTP (SSH)
Authentication method: Password authentication
Host: test-sftp.oceanpayment.com
Port: 22
Protocol: SFTP (SSH)
Authentication method: Password authentication
Connection Example
Please connect using password authentication.
- bash
- PHP
- Java
- Python
sftp -P 226 username@sftp.oceanpayment.com
$host = 'sftp.oceanpayment.com';
$port = 226;
$username = 'your_username';
$password = 'your_password';
// Initialize SSH connection
$connection = ssh2_connect($host, $port);
if (!$connection) {
die("Unable to connect to the SFTP server");
}
// Authenticate using username and password
if (!ssh2_auth_password($connection, $username, $password)) {
die("Authentication failed");
}
// SSH/SFTP connection
$sftp = ssh2_sftp($connection);
if (!$sftp) {
die("SFTP Initialization failed");
}
echo "SFTP initialized successfully!";
import com.jcraft.jsch.*;
public class SFTPClient {
public void downloadReport() throws JSchException, SftpException {
JSch jsch = new JSch();
Session session = jsch.getSession("username", "sftp.oceanpayment.com", 226);
session.setPassword("password");
session.setConfig("StrictHostKeyChecking", "no");
session.connect();
ChannelSftp channel = (ChannelSftp) session.openChannel("sftp");
channel.connect();
channel.cd("/reports");
//List files
Vector<ChannelSftp.LsEntry> files = channel.ls("*.csv");
for (ChannelSftp.LsEntry file : files) {
System.out.println("files: " + file.getFilename());
}
channel.disconnect();
session.disconnect();
}
}
import pysftp
cnopts = pysftp.CnOpts()
cnopts.hostkeys = None
with pysftp.Connection(
host='sftp.oceanpayment.com',
username='your_username',
password='your_password',
port=226,
cnopts=cnopts
) as sftp:
sftp.cwd('/reports')
files = sftp.listdir()
print("Available report files:", files)