Status
Query the current status of a transaction with POST /v1/status/direct
Endpoint
POST https://api.settleflow.io/v1/status/directUse this endpoint to retrieve the latest state of a payment — typically after a 3D Secure challenge, or to reconcile your own records against SettleFlow.
When to call it
- After redirecting the customer through a 3DS challenge, once they land back on your
ReturnUrl. - If a webhook delivery is delayed or you want to confirm the authoritative state.
- For reconciliation jobs that compare your internal order status with SettleFlow's record of truth.
Do not poll this endpoint in tight loops — rely on the webhook instead and use status as a fallback.
Request
Headers
| Header | Value |
|---|---|
epro-api-key | Your API key |
Content-Type | application/json |
Body
Provide one of the following. When both are supplied, Reference takes precedence.
| Field | Type | Description |
|---|---|---|
Reference | string | SettleFlow payment request ID returned by /v1/payment/direct. |
Tid | string | Your own transaction reference. |
Example request
curl -X POST https://api.settleflow.io/v1/status/direct \
-H "epro-api-key: sk_test_..." \
-H "Content-Type: application/json" \
-d '{
"Reference": "pr_abc123"
}'Response
{
"Code": 0,
"Result": {
"OperationType": "payment",
"Status": "captured",
"Tid": "order-2026-001",
"Reference": "pr_abc123",
"Amount": 49.99,
"UserId": "customer-42",
"Message": "Payment was successful",
"Date": "2026-04-22 14:30:45"
}
}The Status field uses the same values as the payment response — see Status values on the payment page.
Errors
| Code | Meaning |
|---|---|
1 | Neither Tid nor Reference supplied |
3 | Invalid API key |
102 | Transaction not found for the given identifier |
Pattern: polling after a 3DS redirect
// After the customer returns to your ReturnUrl
async function resolveAfter3DS(reference) {
for (let attempt = 0; attempt < 6; attempt++) {
const res = await fetch("https://api.settleflow.io/v1/status/direct", {
method: "POST",
headers: {
"epro-api-key": process.env.SETTLEFLOW_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({ Reference: reference }),
});
const { Code, Result } = await res.json();
if (Code !== 0) throw new Error(`status error ${Code}`);
if (Result.Status !== "pending") return Result;
await new Promise((r) => setTimeout(r, 2000));
}
throw new Error("Timed out waiting for 3DS completion");
}Six attempts at two-second intervals is a reasonable ceiling — if the payment is still pending after twelve seconds, trust the webhook to resolve it and show the customer a "processing" screen.