Documentation
Geolocation API
This API can be used for client-side or server-side detection of user location based on user's IP. This API also works tightly with Paymentwall Risk Scoring.
Request
Request Endpoint
https://api.paymentwall.com/api/rest/country
Request Method
GET
Request Parameters
parameter | is required | description |
---|---|---|
key | yes | your Paymentwall Project Key |
uid | yes | identifier of the end-user |
user_ip | no | IP address of the end-user, e.g. 255.255.255.255 |
callback | no | callback function, can be used for JSONP on clientside |
Sample Request
https://api.paymentwall.com/api/rest/country?key={$appkey}&uid={$uid}[&user_ip={$user_ip}][&callback={$callbackFunction}]
Response
Sample response if callback parameter is present:
callbackFunction({"code":"DE","name":"Germany"});
Sample response if callback is not present:
{"code":"DE","name":"Germany"}