Re-send a notification
CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");curl_easy_setopt(hnd, CURLOPT_URL, "https://example.com/api/sessions/0193f6c1-7a2e-7b4d-9f01-2c3d4e5f6a7b/notification");
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.Post, RequestUri = new Uri("https://example.com/api/sessions/0193f6c1-7a2e-7b4d-9f01-2c3d4e5f6a7b/notification"), 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/sessions/0193f6c1-7a2e-7b4d-9f01-2c3d4e5f6a7b/notification"
req, _ := http.NewRequest("POST", 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/sessions/0193f6c1-7a2e-7b4d-9f01-2c3d4e5f6a7b/notification")) .header("Authorization", "Bearer <token>") .method("POST", 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/sessions/0193f6c1-7a2e-7b4d-9f01-2c3d4e5f6a7b/notification") .post(null) .addHeader("Authorization", "Bearer <token>") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'POST', url: 'https://example.com/api/sessions/0193f6c1-7a2e-7b4d-9f01-2c3d4e5f6a7b/notification', 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/sessions/0193f6c1-7a2e-7b4d-9f01-2c3d4e5f6a7b/notification';const options = {method: 'POST', 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/sessions/0193f6c1-7a2e-7b4d-9f01-2c3d4e5f6a7b/notification") .post(null) .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/sessions/0193f6c1-7a2e-7b4d-9f01-2c3d4e5f6a7b/notification";
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Authorization", "Bearer <token>".parse().unwrap());
let client = reqwest::Client::new(); let response = client.post(url) .headers(headers) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}curl --request POST \ --url https://example.com/api/sessions/0193f6c1-7a2e-7b4d-9f01-2c3d4e5f6a7b/notification \ --header 'Authorization: Bearer <token>'wget --quiet \ --method POST \ --header 'Authorization: Bearer <token>' \ --output-document \ - https://example.com/api/sessions/0193f6c1-7a2e-7b4d-9f01-2c3d4e5f6a7b/notificationThe ops replay. The ending must be told again — because they never heard it, or because they heard it and their own processing broke afterwards: an acknowledged notification is replayable, since a 2xx only ever meant their endpoint answered. Re-arms the WHOLE retry calendar rather than firing once — same notificationId on the wire, so the merchant’s idempotency reads the replay as the retry it is. A human’s gesture: contact tokens only, never client_credentials.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The session, as a search returned it. A lowercase UUID — the ones we mint are v7.
Example
0193f6c1-7a2e-7b4d-9f01-2c3d4e5f6a7bResponses
Section titled “Responses”The calendar, re-armed and fresh — the first delivery is imminent.
object
Where the replay will be delivered — the address the session recorded.
How many attempts had failed before this replay was armed.
Whether the calendar was spent when you asked — a replay re-arms it either way.
Example
{ "url": "https://shop.example/payplug/notifications", "failures": 6, "abandoned": true}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"}Nothing to replay NOW: the calendar is still running on its own (NotificationNotAbandoned), or the session has not ended (SessionNotEnded). An acknowledged notification IS replayable — an integrator whose processing broke after answering 2xx has nothing else to ask for.
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": "NotificationNotAbandoned", "message": "the calendar is still running — a retry is already coming"}The session declares no notification address (NoNotificationUrl).
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": "NoNotificationUrl", "message": "this session declares no notification address — there is nothing to deliver"}