Get Services

Use getServices to retrieve the list of services configured on your merchant (e.g., “Safari Holiday”, “Excursion”).

These ServiceID / ServiceName pairs are referenced in transaction requests (e.g., [ServiceType](../reference/create-token) in createToken).


Endpoint

POST https://secure.3gdirectpay.com/API/v6/

Headers

Content-Type: application/xml; charset=utf-8
Accept: application/xml

Request

Required Fields

FieldReqDescription
RequestYesMust be getServices
CompanyTokenYesYour merchant token

Example Request (XML)

<?xml version="1.0" encoding="utf-8"?>
<API3G>
  <Request>getServices</Request>
  <CompanyToken>YOUR_COMPANY_TOKEN</CompanyToken>
</API3G>

Response

On success, returns a <Services> list of <Service> entries.

Example Success Response (XML)

<?xml version="1.0" encoding="utf-8"?>
<API3G>
  <Services>
    <Service>
      <ServiceID>33</ServiceID>
      <ServiceName>Safari Holiday</ServiceName>
    </Service>
    <Service>
      <ServiceID>39</ServiceID>
      <ServiceName>Excursion</ServiceName>
    </Service>
  </Services>
</API3G>

Field Reference

FieldDescription
Services/ServiceRepeated list item
ServiceIDNumeric identifier you pass as ServiceType in transaction requests
ServiceNameHuman-friendly name for UI/reporting

How It’s Used

  • In Create Token and related calls, include your chosen service as:

    <Services>
      <Service>
        <ServiceType>33</ServiceType>
        <ServiceDescription>Safari Holiday</ServiceDescription>
        <ServiceDate>2025/12/20 19:00</ServiceDate>
      </Service>
    </Services>
  • Use getServices to populate dropdowns or validate ServiceType values at runtime or during setup.


Errors (common)

CodeMeaningAction
801Missing CompanyTokenInclude valid merchant token
803Invalid/missing Request nameEnsure getServices
804Error in XMLCheck tag names/encoding

Some tenants only document 801, but standard v6 behavior may also include 803/804 in malformed requests.


Best Practices

  • Cache results (e.g., 15–60 min) — services list changes infrequently.
  • Store both ServiceID and ServiceName to display friendly labels in your UI and reports.
  • Validate that ServiceType used in transactions exists in this list to avoid 902-style data mismatch errors in related calls.

Troubleshooting

SymptomLikely CauseFix
Empty <Services>No services configuredAsk DPO support to configure services
XML errorWrong casing/encodingEnsure exact tags & UTF-8
Using wrong ID laterMismatch between ServiceID and ServiceTypeAlways map ServiceIDServiceType 1:1