List Events
curl --request GET \
--url https://api.paygentic.io/v0/sources/{id}/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paygentic.io/v0/sources/{id}/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.paygentic.io/v0/sources/{id}/events', 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.paygentic.io/v0/sources/{id}/events",
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.paygentic.io/v0/sources/{id}/events"
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.paygentic.io/v0/sources/{id}/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/sources/{id}/events")
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{
"data": [
{
"id": "sev_a1b2c3d4e5f6g7h8",
"createdAt": "2024-03-10T14:30:00Z",
"customerId": "cus_q3r4s5t6u7v8w9x0",
"errorMessage": null,
"externalEventId": "evt_stripe_123456",
"processedAt": null,
"processedBy": null,
"rawData": {
"amount": 10000,
"currency": "usd",
"description": "Stripe revenue event"
},
"sourceId": "src_x3y4z5a6b7c8d9e0",
"status": "pending",
"subscriptionId": "sub_z1a2b3c4d5e6f7g8",
"updatedAt": "2024-03-10T14:30:00Z",
"usageEventIds": []
},
{
"id": "sev_b2c3d4e5f6g7h8i9",
"createdAt": "2024-03-10T14:45:00Z",
"customerId": "cus_q3r4s5t6u7v8w9x0",
"errorMessage": null,
"externalEventId": "evt_stripe_789012",
"processedAt": "2024-03-10T15:00:00Z",
"processedBy": "usr_platform",
"rawData": {
"amount": 25000,
"currency": "usd",
"description": "Stripe revenue event"
},
"sourceId": "src_x3y4z5a6b7c8d9e0",
"status": "processed",
"subscriptionId": "sub_z1a2b3c4d5e6f7g8",
"updatedAt": "2024-03-10T15:00:00Z",
"usageEventIds": [
"usg_y1z2a3b4c5d6e7f8"
]
}
],
"pagination": {
"limit": 10,
"offset": 0,
"total": 2
}
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}Sources
List Events
List events for a specific source with optional status filtering
GET
/
v0
/
sources
/
{id}
/
events
List Events
curl --request GET \
--url https://api.paygentic.io/v0/sources/{id}/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paygentic.io/v0/sources/{id}/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.paygentic.io/v0/sources/{id}/events', 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.paygentic.io/v0/sources/{id}/events",
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.paygentic.io/v0/sources/{id}/events"
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.paygentic.io/v0/sources/{id}/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/sources/{id}/events")
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{
"data": [
{
"id": "sev_a1b2c3d4e5f6g7h8",
"createdAt": "2024-03-10T14:30:00Z",
"customerId": "cus_q3r4s5t6u7v8w9x0",
"errorMessage": null,
"externalEventId": "evt_stripe_123456",
"processedAt": null,
"processedBy": null,
"rawData": {
"amount": 10000,
"currency": "usd",
"description": "Stripe revenue event"
},
"sourceId": "src_x3y4z5a6b7c8d9e0",
"status": "pending",
"subscriptionId": "sub_z1a2b3c4d5e6f7g8",
"updatedAt": "2024-03-10T14:30:00Z",
"usageEventIds": []
},
{
"id": "sev_b2c3d4e5f6g7h8i9",
"createdAt": "2024-03-10T14:45:00Z",
"customerId": "cus_q3r4s5t6u7v8w9x0",
"errorMessage": null,
"externalEventId": "evt_stripe_789012",
"processedAt": "2024-03-10T15:00:00Z",
"processedBy": "usr_platform",
"rawData": {
"amount": 25000,
"currency": "usd",
"description": "Stripe revenue event"
},
"sourceId": "src_x3y4z5a6b7c8d9e0",
"status": "processed",
"subscriptionId": "sub_z1a2b3c4d5e6f7g8",
"updatedAt": "2024-03-10T15:00:00Z",
"usageEventIds": [
"usg_y1z2a3b4c5d6e7f8"
]
}
],
"pagination": {
"limit": 10,
"offset": 0,
"total": 2
}
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}Authorizations
API key authentication
Path Parameters
Unique identifier for a source
Pattern:
^src_[a-zA-Z0-9]+$Query Parameters
Filter events by customer ID
Required range:
1 <= x <= 100Required range:
x >= 0Filter events by status
Available options:
pending, processed, failed, rejected Filter events by subscription ID
Was this page helpful?
⌘I