Retrieve an Event
curl --request GET \
--url https://api.sandbox.lead.bank/v2/events/{event_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.lead.bank/v2/events/{event_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.lead.bank/v2/events/{event_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://api.sandbox.lead.bank/v2/events/{event_id}",
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.sandbox.lead.bank/v2/events/{event_id}"
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.sandbox.lead.bank/v2/events/{event_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v2/events/{event_id}")
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": "event_0o5Fs0EELR0fUjHjbCnEtdUwQe3",
"object_id": "wire_xyz001",
"object_type": "instant_payment",
"event": "instant_payment.posted",
"created_at": "2024-06-01T12:00:00Z"
}{
"code": "authentication_missing",
"message": "The request has no authentication credentials. Send your API token in the Authorization header.",
"errors": [
{
"code": "authentication_missing",
"message": "The Authorization header is missing. Send your API token as a bearer token.",
"parameters": [
"Authorization"
]
}
]
}{
"code": "internal_server_error",
"message": "Internal server error. Retry with exponential backoff. For a POST, PATCH or DELETE, reuse the same Idempotency-Key so the request isn't processed twice. If it keeps failing, contact Lead with the Lead-Request-ID."
}Events
Retrieve an Event
GET
/
v2
/
events
/
{event_id}
Retrieve an Event
curl --request GET \
--url https://api.sandbox.lead.bank/v2/events/{event_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sandbox.lead.bank/v2/events/{event_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sandbox.lead.bank/v2/events/{event_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://api.sandbox.lead.bank/v2/events/{event_id}",
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.sandbox.lead.bank/v2/events/{event_id}"
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.sandbox.lead.bank/v2/events/{event_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.lead.bank/v2/events/{event_id}")
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": "event_0o5Fs0EELR0fUjHjbCnEtdUwQe3",
"object_id": "wire_xyz001",
"object_type": "instant_payment",
"event": "instant_payment.posted",
"created_at": "2024-06-01T12:00:00Z"
}{
"code": "authentication_missing",
"message": "The request has no authentication credentials. Send your API token in the Authorization header.",
"errors": [
{
"code": "authentication_missing",
"message": "The Authorization header is missing. Send your API token as a bearer token.",
"parameters": [
"Authorization"
]
}
]
}{
"code": "internal_server_error",
"message": "Internal server error. Retry with exponential backoff. For a POST, PATCH or DELETE, reuse the same Idempotency-Key so the request isn't processed twice. If it keeps failing, contact Lead with the Lead-Request-ID."
}See Errors for the common errors every v2 endpoint can return.
Authorizations
Path Parameters
Response
An Event object.
The type of event.
Available options:
ach.processing, ach.submitted, ach.posted, ach.under_review, ach.approved, ach.rejected, ach.pending_return, ach.returned, ach.corrected, ach.canceled, ach.scheduled, ach.return_dishonored, ach.return_contested, account_number.created, account_number.activated, account_number.deactivated, account_number.canceled, internal_transfer.succeeded, internal_transfer.failed, internal_transfer.posted, internal_transfer.rejected, lending.disbursement.processing, lending.disbursement.succeeded, lending.disbursement.failed, lending.disbursement.ach_correction, wire.created, wire.under_review, wire.scheduled, wire.processing, wire.posted, wire.rejected, wire.canceled, wire.cancel_pending, instant_payment.posted, instant_payment.rejected, instant_payment.under_review, instant_payment.counterparty_status_updated, instant_payment.return_request_response_needed, instant_payment.return_request_status_updated, funding.posted, funding.rejected, receivable_sale.created, receivable_sale.skipped, receivable_sale.settled, receivable_sale.failed, blockchain_payment.created, blockchain_payment.under_review, blockchain_payment.submitted, blockchain_payment.posted, blockchain_payment.rejected, blockchain_payment.canceled Example:
"instant_payment.posted"
Was this page helpful?

