Multiple Websites Management

If you have multiple websites from where you initiate payments to our system, there are two possibilities for managing them.

First one, is to manage your websites via the API and this is described in next section!

Second one, is to manage your websites via Merchant Dashboard. You can define more sites with distinct API Keys from the Merchant Dashboard, Configuration tab, Add a New Site. This allows you to manage multiple websites under the same merchant account.

MerchantTransactionID must be unique for each website!

Create a Merchant Site

Definition: POST /v1/merchantsites

For each of your websites you can create a different Merchant Site, which will have its own API Key.

Please note that the requests for the Merchant Sites will use the API Key created at merchant account level.

Request:

POST https://paytest.smart2pay.com/v1/merchantsites
Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk=

{
  "MerchantSite": {
    "URL": "http://www.test.com",
    "Active": true,
    "NotificationURL": "http://www.test.com/notifications.node",
    "IPList": "82.208.151.136",
    "Alias": "Test website_1",
    "Details": {
      "Name": "Stichting Smart2Pay",
      "Country": "PL",
      "City": "Warsaw",
      "Email": "test@test.com", 
      "Address": "BRINK 27C",
      "BankName": "ING",
      "AccountIBAN": "PL641050008610000023537933350",
      "AccountSWIFT": "1000002353794650",
      "BankSWIFTID": "ABNDDEFFXXX",
      "BankCode": "BTRLRO22",
      "VATNumber": "34206701",
      "RegistrationNumber": "NL 813236460B01",
      "MCC": "5945",
      "MainBusiness": "Hobby, Toy, and Game Shops"
    }
  }
}

Response:

HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8

{
    "MerchantSite": {
      "MerchantID": 1045,
      "ID": 43078,
      "Created": "20180104161226",
      "URL": "http://www.test.com",
      "Active": true,
      "NotificationURL": "http://www.test.com/notifications.node",
      "ApiKey": "aaqosSwikwduK2l72PAGMa8kaLqHuB3hH39/ECcqaD5hW69aSX",
      "Alias": "Test website_1",
      "IPList": "82.208.151.136",
      "Details": {
        "Reasons": null,
        "Name": "Stichting Smart2Pay",
        "Country": "PL",
        "City": "Warsaw",
        "Email": "test@test.com",
        "Address": "BRINK 27C",
        "BankName": "ING",
        "AccountIBAN": "PL641050008610000023537933350",
        "AccountSWIFT": "1000002353794650",
        "BankSWIFTID": "ABNDDEFFXXX",
        "BankCode": "BTRLRO22",
        "VATNumber": "34206701",
        "RegistrationNumber": "NL 813236460B01",
        "MCC": "5945",
        "MainBusiness": "Hobby, Toy, and Game Shops"
        }
    }
}

Change a Merchant Site

Definition: PATCH /v1/merchantsites/{id}

Where:
  • {id} – GlobalPay Website ID

You can change the attributes of an already created Merchant Site by applying a PATCH, using the SiteId API Key.

Request:

PATCH https://paytest.smart2pay.com/v1/merchantsites/43078
Authorization: Basic NDMwNzg6YWFxb3NTd2lrd2R1SzJsNzJQQUdNYThrYUxxSHVCM2hIMzkvRUNjcWFENWhXNjlhU1g=

{
  "MerchantSite": {
    "URL": "http://www.testupdate.com",
    "Active": true,
    "NotificationURL": "http://www.test.com/notifications_update.node",
    "IPList": "82.208.151.136",
    "Alias": "Test website_1 update",
    "Details": {
      "Name": "Stichting Smart2Pay update",
      "Country": "PL",
      "City": "Warsaw update",
      "Email": "test@test.com", 
      "Address": "BRINK 27C update",
      "BankName": "ING",
      "AccountIBAN": "PL641050008610000023537933350",
      "AccountSWIFT": "1000002353794650",
      "BankSWIFTID": "ABNDDEFFXXX",
      "BankCode": "BTRLRO22",
      "VATNumber": "34206701",
      "RegistrationNumber": "NL 813236460B01",
      "MCC": 7995, 
      "MainBusiness": "gaming"
    }
  }
}

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
    "MerchantSite": {
      "MerchantID": 1045,
      "ID": 43078,
      "Created": "20180104161226",
      "URL": "http://www.testupdate.com",
      "Active": true,
      "NotificationURL": "http://www.test.com/notifications.node",
      "ApiKey": "aaqosSwikwduK2l72PAGMa8kaLqHuB3hH39/ECcqaD5hW69aSX",
      "Alias": "Test website_1 update",
      "IPList": "82.208.151.136",
      "Details": {
        "Reasons": null,
        "Name": "Stichting Smart2Pay",
        "Country": "PL",
        "City": "Warsaw",
        "Email": "test@test.com",
        "Address": "BRINK 27C",
        "BankName": "ING",
        "AccountIBAN": "PL641050008610000023537933350",
        "AccountSWIFT": "1000002353794650",
        "BankSWIFTID": "ABNDDEFFXXX",
        "BankCode": "BTRLRO22",
        "VATNumber": "34206701",
        "RegistrationNumber": "NL 813236460B01",
        "MCC": "7995",
        "MainBusiness": "gaming"
        }
    }
}

Regenerate credentials for a Merchant Site

You can regenerate the credentials for a Merchant Site by performing an action based on POST HTTP request. Using some filters in the query string, this method regenerates the ApiKey for the specified site.

Definition: POST /v1/merchantsites/{id}/regenerateapikey

Where:
  • {id} – GlobalPay Website ID

Request:

POST https://paytest.smart2pay.com/v1/merchantsites/43078/regenerateapikey
Authorization: Basic NDMwNzg6YWFxb3NTd2lrd2R1SzJsNzJQQUdNYThrYUxxSHVCM2hIMzkvRUNjcWFENWhXNjlhU1g=

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "MerchantSite": {
    "MerchantID": 1045,
    "ID": 43078,
    "Created": "20180104161226",
    "URL": "http://www.testupdate.com",
    "Active": true,
    "NotificationURL": "http://www.test.com/notifications_update.node",
    "ApiKey": "R6ojPXCRcNvAptm0GuQ5mav+g4pm3yhQ7Akpb3D5d+fTAVcTf0",
    "Alias": "Test website_1 update",
    "IPList": "82.208.151.136",
    "Details": {
      "Reasons": null,
      "Name": "Stichting Smart2Pay update",
      "Country": "PL",
      "City": "Warsaw update",
      "Email": "test@test.com",
      "Address": "BRINK 27C update",
      "BankName": "ING",
      "AccountIBAN": "PL641050008610000023537933350",
      "AccountSWIFT": "1000002353794650",
      "BankSWIFTID": "ABNDDEFFXXX",
      "BankCode": "BTRLRO22",
      "VATNumber": "34206701",
      "RegistrationNumber": "NL 813236460B01",
      "MCC": "7995",
      "MainBusiness": "gaming"
    }
  }
}

Get information on an existing Merchant Site

You can get information on the existing sites by performing an action based on GET HTTP request, using some filters in the query string.

The method below returns more information about the specified merchant site, using the SiteID API Key in the request.

Definition:GET /v1/merchantsites/{id}

Where:
  • {id} – Merchant Site ID

Request:

GET https://paytest.smart2pay.com/v1/merchantsites/43078
Authorization: Basic NDMwNzg6UjZvalBYQ1JjTnZBcHRtMEd1UTVtYXYrZzRwbTN5aFE3QWtwYjNENWQrZlRBVmNUZjA

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8


{
  "MerchantSite": {
    "MerchantID": 1045,
    "ID": 43078,
    "Created": "20180104161226",
    "URL": "http://www.testupdate.com",
    "Active": true,
    "NotificationURL": "http://www.test.com/notifications_update.node",
    "ApiKey": "R6ojPXCRcNvAptm0GuQ5mav+g4pm3yhQ7Akpb3D5d+fTAVcTf0",
    "Alias": "Test website_1 update",
    "IPList": "82.208.151.136",
    "Details": {
      "Reasons": null,
      "Name": "Stichting Smart2Pay update",
      "Country": "NL",
      "City": "Warsaw update",
      "Email": "test@test.com",
      "Address": "BRINK 27C update",
      "BankName": "ING",
      "AccountIBAN": "PL641050008610000023537933350",
      "AccountSWIFT": "1000002353794650",
      "BankSWIFTID": "ABNDDEFFXXX",
      "BankCode": "BTRLRO22",
      "VATNumber": "34206701",
      "RegistrationNumber": "NL 813236460B01",
      "MCC": "7995",
      "MainBusiness": "gaming"
    }
  }
}

Delete a Merchant Site

Definition: DELETE /v1/merchantsites/{id}

Where:
  • {id} – GlobalPay Website ID

You can delete a Merchant Site by sending a DELETE action for an existing Merchant Site for which there are not registered yet any payments.

Request:

DELETE https://paytest.smart2pay.com/v1/merchantsites/43078
Authorization: Basic 
NDMwNzg6UjZvalBYQ1JjTnZBcHRtMEd1UTVtYXYrZzRwbTN5aFE3QWtwYjNENWQrZlRBVmNUZjA

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "MerchantSite": {
    "MerchantID": 1045,
    "ID": 43078,
    "Created": "20180104161226",
    "URL": "http://www.testupdate.com",
    "Active": true,
    "NotificationURL": "http://www.test.com/notifications_update.node",
    "ApiKey": "R6ojPXCRcNvAptm0GuQ5mav+g4pm3yhQ7Akpb3D5d+fTAVcTf0",
    "Alias": "Test website_1 update",
    "IPList": "82.208.151.136",
    "Details": {
      "Reasons": null,
      "Name": "Stichting Smart2Pay update",
      "Country": "PL",
      "City": "Warsaw update",
      "Email": "test@test.com",
      "Address": "BRINK 27C update",
      "BankName": "ING",
      "AccountIBAN": "PL641050008610000023537933350",
      "AccountSWIFT": "1000002353794650",
      "BankSWIFTID": "ABNDDEFFXXX",
      "BankCode": "BTRLRO22",
      "VATNumber": "34206701",
      "RegistrationNumber": "NL 813236460B01",
      "MCC": "7995",
      "MainBusiness": "gaming"
    }
  }
}