Get the receipt of a completed transfer, withdrawal, swap, limit order or deposit
Returns the receipt of a completed transfer, withdrawal, swap, limit order or deposit: a leaf of the log written with the completion event, which anyone can verify with verifyReceipt (or, for a transfer or withdrawal a payee expects, verifyPaymentReceipt) against a trusted checkpoint and the log’s public tiles. The receipt commits only to the settled terms, the execution’s id and the time; it names no tenant, agent, account, wallet, key or grant, so it is safe to hand to a payee. details is the account’s own view: those terms plus usd_value, the agent’s note, grant_id and policy_epoch, which are never in the receipt. A limit order is completed when funded and placed (not filled), and its receipt proves only that; a deposit’s proves the funds arrived and were credited, not who sent them. receipt is null while PENDING (the latest checkpoint does not cover it yet; read again later) and for UNLOGGED (recorded before the log started), which never becomes PROVEN. It is read from the audit log alone, so it stays readable for the audit retention period whatever became of the operation’s history. An operation of another type or one that has not completed is refused with 409 receipt_not_available; other executions are proved with getOperationProof.
curl --request GET \
--url https://api.agentsonintents.com/v1/agents/{agent_id}/operations/{correlation_id}/receipt \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.agentsonintents.com/v1/agents/{agent_id}/operations/{correlation_id}/receipt"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.agentsonintents.com/v1/agents/{agent_id}/operations/{correlation_id}/receipt', 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.agentsonintents.com/v1/agents/{agent_id}/operations/{correlation_id}/receipt",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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.agentsonintents.com/v1/agents/{agent_id}/operations/{correlation_id}/receipt"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.agentsonintents.com/v1/agents/{agent_id}/operations/{correlation_id}/receipt")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentsonintents.com/v1/agents/{agent_id}/operations/{correlation_id}/receipt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"correlation_id": "<string>",
"type": "transfer",
"status": "PROVEN",
"details": {
"asset": "<string>",
"amount": "<string>",
"recipient": "<string>",
"confidential": true,
"settled_at": "<string>",
"reference": "<string>",
"usd_value": "<string>",
"note": "<string>",
"grant_id": "<string>",
"policy_epoch": "<string>",
"intent_hash": "<string>",
"transfer_intent_hash": "<string>",
"tx_hash": "<string>",
"destination_tx_hash": "<string>",
"settlement_tx_hash": "<string>",
"receipt_hash": "<string>"
},
"receipt": {
"version": 1,
"origin": "<string>",
"leaf_index": "<string>",
"opening": "<string>",
"terms": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}Path Parameters
Response
Success
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Was this page helpful?
curl --request GET \
--url https://api.agentsonintents.com/v1/agents/{agent_id}/operations/{correlation_id}/receipt \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.agentsonintents.com/v1/agents/{agent_id}/operations/{correlation_id}/receipt"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.agentsonintents.com/v1/agents/{agent_id}/operations/{correlation_id}/receipt', 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.agentsonintents.com/v1/agents/{agent_id}/operations/{correlation_id}/receipt",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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.agentsonintents.com/v1/agents/{agent_id}/operations/{correlation_id}/receipt"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.agentsonintents.com/v1/agents/{agent_id}/operations/{correlation_id}/receipt")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentsonintents.com/v1/agents/{agent_id}/operations/{correlation_id}/receipt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"correlation_id": "<string>",
"type": "transfer",
"status": "PROVEN",
"details": {
"asset": "<string>",
"amount": "<string>",
"recipient": "<string>",
"confidential": true,
"settled_at": "<string>",
"reference": "<string>",
"usd_value": "<string>",
"note": "<string>",
"grant_id": "<string>",
"policy_epoch": "<string>",
"intent_hash": "<string>",
"transfer_intent_hash": "<string>",
"tx_hash": "<string>",
"destination_tx_hash": "<string>",
"settlement_tx_hash": "<string>",
"receipt_hash": "<string>"
},
"receipt": {
"version": 1,
"origin": "<string>",
"leaf_index": "<string>",
"opening": "<string>",
"terms": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}{
"errors": [
{
"status": "<string>",
"code": "<string>",
"layer": "request",
"title": "<string>",
"detail": "<string>",
"source": {
"pointer": "<string>"
},
"meta": {
"retryable": true,
"available_at": "2023-11-07T05:31:56Z",
"min_amount": "<string>",
"available_amount": "<string>"
}
}
],
"meta": {
"request_id": "<string>"
}
}