Skip to Content
Docs
Payment sessions

Retrieve payment session client details

POST/sessions/payment/{id}/client_details

Retrieves the location details of the customer's device for a payment session opened with Pay.com.js.

Headers

AuthorizationstringRequired
HTTP Basic auth: your API key as the password, with an empty username. See Authentication.
idempotency-keystring

A unique key, such as a UUID, that makes a POST or DELETE request safe to retry. Pay.com keeps each key for 24 hours, separately for each workspace.

  • A retry with the same key, endpoint and body gets the first request's stored status and body, without running the request again.
  • If the first request is still being processed, a retry gets 409 idempotency_error (request_in_progress).
  • The same key on another endpoint, or with another body, gets 400 idempotency_error (invalid_parameters).
  • GET, PUT and PATCH requests ignore the key.

The response repeats the key in its Idempotency-Key header.

Path parameters

idstringRequired

The unique identifier of the payment session.

Returns

Returns the client details object.

idstringRequired

Unique identifier for the client details. Uses the payment session's digits with the clnt_ prefix.

resourcestringRequired

String representing the object's type.

One of client_details.

countrystring

Two-letter ISO country code of the client.

ip_addressstring

IP address of the client.

citystring

City of the client.

continentstring

Continent of the client.

latitudestring

Latitude coordinate of the client's location.

longitudestring

Longitude coordinate of the client's location.

Show 7 more attributesShow fewer attributes
statestring or null

State or province of the client.

postal_codestring

Postal code of the client.

regionstring

Region of the client.

region_codestring

Region code of the client.

subdivisionstring

Subdivision of the client's location.

timezonestring

Timezone of the client.

test_modeboolean

Whether the payment session was created in the sandbox.

Errors

400
Invalid request parameters.
401
The API key was refused (invalid_key and the other codes of a 401).
403
The request was refused: the API key may not make it (for example resource_not_allowed, key_disabled, network_not_allowed, pci_required or merchant_required), or this resource isn't enabled for your account (permission_denied). code says why.
404
Payment session not found.
409
Another request with the same idempotency-key is still being processed (request_in_progress). Wait, then retry with the same key.
500
Internal server error.
503
Service unavailable. Retry after the number of seconds in Retry-After, or after a few seconds when there's none.
Was this page helpful?