Events - List
curl --request POST \
--url https://sandbox.hyperswitch.io/events/{merchant_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"created_after": "2023-01-01T00:00:00",
"created_before": "2023-01-31T23:59:59",
"event_classes": [
"payments",
"refunds"
],
"event_types": [
"payment_succeeded"
],
"is_delivered": true,
"limit": 5,
"object_id": "{{object_id}}",
"offset": 0,
"profile_id": "{{profile_id}}"
}
'import requests
url = "https://sandbox.hyperswitch.io/events/{merchant_id}"
payload = {
"created_after": "2023-01-01T00:00:00",
"created_before": "2023-01-31T23:59:59",
"event_classes": ["payments", "refunds"],
"event_types": ["payment_succeeded"],
"is_delivered": True,
"limit": 5,
"object_id": "{{object_id}}",
"offset": 0,
"profile_id": "{{profile_id}}"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
created_after: '2023-01-01T00:00:00',
created_before: '2023-01-31T23:59:59',
event_classes: ['payments', 'refunds'],
event_types: ['payment_succeeded'],
is_delivered: true,
limit: 5,
object_id: '{{object_id}}',
offset: 0,
profile_id: '{{profile_id}}'
})
};
fetch('https://sandbox.hyperswitch.io/events/{merchant_id}', 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://sandbox.hyperswitch.io/events/{merchant_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'created_after' => '2023-01-01T00:00:00',
'created_before' => '2023-01-31T23:59:59',
'event_classes' => [
'payments',
'refunds'
],
'event_types' => [
'payment_succeeded'
],
'is_delivered' => true,
'limit' => 5,
'object_id' => '{{object_id}}',
'offset' => 0,
'profile_id' => '{{profile_id}}'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.hyperswitch.io/events/{merchant_id}"
payload := strings.NewReader("{\n \"created_after\": \"2023-01-01T00:00:00\",\n \"created_before\": \"2023-01-31T23:59:59\",\n \"event_classes\": [\n \"payments\",\n \"refunds\"\n ],\n \"event_types\": [\n \"payment_succeeded\"\n ],\n \"is_delivered\": true,\n \"limit\": 5,\n \"object_id\": \"{{object_id}}\",\n \"offset\": 0,\n \"profile_id\": \"{{profile_id}}\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.hyperswitch.io/events/{merchant_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"created_after\": \"2023-01-01T00:00:00\",\n \"created_before\": \"2023-01-31T23:59:59\",\n \"event_classes\": [\n \"payments\",\n \"refunds\"\n ],\n \"event_types\": [\n \"payment_succeeded\"\n ],\n \"is_delivered\": true,\n \"limit\": 5,\n \"object_id\": \"{{object_id}}\",\n \"offset\": 0,\n \"profile_id\": \"{{profile_id}}\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hyperswitch.io/events/{merchant_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"created_after\": \"2023-01-01T00:00:00\",\n \"created_before\": \"2023-01-31T23:59:59\",\n \"event_classes\": [\n \"payments\",\n \"refunds\"\n ],\n \"event_types\": [\n \"payment_succeeded\"\n ],\n \"is_delivered\": true,\n \"limit\": 5,\n \"object_id\": \"{{object_id}}\",\n \"offset\": 0,\n \"profile_id\": \"{{profile_id}}\"\n}"
response = http.request(request)
puts response.read_body{
"events": [
{
"event_id": "evt_018e31720d1b7a2b82677d3032cab959",
"merchant_id": "y3oqhf46pyzuxjbcn2giaqnb44",
"profile_id": "SqB0zwDGR5wHppWf0bx7GKr1f2",
"object_id": "QHrfd5LUDdZaKtAjdJmMu0dMa1",
"event_type": "payment_succeeded",
"event_class": "payments",
"initial_attempt_id": "evt_018e31720d1b7a2b82677d3032cab959",
"created": "2022-09-10T10:11:12Z",
"is_delivery_successful": true,
"processor_merchant_id": "<string>"
}
],
"total_count": 123
}Event
Events - List
List all Events associated with a Merchant Account or Profile.
POST
/
events
/
{merchant_id}
Events - List
curl --request POST \
--url https://sandbox.hyperswitch.io/events/{merchant_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"created_after": "2023-01-01T00:00:00",
"created_before": "2023-01-31T23:59:59",
"event_classes": [
"payments",
"refunds"
],
"event_types": [
"payment_succeeded"
],
"is_delivered": true,
"limit": 5,
"object_id": "{{object_id}}",
"offset": 0,
"profile_id": "{{profile_id}}"
}
'import requests
url = "https://sandbox.hyperswitch.io/events/{merchant_id}"
payload = {
"created_after": "2023-01-01T00:00:00",
"created_before": "2023-01-31T23:59:59",
"event_classes": ["payments", "refunds"],
"event_types": ["payment_succeeded"],
"is_delivered": True,
"limit": 5,
"object_id": "{{object_id}}",
"offset": 0,
"profile_id": "{{profile_id}}"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
created_after: '2023-01-01T00:00:00',
created_before: '2023-01-31T23:59:59',
event_classes: ['payments', 'refunds'],
event_types: ['payment_succeeded'],
is_delivered: true,
limit: 5,
object_id: '{{object_id}}',
offset: 0,
profile_id: '{{profile_id}}'
})
};
fetch('https://sandbox.hyperswitch.io/events/{merchant_id}', 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://sandbox.hyperswitch.io/events/{merchant_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'created_after' => '2023-01-01T00:00:00',
'created_before' => '2023-01-31T23:59:59',
'event_classes' => [
'payments',
'refunds'
],
'event_types' => [
'payment_succeeded'
],
'is_delivered' => true,
'limit' => 5,
'object_id' => '{{object_id}}',
'offset' => 0,
'profile_id' => '{{profile_id}}'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.hyperswitch.io/events/{merchant_id}"
payload := strings.NewReader("{\n \"created_after\": \"2023-01-01T00:00:00\",\n \"created_before\": \"2023-01-31T23:59:59\",\n \"event_classes\": [\n \"payments\",\n \"refunds\"\n ],\n \"event_types\": [\n \"payment_succeeded\"\n ],\n \"is_delivered\": true,\n \"limit\": 5,\n \"object_id\": \"{{object_id}}\",\n \"offset\": 0,\n \"profile_id\": \"{{profile_id}}\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.hyperswitch.io/events/{merchant_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"created_after\": \"2023-01-01T00:00:00\",\n \"created_before\": \"2023-01-31T23:59:59\",\n \"event_classes\": [\n \"payments\",\n \"refunds\"\n ],\n \"event_types\": [\n \"payment_succeeded\"\n ],\n \"is_delivered\": true,\n \"limit\": 5,\n \"object_id\": \"{{object_id}}\",\n \"offset\": 0,\n \"profile_id\": \"{{profile_id}}\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hyperswitch.io/events/{merchant_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"created_after\": \"2023-01-01T00:00:00\",\n \"created_before\": \"2023-01-31T23:59:59\",\n \"event_classes\": [\n \"payments\",\n \"refunds\"\n ],\n \"event_types\": [\n \"payment_succeeded\"\n ],\n \"is_delivered\": true,\n \"limit\": 5,\n \"object_id\": \"{{object_id}}\",\n \"offset\": 0,\n \"profile_id\": \"{{profile_id}}\"\n}"
response = http.request(request)
puts response.read_body{
"events": [
{
"event_id": "evt_018e31720d1b7a2b82677d3032cab959",
"merchant_id": "y3oqhf46pyzuxjbcn2giaqnb44",
"profile_id": "SqB0zwDGR5wHppWf0bx7GKr1f2",
"object_id": "QHrfd5LUDdZaKtAjdJmMu0dMa1",
"event_type": "payment_succeeded",
"event_class": "payments",
"initial_attempt_id": "evt_018e31720d1b7a2b82677d3032cab959",
"created": "2022-09-10T10:11:12Z",
"is_delivery_successful": true,
"processor_merchant_id": "<string>"
}
],
"total_count": 123
}Authorizations
Body
application/json
The constraints that can be applied when listing Events.
The constraints to apply when filtering events.
Filter events by their type.
Available options:
payment_succeeded, payment_failed, payment_processing, payment_cancelled, payment_cancelled_post_capture, payment_authorized, payment_partially_authorized, payment_captured, payment_expired, action_required, refund_succeeded, refund_failed, refund_review, dispute_opened, dispute_expired, dispute_accepted, dispute_cancelled, dispute_challenged, dispute_won, dispute_lost, mandate_active, mandate_revoked, payout_success, payout_failed, payout_initiated, payout_processing, payout_cancelled, payout_expired, payout_reversed, payout_not_permitted, invoice_paid, surcharge_payment_succeeded, surcharge_refund_succeeded Was this page helpful?