Website API

The Segpay Website API streamlines the process of adding new websites to your merchant account. It eliminates having to add websites manually using the Segpay Merchant Portal and enables efficient bulk website creation.

Base URL

https://srs.segpay.com/MerchantServices/merchant-urls

What You Can Do

  • Add new websites / top-level domains (e.g., mywebsite.com)

  • Test integrations safely with Test Mode

  • Support both JSON and XML formats

Use Case

Automate the addition of multiple websites at once, eliminating the need to manually enter them one by one in the Segpay Merchant Portal.

Prerequisites

Before using the Website API, ensure you meet the following requirements:

Account Requirements

Requirement Description
Segpay Merchant Account Active merchant account.
API Credentials (SRS) SRS User ID and User Access Key for authentication.
IP Whitelisting Your server IP must be whitelisted with Segpay.

Website Requirements

Requirement Description
Domain Ownership You must own or have authorization for all submitted domains.
Compliance Ready Websites must meet Segpay's compliance standards. Refer to our Website Compliance Requirements guide for more information.
Valid URLs All URLs must be legitimate. Do not submit fake or non-functioning URLs that don't resolve.

All URLs must be legitimate. Do not submit fake or non-functioning URLs that don't resolve. Invalid submissions may result in account restrictions.

Getting Set Up

1. Obtain API Credentials

If you don't have API credentials yet, contact techsupport@segpay.com to request SRS User ID and User Access Key.

2. Whitelist Your IP Address

Contact techsupport@segpay.com to whitelist your server's IP address,

3. Understand the Approval Process

  • All submitted websites enter a Pending status for compliance review

  • Review typically takes 2-3 business days

  • You'll be notified when websites are approved or if additional information is needed

What Happens Next?

After meeting these prerequisites, you can:

  1. Test your integration safely using Test Mode

  2. Add websites to the system for compliance review

  3. Monitor approval status through the Merchant Portal

Quick Start Guide

Add your first website in under 5 minutes.

Step 1: Gather Your Credentials

You’ll need your SRS User ID and User Access Key (contact techsupport@segpay.com).

Step 2: Make Your First Request

Below is a minimal example in “test mode” using JSON. Replace the sample values with your own credentials and website information.

cURL Example (Test Mode)

bashcurl -X POST "https://srs.segpay.com/MerchantServices/merchant-urls?test=true" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Basic <YOUR_BASE64_CREDENTIALS>" \
  -d '{
    "Url": "mywebsite.com",
    "UserName": "administrator",
    "Password": "password123",
    "AccessNotes": "This is the direct link to the member's area",
    "SupportEmail": "support@mywebsite.com",
    "TechEmail": "techsupport@mywebsite.com",
    "FaqLink": "mywebsite.com/faq.htm",
    "HelpLink": "mywebsite.com/help.htm"
  }'

Expected Response

json{
  "Succeeded": true,
  "Message": "MerchantUrl has NOT been created because of TEST mode."
}

Step 3: Go Live

To actually add the website the system, remove ?test=true from the endpoint URL.

All successfully submitted URLs are set to a "Pending" status for review by the Segpay Compliance team.

Authentication

The Website API uses HTTP Basic Authentication.

Creating Your Authorization Header

  1. Concatenate your credentials: username:password

  2. Base64 encode the combined username:password string

  3. Add to header: Authorization: Basic <encoded_string>

  • Username = myuser

  • Password = mypassword

  • String to Encode = myuser:mypassword

  • Base64 Result = bXl1c2VyOm15cGFzc3dvcmQ=

  • Header = Authorization: Basic bXl1c2VyOm15cGFzc3dvcmQ=

Obtaining Credentials

Contact techsupport@segpay.com to set up username and password for basic authentication if you don't already have them.

API Reference

Adding a Website

This section describes how to make an HTTP POST request to the Website API endpoint for adding a new website to the Segpay system.

Endpoint

POST https://srs.segpay.com/MerchantServices/merchant-urls

Request Headers

Header Value Description
Content-Type application/json or application/xml Request format
Accept application/json or application/xml Response format
Authorization Basic <Base64-encoded-credentials> Authentication

All headers shown are required.

Request Parameters

Parameter Type Required Description Example
URL String Yes Full website URL (max 150 chars). Protocol (http:// or https://) is accepted but removed automatically

mywebsite.com

http://mywebsite.com/

https://mywebsite.com/

UserName String Yes Login username (6 - 100 characters) administrator
Password String Yes Password for website access (6 - 100 characters) password123
AccessNotes String No Additional info for compliance review (max 1000 characters) This is the direct link to the member's area.
SupportEmail String Yes Support email address for the website support@mywebsite.com
TechEmail String No Technical Support email address for the website techsupport@mywebsite.com
FaqLink String No A valid URL for the website's FAQ page https://mywebsite.com/faq.htm
HelpLink String No A valid URL for the website's HELP page https://mywebsite.com/help.htm
BaseApproveID Number No See Using BaseApproveId. Only use for new URLs that are subdirectories of an already approved main website. Requires approval from Compliance to use.

https://mywebsite.com/subdirectory.htm/

Example Requests

JSON Example

{
  "Url": "https://mywebsite.com/",
  "UserName": "administrator",
  "Password": "password123",
  "AccessNotes": "This is the direct link to the member's area",
  "SupportEmail": "support@mywebsite.com",
  "TechEmail": "techsupport@mywebsite.com",
  "FaqLink": "https://mywebsite.com/faq.htm",
  "HelpLink": "https://mywebsite.com/help.htm"
}

XML Example

<Parameters>
  <Url>https://mywebsite.com/</Url>
  <UserName>administrator</UserName>
  <Password>password123</Password>
  <AccessNotes>This is the direct link to the member's area</AccessNotes>
  <SupportEmail>support@mywebsite.com</SupportEmail>
  <TechEmail>techsupport@mywebsite.com</TechEmail>
  <FaqLink>https://mywebsite.com/faq.htm</FaqLink>
  <HelpLink>https://mywebsite.com/help.hm</HelpLink>
</Parameters>

cURL Example (Test Mode)

bashcurl -X POST "https://srs.segpay.com/MerchantServices/merchant-urls?test=true" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Basic <YOUR_BASE64_CREDENTIALS>" \
  -d '{
    "Url": "mywebsite.com",
    "UserName": "administrator",
    "Password": "password123",
    "AccessNotes": "This is the direct link to the member's area",
    "SupportEmail": "support@mywebsite.com",
    "TechEmail": "techsupport@mywebsite.com",
    "FaqLink": "mywebsite.com/faq.htm",
    "HelpLink": "mywebsite.com/help.htm"
  }'

Response Format

Field Type Description
IsSuccess Boolean Indicates the request was processed successfully.
MerchantUrlId Number Unique identifier for the submitted URL (returned on success)
Message String Descriptive message about the operation result

Success Response (JSON)

{
  "IsSuccess": true,
  "MerchantUrlId": 12345,
  "Message": "MerchantUrl has been created successfully."
}

Success Response (XML)

<Result>
  <IsSuccess>true</IsSuccess>
  <MerchantUrlId>12345</MerchantUrlId>
  <Message>MerchantUrl has been created successfully</Message>
</Result>

Error Response (JSON)

{
  "Succeeded": false,
  "Message": "IP address XXX.XXX.XXX.XXX is not allowed for this merchant."
}

Error Response (XML)

<Result>
  <Succeeded>false</Succeeded>
  <Message>IP address XXX.XXX.XXX.XXX is not allowed for this merchant.</Message>
</Result>

Using BaseApproveId

BaseApproveId is a special parameter used exclusively for adding new subdirectories under an already approved main website.

  • Automatic Approval: If the main website is already approved and your account is configured for auto-approval, subdirectories added this way are automatically set to an Open status (no compliance review required).

  • Best for: Merchants who want to quickly add subdirectories to an already approved main website and want to bypass compliance review.

  • Limitation: Not designed for subdomains.

The BaseApproveId parameter is only available to merchants who meet specific requirements and requires approval from the Compliance team. Contact techsupport@segpay.com to request using it.

For adding subsites (subdomains and subdirectories), please use our dedicated Subsites API, which supports automated bulk subsite creation.

Step 1: Get Compliance Approval

Contact techsupport@segpay.com to request approval and determine eligibility to use the BaseApproveId parameter.

Step 2: Obtain the ID for Approved Main Website

To locate the ID of an approved website (required for the BaseApproveID parameter), complete the following steps:

  1. Log into the Merchant Portal: https://mp.segpay.com/

  2. Navigate to My Websites > Manage Websites

  3. Locate your approved website in the list and look for the ID in the URL ID column.

Step 3: Make Your Request

Below is a minimal example. Replace the sample values with your own credentials and website information.

cURL Example

bashcurl -X POST "https://srs.segpay.com/MerchantServices/merchant-urls" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Basic <YOUR_BASE64_CREDENTIALS>" \
  -d '{
    "BaseApproveId": 12345,
    "Url": "mywebsite.com/page1.htm",
    "UserName": "administrator",
    "Password": "password123",
    "AccessNotes": "This is the direct link to the member's area",
    "SupportEmail": "support@mywebsite.com",
    "TechEmail": "techsupport@mywebsite.com",
    "FaqLink": "mywebsite.com/faq.htm",
    "HelpLink": "mywebsite.com/help.htm"
  }'

Step 4: View the Response

Look at the response and ensure the submission was successful.

Example Response

 {  
 "IsSuccess": true,  
 "MerchantUrlId": 12345,  
 "Message": "MerchantUrl has been created successfully."  
  }

Test Mode

Use Test Mode to validate your integration without adding actual website URLs to the system.

Enabling Test Mode

Add ?test=true to the endpoint URL:

Test Mode

https://srs.segpay.com/MerchantServices/merchant-urls?test=true

Test Mode Behavior

  • No websites created: Safe for testing

  • Validation checks performed: Catch integration issues early

  • IP restrictions relaxed: Test from any IP address

Test Mode Response

{
  "Succeeded": true,
  "Message": "MerchantUrl has NOT been created because of TEST mode."
}

Error Handling & Troubleshooting

HTTP Status Codes

Status Code Meaning Action Required
200 OK Success Request processed successfully
400 Bad Request Invalid Request Check required parameters and formats
401 Unauthorized Authentication Failed Check credentials and Basic Auth header
403 Forbidden Access Denied Verify IP whitelisting and account permissions
500 Internal Server Error Server error Retry request. If the error persists, contact techsupport@segpay.com

Response Schema

Success Response

Field Type Description Example
IsSuccess Boolean Indicates successful processing true
MerchantUrlId Number Unique identifier for the submitted URL 12345
Message String Confirmation Message "MerchantUrl has been created successfully."

Error Response

Field Type Description Example
Succeeded Boolean Always false for errors false
Message String Descriptive error message "IP address xxx.xxx.xxx.xxx is not allowed for the merchant."

Test Mode Response

Field Type Description Example
Succeeded Boolean Always true in test mode true
Message String Test mode confirmation "MerchantUrl has NOT been created because of TEST mode."

 

Common Error Messages & Solutions

Error Message Cause Solution
"IP address XXX.XXX.XXX.XXX is not allowed for this merchant." IP not whitelisted Contact techsupport@segpay.com to whitelist your IP.
"{Missing Parameter} is required." Required parameter(s) missing Ensure all required parameters are included in the request.
"Merchant [ID] does not have approval to add approved merchant Urls. Please contact compliance@segpay.com" Merchant account not granted permission for using subdirectory feature Contact compliance@segpay.com for assistance.
"MerchantUrl [ID] is not approved yet. The MAIN URL for which you are trying to add a subdomain URL is not active Contact techsupport@segpay.com for the status of the approval
"MerchantUrl \\"{URL}\\" already exists." Duplicate URL Use a different URL.

Validation Rules

URL Format Requirements:

  • Main Website: mywebsite.com

  • Protocol: Automatically stripped (don't include http:// or https://)

  • Maximum length: 150 characters

Authentication Requirements:

  • Username: Minimum 6 characters, maximum 100

  • Password: Minimum 6 characters, maximum 100

  • AccessNotes: Maximum 1000 characters (optional)

Support & Resources

Getting Help

Type Contact Response Time
Technical Support techsupport@segpay.com 24-48 hours
Compliance Questions compliance@segpay.com 2-3 business days

Additional Resources

  • Merchant Portal: Access your Account Dashboard.

  • Subsites API: Add new subsites (subdomains or subdirectories) to your approved main website

  • Manage Websites: Web-based management for adding and administering websites

  • Manage Subsites: Web-based management for adding and administering subsites