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
| Field | Req | Description |
|---|---|---|
Request | Yes | Must be getServices |
CompanyToken | Yes | Your 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
| Field | Description |
|---|---|
Services/Service | Repeated list item |
ServiceID | Numeric identifier you pass as ServiceType in transaction requests |
ServiceName | Human-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
getServicesto populate dropdowns or validateServiceTypevalues at runtime or during setup.
Errors (common)
| Code | Meaning | Action |
|---|---|---|
801 | Missing CompanyToken | Include valid merchant token |
803 | Invalid/missing Request name | Ensure getServices |
804 | Error in XML | Check tag names/encoding |
Some tenants only document
801, but standard v6 behavior may also include803/804in malformed requests.
Best Practices
- Cache results (e.g., 15–60 min) — services list changes infrequently.
- Store both
ServiceIDandServiceNameto display friendly labels in your UI and reports. - Validate that
ServiceTypeused in transactions exists in this list to avoid902-style data mismatch errors in related calls.
Troubleshooting
| Symptom | Likely Cause | Fix |
|---|---|---|
Empty <Services> | No services configured | Ask DPO support to configure services |
| XML error | Wrong casing/encoding | Ensure exact tags & UTF-8 |
| Using wrong ID later | Mismatch between ServiceID and ServiceType | Always map ServiceID → ServiceType 1:1 |

