One transaction
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");curl_easy_setopt(hnd, CURLOPT_URL, "https://example.com/api/transactions/0193f6c1-9c40-7d6f-b123-4e5f6a7b8c9d");
struct curl_slist *headers = NULL;headers = curl_slist_append(headers, "Authorization: Bearer <token>");curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
CURLcode ret = curl_easy_perform(hnd);using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Get, RequestUri = new Uri("https://example.com/api/transactions/0193f6c1-9c40-7d6f-b123-4e5f6a7b8c9d"), Headers = { { "Authorization", "Bearer <token>" }, },};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}package main
import ( "fmt" "net/http" "io")
func main() {
url := "https://example.com/api/transactions/0193f6c1-9c40-7d6f-b123-4e5f6a7b8c9d"
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(res) fmt.Println(string(body))
}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://example.com/api/transactions/0193f6c1-9c40-7d6f-b123-4e5f6a7b8c9d")) .header("Authorization", "Bearer <token>") .method("GET", HttpRequest.BodyPublishers.noBody()) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder() .url("https://example.com/api/transactions/0193f6c1-9c40-7d6f-b123-4e5f6a7b8c9d") .get() .addHeader("Authorization", "Bearer <token>") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'GET', url: 'https://example.com/api/transactions/0193f6c1-9c40-7d6f-b123-4e5f6a7b8c9d', headers: {Authorization: 'Bearer <token>'}};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://example.com/api/transactions/0193f6c1-9c40-7d6f-b123-4e5f6a7b8c9d';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}val client = OkHttpClient()
val request = Request.Builder() .url("https://example.com/api/transactions/0193f6c1-9c40-7d6f-b123-4e5f6a7b8c9d") .get() .addHeader("Authorization", "Bearer <token>") .build()
val response = client.newCall(request).execute()use reqwest;
#[tokio::main]pub async fn main() { let url = "https://example.com/api/transactions/0193f6c1-9c40-7d6f-b123-4e5f6a7b8c9d";
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Authorization", "Bearer <token>".parse().unwrap());
let client = reqwest::Client::new(); let response = client.get(url) .headers(headers) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request GET \ --url https://example.com/api/transactions/0193f6c1-9c40-7d6f-b123-4e5f6a7b8c9d \ --header 'Authorization: Bearer <token>'wget --quiet \ --method GET \ --header 'Authorization: Bearer <token>' \ --output-document \ - https://example.com/api/transactions/0193f6c1-9c40-7d6f-b123-4e5f6a7b8c9dWhere a PSP operation lives: its session, attempt and order. Another merchant’s transaction answers the same 404 as a nonexistent one.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The PSP operation, as a search returned it. A lowercase UUID — the ones we mint are v7.
Example
0193f6c1-9c40-7d6f-b123-4e5f6a7b8c9dResponses
Section titled “Responses”The transaction, with the home that gives it meaning — session, order, attempt.
object
The session this belongs to.
The merchant it belongs to.
Their own order reference.
The attempt it belongs to.
What the attempt behind this operation was paid with — card, paypal, wero… An operation alone does not say it, and reading a list of PSP operations without it means opening each one.
The card network that attempt ran on, when the PSP named one we could place — see the same field on an attempt.
The operation itself.
object
Our handle for this PSP operation — what a refund door addresses.
When the operation was opened — epoch milliseconds (Q13).
The last event that touched it — for a terminal transaction, its verdict’s instant.
What this operation asked the PSP: hold the money, take it in one go, capture a hold, release a hold, or send money back.
What this operation moved, in minor units.
object
Amount in the MINOR unit of the currency — 1000_00 is one thousand euros, never 1000.
ISO 4217 code, uppercase. One currency per session.
The PSP’s reference — what their dashboard greps (D-047).
The VERDICT facet: what the PSP finally decided about this operation — as opposed to the ack facet below, which is what the driving call answered on the spot.
object
Where the operation stands. pending means the verdict is still due — it always arrives out-of-band.
The PSP’s own code, split at the source — successes carry theirs too.
The PSP’s own sentence, as they said it — never glued to the code.
What a refusal means, when the PSP’s answer could be read.
What the driving call answered (the ack facet).
What the driving call said — a transport failure’s raw cause included.
Absent beside a present ackMessage = no HTTP response ever came.
The caller’s reconciliation tag, on refunds only (lot 5) — echoed verbatim.
Example
{ "method": "card", "cardScheme": "visa", "transaction": { "type": "authorization", "status": { "kind": "pending", "category": "bank-refusal" } }}InvalidRequest — the request could not be read: a missing or malformed field, a bad pattern, or a property this door does not declare (the message names it). Every door with a schema can answer this, before any business rule is consulted.
object
Stable machine-readable code — the one thing to branch on. Never parse the message.
English sentence for logs and operators. Wording may change; the code will not.
Example
{ "code": "InvalidRequest", "message": "body/<field> failed validation"}Unauthorized — the only code this response carries: no usable access token (absent, malformed, expired). One answer for every failure shape, so nothing can be learned by watching which one comes back.
object
Stable machine-readable code — the one thing to branch on. Never parse the message.
English sentence for logs and operators. Wording may change; the code will not.
Example
{ "code": "Unauthorized", "message": "a valid access token is required"}NotFound — the only code this response carries: unknown, or belonging to another merchant. The two are deliberately indistinguishable.
object
Stable machine-readable code — the one thing to branch on. Never parse the message.
English sentence for logs and operators. Wording may change; the code will not.
Example
{ "code": "NotFound", "message": "no such resource"}