Developer Portal

Authentication

Authentication with Heartland is simple: you will pass either your Secret API Key (found on your Account Settings screen) or your site, license, device, username and password to the SDK via your configuration.

Create an authentication object

using GlobalPayments.Api.Services;

/* Card Not Present */
ServicesContainer.ConfigureService(new GatewayConfig
{
    SecretApiKey = "skapi_cert_MTyMAQBiHVEAewvIzXVFcmUd2UcyBge_eCpaASUp0A",
    DeveloperId = "000000",
    VersionNumber = "0000",
    ServiceUrl = "https://cert.api2.heartlandportico.com"
});

/* Card Present */
ServicesContainer.ConfigureService(new GatewayConfig
{
    DeviceId = 1234567,
    LicenseId = 12345,
    Password = "$Password",
    SiteId = 12345,
    Username = "UserName",
    DeveloperId = "000000",
    VersionNumber = "0000",
    ServiceUrl = "https://cert.api2.heartlandportico.com"
});
<?php
use GlobalPayments\Api\ServicesConfig;
use GlobalPayments\Api\ServicesContainer;

// Card Not Present
$config = new ServicesConfig();
$config->secretApiKey = "skapi_cert_MTyMAQBiHVEAewvIzXVFcmUd2UcyBge_eCpaASUp0A";
$config->developerId = "000000";
$config->versionNumber = "0000";
$config->serviceUrl = "https://cert.api2.heartlandportico.com";
ServicesContainer::configure($config);

// Card Present
$config = new ServicesConfig();
$config->siteId = "12345";
$config->licenseId = "12345";
$config->deviceId = "1234567";
$config->username = "UserName";
$config->password = "$Password";
$config->developerId = "000000";
$config->versionNumber = "0000";
$config->serviceUrl = "https://cert.api2.heartlandportico.com";
ServicesContainer::configure($config);
import com.global.api.ServicesContainer;
import com.global.api.serviceConfigs.GatewayConfig;

/* Card Not Present */
GatewayConfig config = new GatewayConfig();
config.setSecretApiKey("skapi_cert_MTyMAQBiHVEAewvIzXVFcmUd2UcyBge_eCpaASUp0A");
config.setDeveloperId("000000");
config.setVersionNumber("0000");
config.setServiceUrl("https://cert.api2.heartlandportico.com");
ServicesContainer.configureService(config);

/* Card Present */
GatewayConfig config = new GatewayConfig();
config.setDeviceId(1234567);
config.setLicenseId(12345);
config.setPassword("$Password");
config.setSiteId(12345);
config.setUserName("UserName");
config.setDeveloperId("000000");
config.setVersionNumber("0000");
config.setServiceUrl("https://cert.api2.heartlandportico.com");
ServicesContainer.configureService(config);
# coming soon
from globalpayments.api import ServicesConfig, ServicesContainer

# Card Not Present
config = ServicesConfig()
config.secret_api_key = '%%SECRET_API_KEY%%'
config.developer_id = '000000'
config.version_number = '0000'
config.service_url = 'https://cert.api2.heartlandportico.com'
ServicesContainer.configure(config)

# Card Present
config = ServicesConfig()
config.site_id = '12345'
config.license_id = '12345'
config.device_id = '1234567'
config.username = 'UserName'
config.password = '$Password'
config.developer_id = '000000'
config.version_number = '0000'
config.service_url = 'https://cert.api2.heartlandportico.com'
ServicesContainer.configure(config)
import { ServicesConfig, ServicesContainer } from "globalpayments-api";

// Card Not Present
const config = new ServicesConfig();
config.secretApiKey = "skapi_cert_MTyMAQBiHVEAewvIzXVFcmUd2UcyBge_eCpaASUp0A";
config.developerId = "000000";
config.versionNumber = "0000";
config.serviceUrl = "https://cert.api2.heartlandportico.com";
ServicesContainer.configure(config);

// Card Present
const config = new ServicesConfig();
config.siteId = "12345";
config.licenseId = "12345";
config.deviceId = "1234567";
config.username = "UserName";
config.password = "$Password";
config.developerId = "000000";
config.versionNumber = "0000";
config.serviceUrl = "https://cert.api2.heartlandportico.com";
ServicesContainer.configure(config);