Documentation

GET /api/store/confirm

Confirm an order with the payment provider and credit the revenue.

RequestGET /api/store/confirm
AuthenticationNo authentication
Handlerbackend/server.py

What it does

Where a sale becomes revenue — by asking the provider, never by trusting the browser that landed on the success URL. The credit lands on the owner recorded when the order was opened. Repeated confirmation of the same reference is one ledger entry, not additional sales.

Authentication

No authentication. The response does not depend on a session.

Parameters

ParameterInTypeRequiredDescription
refquerystringRequiredThe order reference returned by `POST /api/store/checkout`.

Request

The cookie jar carries the session between calls. Angle-bracketed values are the parameter types from the table above.

curl -s -b cookies.txt -c cookies.txt \
  "https://flowfinds.ai/api/store/confirm?ref=<string>"
const res = await fetch("https://flowfinds.ai/api/store/confirm?ref=<string>", {
  method: "GET",
  credentials: "include",
});
const data = await res.json();
import requests

s = requests.Session()
r = s.get("https://flowfinds.ai/api/store/confirm?ref=<string>")
data = r.json()

Recorded example

curl -s -b cookies.txt -c cookies.txt \
  "$FLOWFINDS_ORIGIN/api/store/confirm?ref=…"

Responses

200The provider confirmed the payment and the ledger was credited.

Errors

StatusReasonWhen
400order_not_foundNo `ref` was supplied.
404order_not_foundThe provider does not recognise the reference.

Related

Back to the API reference index, or read the cookbook for recipes that compose this endpoint with others.