Get an API Log event by ID
curl --request GET \
--url https://api.staging.payrails.io/payment/api/logs/{apiLogEventId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.staging.payrails.io/payment/api/logs/{apiLogEventId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.staging.payrails.io/payment/api/logs/{apiLogEventId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.staging.payrails.io/payment/api/logs/{apiLogEventId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.staging.payrails.io/payment/api/logs/{apiLogEventId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.staging.payrails.io/payment/api/logs/{apiLogEventId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.payrails.io/payment/api/logs/{apiLogEventId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "080405df-b575-4106-9ff6-5cceafc35445",
"requestId": "0412ee01-d3e6-4cb7-a29f-e91721b0b62b",
"createdAt": "2023-05-23T14:12:40.444493Z",
"endpointUrl": "/payment/providers/070dacf4-ddd8-42cd-87ec-944ebf1adc41/proxy",
"statusCode": 404,
"method": "POST",
"rawRequest": "{\"body\":{\"body\":{\"amount\":{\"currency\":\"USD\",\"value\":1000},\"merchantAccount\":\"YOUR_MERCHANT_ACCOUNT\",\"paymentMethod\":{\"cvc\":\"***\",\"expiryMonth\":\"{{cardExpiryMonth}}\",\"expiryYear\":\"{{cardExpiryYear}}\",\"holderName\":\"{{cardHolderName}}\",\"number\":\"***\",\"type\":\"scheme\"},\"reference\":\"your-order-number\",\"returnUrl\":\"https://your-company.com/...\"},\"headers\":{\"Accept\":\"application/json\",\"Content-Type\":\"application/json\",\"x-API-key\":\"YOUR_API_KEY\"},\"paymentInstrumentId\":\"eeaac45c-f032-49bc-a8c5-ec99d79b74e2\",\"providerConfigId\":\"d9699acd-9361-4e11-8d06-b30f41fc6210\"},\"headers\":{\"Accept\":\"application/json\",\"Accept-Encoding\":\"gzip\",\"Authorization\":\"***\",\"Cdn-Loop\":\"cloudflare\",\"Cf-Connecting-Ip\":\"18.196.176.219\",\"Cf-Ipcountry\":\"DE\",\"Cf-Ray\":\"7cbde527aed4bbd9-FRA\",\"Cf-Visitor\":{\"scheme\":\"https\"},\"Ckoidempotencykey\":\"application/json\",\"Content-Length\":\"706\",\"Content-Type\":\"application/json\",\"Postman-Token\":\"bfa62b82-5026-4bb3-9b57-0930f287fccc\",\"True-Client-Ip\":\"18.196.176.219\",\"User-Agent\":\"PostmanRuntime/7.29.3\",\"X-Forwarded-For\":\"172.70.247.146\",\"X-Forwarded-Host\":\"payrails-api.staging.payrails.io\",\"X-Forwarded-Port\":\"443\",\"X-Forwarded-Proto\":\"https\",\"X-Forwarded-Scheme\":\"https\",\"X-Idempotency-Key\":\"5ff04085-beae-4d41-ba78-73eb918d8e7c\",\"X-Original-Forwarded-For\":\"18.196.176.219\",\"X-Real-Ip\":\"172.70.247.146\",\"X-Request-Id\":\"0412ee01-d3e6-4cb7-a29f-e91721b0b62b\",\"X-Scheme\":\"https\",\"Xapikey\":\"application/json\"}}",
"rawResponse": "{\"body\":{\"errors\":[{\"detail\":\"The resource with 'Payment instrument ID': 'eeaac45c-f032-49bc-a8c5-ec99d79b74e2' was not found.\",\"id\":\"6a1456fc-13cf-4b8a-a75e-3891d86873a0\",\"title\":\"resource.not-found\"}]},\"headers\":{\"Content-Type\":\"application/json; charset=UTF-8\",\"X-Request-Id\":\"0412ee01-d3e6-4cb7-a29f-e91721b0b62b\"}}"
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.malformed",
"detail": "The request has malformed syntax",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestmalformed"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.unauthorized",
"detail": "The request lacks necessary credentials to perform the specified action",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestunauthorized"
}
]
}{
"errors": [
{
"id": "e7db22b3-914e-4975-928e-9edfb0885bea",
"code": "request.forbidden",
"detail": "The request credentials lack the required permissions to perform the specified action",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestforbidden"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.not-found",
"detail": "The requested resource was not found",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestnot-found"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.rate-limit",
"detail": "Too many requests",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestrate-limit"
}
]
}Get an API Log event by ID
Get API Log event by ID.
GET
https://api.staging.payrails.io
/
payment
/
api
/
logs
/
{apiLogEventId}
Get an API Log event by ID
curl --request GET \
--url https://api.staging.payrails.io/payment/api/logs/{apiLogEventId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.staging.payrails.io/payment/api/logs/{apiLogEventId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.staging.payrails.io/payment/api/logs/{apiLogEventId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.staging.payrails.io/payment/api/logs/{apiLogEventId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.staging.payrails.io/payment/api/logs/{apiLogEventId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.staging.payrails.io/payment/api/logs/{apiLogEventId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.staging.payrails.io/payment/api/logs/{apiLogEventId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "080405df-b575-4106-9ff6-5cceafc35445",
"requestId": "0412ee01-d3e6-4cb7-a29f-e91721b0b62b",
"createdAt": "2023-05-23T14:12:40.444493Z",
"endpointUrl": "/payment/providers/070dacf4-ddd8-42cd-87ec-944ebf1adc41/proxy",
"statusCode": 404,
"method": "POST",
"rawRequest": "{\"body\":{\"body\":{\"amount\":{\"currency\":\"USD\",\"value\":1000},\"merchantAccount\":\"YOUR_MERCHANT_ACCOUNT\",\"paymentMethod\":{\"cvc\":\"***\",\"expiryMonth\":\"{{cardExpiryMonth}}\",\"expiryYear\":\"{{cardExpiryYear}}\",\"holderName\":\"{{cardHolderName}}\",\"number\":\"***\",\"type\":\"scheme\"},\"reference\":\"your-order-number\",\"returnUrl\":\"https://your-company.com/...\"},\"headers\":{\"Accept\":\"application/json\",\"Content-Type\":\"application/json\",\"x-API-key\":\"YOUR_API_KEY\"},\"paymentInstrumentId\":\"eeaac45c-f032-49bc-a8c5-ec99d79b74e2\",\"providerConfigId\":\"d9699acd-9361-4e11-8d06-b30f41fc6210\"},\"headers\":{\"Accept\":\"application/json\",\"Accept-Encoding\":\"gzip\",\"Authorization\":\"***\",\"Cdn-Loop\":\"cloudflare\",\"Cf-Connecting-Ip\":\"18.196.176.219\",\"Cf-Ipcountry\":\"DE\",\"Cf-Ray\":\"7cbde527aed4bbd9-FRA\",\"Cf-Visitor\":{\"scheme\":\"https\"},\"Ckoidempotencykey\":\"application/json\",\"Content-Length\":\"706\",\"Content-Type\":\"application/json\",\"Postman-Token\":\"bfa62b82-5026-4bb3-9b57-0930f287fccc\",\"True-Client-Ip\":\"18.196.176.219\",\"User-Agent\":\"PostmanRuntime/7.29.3\",\"X-Forwarded-For\":\"172.70.247.146\",\"X-Forwarded-Host\":\"payrails-api.staging.payrails.io\",\"X-Forwarded-Port\":\"443\",\"X-Forwarded-Proto\":\"https\",\"X-Forwarded-Scheme\":\"https\",\"X-Idempotency-Key\":\"5ff04085-beae-4d41-ba78-73eb918d8e7c\",\"X-Original-Forwarded-For\":\"18.196.176.219\",\"X-Real-Ip\":\"172.70.247.146\",\"X-Request-Id\":\"0412ee01-d3e6-4cb7-a29f-e91721b0b62b\",\"X-Scheme\":\"https\",\"Xapikey\":\"application/json\"}}",
"rawResponse": "{\"body\":{\"errors\":[{\"detail\":\"The resource with 'Payment instrument ID': 'eeaac45c-f032-49bc-a8c5-ec99d79b74e2' was not found.\",\"id\":\"6a1456fc-13cf-4b8a-a75e-3891d86873a0\",\"title\":\"resource.not-found\"}]},\"headers\":{\"Content-Type\":\"application/json; charset=UTF-8\",\"X-Request-Id\":\"0412ee01-d3e6-4cb7-a29f-e91721b0b62b\"}}"
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.malformed",
"detail": "The request has malformed syntax",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestmalformed"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.unauthorized",
"detail": "The request lacks necessary credentials to perform the specified action",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestunauthorized"
}
]
}{
"errors": [
{
"id": "e7db22b3-914e-4975-928e-9edfb0885bea",
"code": "request.forbidden",
"detail": "The request credentials lack the required permissions to perform the specified action",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestforbidden"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.not-found",
"detail": "The requested resource was not found",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestnot-found"
}
]
}{
"errors": [
{
"id": "a24bc325-3929-4d9d-9c08-b3aa532685b7",
"code": "request.rate-limit",
"detail": "Too many requests",
"docUrl": "https://docs.payrails.com/docs/resources/error-codes#requestrate-limit"
}
]
}Authorizations
You can use an OAuth2 JWT bearer token in the Authorization header of your API requests for supported endpoints: Authorization: Bearer <YOUR_JWT_HERE>.
These tokens are valid for 10 minutes and can be requested via the access token endpoint endpoint.
Path Parameters
Identifier of the resource in Payrails.
Response
Success.
For some API endpoint we provide we do log request and response.
Unique identifier of the API Log event in Payrails.
Exact date and time when the API Log event happened.
Unique identifier of the API request.
Request HTTP method.
Response HTTP code number.
Serialized raw request.
Serialized raw response.
Last modified on October 1, 2026