Retrieve an event
Retrieve detailed information about a specific event. Use this endpoint to inspect event details, debug webhook deliveries, and verify what data was sent to your webhooks.
API Credentials
Request Parametersโ
Required - 1 fieldPath Parameters
`id`STRING(required)
The event ID to retrieve. Event IDs start with evnt_ followed by test_ for test mode.
Responsesโ
200
Successful retrievalReturns the event object with complete details including the data that triggered the event and webhook delivery information.
Event object includes:
id- Event identifier (evnt_*)key- Event type (e.g., charge.complete)data- Complete object that triggered the eventwebhook_deliveries- Array of webhook delivery attempts with status and responsecreated_at- When the event occurred (ISO 8601)
401
UnauthorizedAuthentication failed. Invalid or missing API key.
Common causes:
- Missing Authorization header
- Invalid secret key
- Using public key instead of secret key
- Incorrect HTTP Basic Auth format
404
Not foundEvent not found or does not exist.
Common causes:
- Invalid event ID
- Event ID from different account
- Mixing test and live mode keys
- Event was created more than 90 days ago (events are retained for 90 days)
Code samplesโ
- cURL
- Ruby
- Python
- Node.js
- PHP
- Java
- C#
- Go
curl https://api.omise.co/events/evnt_test_5xuy4w91xqz7d1w9u0t \
-u skey_test_5xuy4w91xqz7d1w9u0t:
require 'omise'
Omise.api_key = 'skey_test_5xuy4w91xqz7d1w9u0t'
event = Omise::Event.retrieve('evnt_test_5xuy4w91xqz7d1w9u0t')
import omise
omise.api_secret = 'skey_test_5xuy4w91xqz7d1w9u0t'
event = omise.Event.retrieve('evnt_test_5xuy4w91xqz7d1w9u0t')
const omise = require('omise')({
secretKey: 'skey_test_5xuy4w91xqz7d1w9u0t'
});
const event = await omise.events.retrieve('evnt_test_5xuy4w91xqz7d1w9u0t');
<?php
define('OMISE_SECRET_KEY', 'skey_test_5xuy4w91xqz7d1w9u0t');
$event = OmiseEvent::retrieve('evnt_test_5xuy4w91xqz7d1w9u0t');
Client client = new Client.Builder()
.secretKey("skey_test_5xuy4w91xqz7d1w9u0t")
.build();
Event event = client.events().get("evnt_test_5xuy4w91xqz7d1w9u0t");
var client = new Client("skey_test_5xuy4w91xqz7d1w9u0t");
var event = await client.Events.Get("evnt_test_5xuy4w91xqz7d1w9u0t");
client, _ := omise.NewClient(
"pkey_test_5xuy4w91xqz7d1w9u0t",
"skey_test_5xuy4w91xqz7d1w9u0t",
)
event, _ := client.GetEvent("evnt_test_5xuy4w91xqz7d1w9u0t")
Error and result codesโ
Common Error Codesโ
| Code | Description | Resolution |
|---|---|---|
authentication_failure | Invalid API key | Verify your secret key is correct |
not_found | Event not found | Check event ID and ensure correct mode (test/live) |
Webhook Delivery Status Codesโ
| Status | Description |
|---|---|
200 | Successfully delivered and processed |
4xx | Client error (bad request, authentication failure) |
5xx | Server error (your endpoint had an error) |
null | Delivery failed (timeout, connection refused) |
Try it outโ
Required - 1 fields