Caller IP

This endpoint returns the public IP address of the client making the request to the Partner API. This is particularly useful for verifying that your requests are originating from an IP address that has been whitelisted by Treasury.

Get Caller IP

GET /caller-ip

Headers

Header / TypeConditionDescription
Authorizationstring
optional
Bearer token retrieved from the Authentication endpoint.

Response

The response body includes the caller's public IP address as seen by the Partner API. When the Authorization header is provided, the response also indicates if the calling IP address is currently whitelisted.

Sample Response (Unauthorized Request)

This response format is returned when the request is made without an Authorization header.

json
{
  "code"     : 200,
  "caller_ip": "100.200.300.400"
}

Sample Response (Authorized Request)

This response format is returned when an Authorization header is provided, showing the whitelist status of the caller's IP.

json
{
  "code"     : 200,
  "caller_ip": "100.200.300.400",
  "allowed"  : true
}