Get merchant

This endpoint retrieves the details of a specific merchant, identified by their unique Merchant ID (mid). It provides metadata, contact information, banking details, and associated sites for the merchant.


Request

Endpoint

EnvironmentHTTP MethodEndpoint
Sandbox testingGEThttps://api-sandbox.flex-charge.com/v1/merchants/{mid}
Production environmentGEThttps://api.flex-charge.com/v1/merchants/{mid}

Required Keys

ParameterDescription
{mid}The unique identifier of the merchant.
bearer tokenThe authentication token returned by /oauth2/token.

Body Parameters

This endpoint does not require body parameters.


Response

Field Definitions

Field NameTypeDescription
accountIdStringUnique identifier for the account.
midStringMerchant ID.
companyNameStringName of the company.
legalEntityNameStringLegal name of the entity.
dbaStringDoing Business As (DBA) name of the company.
typeStringType of the business entity, e.g., Sole Proprietorship.
websiteStringCompany's website URL.
descriptionStringDescription of the company.
specialTermsStringSpecial terms related to the merchant account.
mccStringMerchant Category Code.
industryStringIndustry type, e.g., 'Publishing'.
statusIntegerNumerical status of the account (1 for active, 0 for inactive).
statusNameStringName of the status, e.g., 'ACTIVE'.
customerSupportInformationObjectContains customer support details like name, email, phone, and support link.
createdOnDateTimeTimestamp of when the merchant was onboarded (ISO 8601 format).
primaryContactObjectContains merchant's primary contact's first name, last name, email, and phone.
developerContactObjectContains developer contact information.
bankAccountInformationObjectContains banking details like account type, masked account and routing numbers.
sitesArray of ObjectsContains information about sites associated with the merchant.
timezoneIntegerTimezone of the merchant, represented as an offset from UTC in minutes.
languageStringLanguage preference of the merchant.
timezoneNameStringName of the timezone, e.g., "Pacific/Pitcairn".

Sites

Field NameTypeDescription
idStringUnique identifier for the site.
nameStringName of the site.
descriptorStringDescriptor of the site.
descriptorCityStringCity associated with the site descriptor.
customerSupportNameStringName of the site-specific customer support contact.
customerSupportEmailStringEmail address for site-specific customer support.
customerSupportPhoneStringPhone number for site-specific customer support.
customerSupportLinkStringURL to site-specific customer support webpage.
whitelistedUrlsArray of StringsList of whitelisted URLs for the site.
tagsArray of StringsTags associated with the site for categorization or identification.

❗️

Notes

  • Use the mid parameter to specify the merchant you want to retrieve.
  • Ensure secure storage and handling of sensitive data retrieved using this endpoint.

Payload Examples

Request

cURL Request Example

curl --request GET \
     --url https://api-sandbox.flex-charge.com/v1/merchants/{mid} \
     --header 'Authorization: bearer {the token returned by /oauth2}' \
     --header 'accept: application/json'

Response

JSON Example for a Successful Retrieval

{
  "accountId": "12345678-90ab-cdef-1234-567890abcdef",
  "mid": "abcdef12-3456-7890-abcd-ef1234567890",
  "companyName": "Example Corporation",
  "legalEntityName": "Example Corporation Legal",
  "dba": "Example Corp",
  "type": "Limited Liability Company",
  "website": "https://example-website.com/",
  "description": "A sample description of Example Corporation.",
  "specialTerms": "Special terms and conditions apply.",
  "mcc": "1234",
  "industry": "Software and IT Services",
  "status": 1,
  "statusName": "ACTIVE",
  "customerSupportInformation": {
    "customerSupportName": "Example Support",
    "customerSupportEmail": "[email protected]",
    "customerSupportPhone": "+12345678901",
    "customerSupportLink": "https://support.example.com"
  },
  "createdOn": "2023-01-01T00:00:00.000000Z",
  "primaryContact": {
    "firstName": "John",
    "lastName": "Doe",
    "email": "[email protected]",
    "phone": "0123456789"
  },
  "developerContact": {
    "developerFirstName": "Jane",
    "developerLastName": "Smith",
    "developerEmail": "[email protected]",
    "developerPhone": "0987654321"
  },
  "bankAccountInformation": {
    "ddaType": "Savings",
    "maskedAccountNumber": "xxxxx1234",
    "maskedRoutingNumber": "xxxxx4321",
    "bankAccountVerified": true,
    "bankName": "Example Bank"
  },
  "sites": [
    {
      "id": "ab12cd34-ef56-gh78-ij90-kl12mn34op56",
      "name": "Example Site",
      "descriptor": "ExampleDescriptor",
      "descriptorCity": "Example City",
      "customerSupportName": "Alice",
      "customerSupportEmail": "[email protected]",
      "customerSupportPhone": "+10987654321",
      "customerSupportLink": "https://support.examplesite.com",
      "whitelistedUrls": ["https://www.examplesite.com"],
      "tags": ["Example", "Sample", "Demo"]
    }
  ],
  "timezone": -60,
  "language": "en",
  "timezoneName": "Atlantic/Azores"
}

JSON Example for a Failed Retrieval

{
  "status": "FAILED",
  "success": false,
  "errors": [
    "Merchant not found.",
    "Invalid Merchant ID."
  ]
}

Example for Handling Errors

  • If the mid is invalid, the API will return a 404 Not Found error.
  • If the bearer token is unauthorized, the API will return a 401 Unauthorized error.
HTTP/1.1 404 Not Found
Content-Type: application/json

{
  "errors": [
    "Merchant not found."
  ]
}
HTTP/1.1 401 Unauthorized
Content-Type: application/json

{
  "errors": [
    "Authentication failed. Invalid bearer token."
  ]
}