get
https://apiprod.fattlabs.com/merchant/
Retrieves the merchant specified by the {id} parameter.
Retrieve a merchant's account details from your developer integration using its merchant ID and your partner API key.
Use GET /merchant/{merchant_id}. The response id matches the merchant ID used in other enrollment-related routes.
Send an authenticated request
- Open Bash with curl installed. Use curl 7.76.0 or later for the example's
--fail-with-bodyoption, which preserves the error response body while returning a nonzero exit code for HTTP errors. - Have your partner API key ready. This endpoint requires partner-level access; a merchant-level API key does not grant access to partner operations. Keep the key out of client-side code and public repositories.
- Copy the merchant's
idfrom the response to Create a Merchant or from a merchant in thedataarray returned by Get all Merchants. Supply this required string asmerchant_idin the URL; it has no default. For example,65649c08-71be-4745-a437-c265df8f3ed3is the ID in this endpoint's sample response, not an account you can necessarily access. - Run the example below. Paste your key at the hidden prompt, then enter your merchant ID. The example uses the documented base URL and sends no request body or optional parameters.
(
# Hidden input keeps your partner key out of the command in shell history.
if ! read -r -s -p "Stax partner API key: " STAX_PARTNER_API_KEY; then
printf '\nCould not read the partner API key.\n' >&2
exit 1
fi
printf '\n'
# Copy id from POST /merchant or a merchant in GET /merchant's data array.
# Example format: 65649c08-71be-4745-a437-c265df8f3ed3.
if ! read -r -p "Merchant ID: " STAX_MERCHANT_ID; then
printf 'Could not read the merchant ID.\n' >&2
exit 1
fi
if [[ -z "$STAX_PARTNER_API_KEY" || -z "$STAX_MERCHANT_ID" ]]; then
printf 'Enter a nonempty partner API key and merchant ID.\n' >&2
exit 1
fi
if ! curl --fail-with-body --show-error \
--request GET "https://apiprod.fattlabs.com/merchant/${STAX_MERCHANT_ID}" \
--header "Authorization: Bearer ${STAX_PARTNER_API_KEY}" \
--header "Content-Type: application/json" \
--write-out '\nHTTP status: %{http_code}\n'; then
printf 'Request failed. Review the HTTP status and response above, or the curl error for a connection failure.\n' >&2
exit 1
fi
)Check the response
A successful request returns HTTP 200 and a merchant object whose id matches the ID you supplied. For the documented sample merchant, the response includes these fields (additional fields are omitted here):
{
"id": "65649c08-71be-4745-a437-c265df8f3ed3",
"status": "PENDING",
"company_name": "Test merchant"
}The example prints the full response body followed by:
HTTP status: 200Troubleshoot a failed request
- Missing input: The example exits before sending the request if you leave the key or merchant ID empty.
- HTTP
400: Review the merchant ID in the URL. The endpoint's documented error example is{}, so the response body may contain no explanation. - Authentication failure: Confirm that you supplied a partner API key, not a merchant-level key, and that the merchant belongs to an account your partner can manage.
- Connection failure: Review curl's error message and check network access to
https://apiprod.fattlabs.com. - HTTP
200without a matchingid: Do not treat the lookup as successful; check the requested ID and inspect the full response before using it in your integration.
