curl --request GET \
--url https://{host}/v1/payment-operations/{commandId} \
--header 'Authorization: <api-key>' \
--header 'X-Ambient-Actor: <api-key>' \
--header 'X-Ambient-Timestamp: <api-key>'import requests
url = "https://{host}/v1/payment-operations/{commandId}"
headers = {
"X-Ambient-Actor": "<api-key>",
"X-Ambient-Timestamp": "<api-key>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-Ambient-Actor': '<api-key>',
'X-Ambient-Timestamp': '<api-key>',
Authorization: '<api-key>'
}
};
fetch('https://{host}/v1/payment-operations/{commandId}', 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://{host}/v1/payment-operations/{commandId}",
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: <api-key>",
"X-Ambient-Actor: <api-key>",
"X-Ambient-Timestamp: <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://{host}/v1/payment-operations/{commandId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Ambient-Actor", "<api-key>")
req.Header.Add("X-Ambient-Timestamp", "<api-key>")
req.Header.Add("Authorization", "<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://{host}/v1/payment-operations/{commandId}")
.header("X-Ambient-Actor", "<api-key>")
.header("X-Ambient-Timestamp", "<api-key>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/v1/payment-operations/{commandId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Ambient-Actor"] = '<api-key>'
request["X-Ambient-Timestamp"] = '<api-key>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"commandId": "<string>",
"kind": "payment.authorize",
"railId": "<string>",
"authorizationId": "<string>",
"status": "pending",
"occurredAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"authorizationState": "authorized",
"rejectionCode": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "unauthenticated",
"message": "request authentication failed"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}Read an actor-scoped payment operation
Returns the safe status projection for a payment command queued by the authenticated actor. Operations owned by another actor are indistinguishable from missing operations. Raw requests and results, provider errors, rail references, lease state, and journal entries are not disclosed. A succeeded operation’s authorizationState is read from the independently verified authorization record.
curl --request GET \
--url https://{host}/v1/payment-operations/{commandId} \
--header 'Authorization: <api-key>' \
--header 'X-Ambient-Actor: <api-key>' \
--header 'X-Ambient-Timestamp: <api-key>'import requests
url = "https://{host}/v1/payment-operations/{commandId}"
headers = {
"X-Ambient-Actor": "<api-key>",
"X-Ambient-Timestamp": "<api-key>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'X-Ambient-Actor': '<api-key>',
'X-Ambient-Timestamp': '<api-key>',
Authorization: '<api-key>'
}
};
fetch('https://{host}/v1/payment-operations/{commandId}', 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://{host}/v1/payment-operations/{commandId}",
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: <api-key>",
"X-Ambient-Actor: <api-key>",
"X-Ambient-Timestamp: <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://{host}/v1/payment-operations/{commandId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Ambient-Actor", "<api-key>")
req.Header.Add("X-Ambient-Timestamp", "<api-key>")
req.Header.Add("Authorization", "<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://{host}/v1/payment-operations/{commandId}")
.header("X-Ambient-Actor", "<api-key>")
.header("X-Ambient-Timestamp", "<api-key>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/v1/payment-operations/{commandId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Ambient-Actor"] = '<api-key>'
request["X-Ambient-Timestamp"] = '<api-key>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"commandId": "<string>",
"kind": "payment.authorize",
"railId": "<string>",
"authorizationId": "<string>",
"status": "pending",
"occurredAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"authorizationState": "authorized",
"rejectionCode": "<string>"
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "unauthenticated",
"message": "request authentication failed"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}Authorizations
Provisioned actor identifier.
Current Unix timestamp in seconds, within the configured clock-skew window.
Ambient-HMAC followed by a space and the unpadded base64url HMAC-SHA256 signature. See Authentication and authority for the canonical input.
Path Parameters
Actor-scoped payment command identifier returned when authorization was queued.
1Response
Safe payment-operation status.
Actor-scoped idempotency key. Retry the identical command with the same value.
1payment.authorize, payment.settle, payment.cancel, payment.refund pending, leased, succeeded, failed authorized, settled, canceled, refunded Stable Ambient rejection code. Provider error text is never returned.