POST /v1/admin/referrals/payouts/{id}/sent — Mark payout as sent
https://api.triport.io/v1/admin/referrals/payouts/9f1c0b7e-4d2a-4c8e-9b3f-1a2b3c4d5e6f/sentOperator action that marks a referral payout as **sent**, recording the on-chain transaction hash that fulfilled it.
This is an operator-only endpoint in the referral console. It transitions a
single payout into the terminal sent status and stores the on-chain
transaction hash that settled it. Use it once you have broadcast the payout
transaction and have a confirmed hash to record against the payout.
The transition is only valid for payouts that are still actionable — that
is, in the requested or processing status. Payouts that are already in a
terminal state (sent, failed, or cancelled) cannot be re-marked and will
return 409 payout_not_actionable. sent is a final state; to record a failure
instead, use the companion endpoint
POST /v1/admin/referrals/payouts/{id}/failed.
This route is gated by the X-Admin-Token header and carries no user session.
Parameters
Path parameters
idstring (UUID)required400 invalid_payout_id.Request bodyobjecttx_hashstringrequiredResponse
200 OK
okbooleantrue when the payout was successfully transitioned to sent.Errors
All errors share the standard envelope {"error":"<tag>"}. See
errors.md for the full error model.
| Code | Error tag | When it happens |
|---|---|---|
| 400 | invalid_payout_id | The {id} path segment is not a valid UUID. |
| 400 | invalid_json | The request body could not be parsed as JSON. |
| 400 | tx_hash_required | The tx_hash field is missing or empty. |
| 401 | admin_token_invalid | The X-Admin-Token header is missing or does not match. |
| 401 | admin_token_unset | No admin token is configured on the server, so all operator routes are closed. |
| 404 | payout_not_found | No payout exists with the given id. |
| 409 | payout_not_actionable | The payout is not in an actionable status (requested or processing) — it is already sent, failed, or cancelled. |
| 500 | internal | An unexpected server error occurred. |
Examples
JavaScript (fetch)
const payoutId = "9f1c0b7e-4d2a-4c8e-9b3f-1a2b3c4d5e6f";
const res = await fetch(
`https://api.triport.io/v1/admin/referrals/payouts/${payoutId}/sent`,
{
method: "POST",
headers: {
"X-Admin-Token": process.env.TRIPORT_ADMIN_TOKEN,
"Content-Type": "application/json",
},
body: JSON.stringify({
tx_hash:
"0x4a8f2c9e1b7d3f5a6c0e2d4b8f1a3c5e7d9b0f2a4c6e8d0b2f4a6c8e0d2b4f6a",
}),
}
);
if (!res.ok) {
const { error } = await res.json();
throw new Error(`mark payout sent failed: ${error}`);
}
const { ok } = await res.json(); // { ok: true }TypeScript SDK (@triport/sdk)
import { TriportAdmin } from "@triport/sdk";
const admin = new TriportAdmin({ adminToken: process.env.TRIPORT_ADMIN_TOKEN! });
await admin.referrals.payouts.markSent("9f1c0b7e-4d2a-4c8e-9b3f-1a2b3c4d5e6f", {
txHash:
"0x4a8f2c9e1b7d3f5a6c0e2d4b8f1a3c5e7d9b0f2a4c6e8d0b2f4a6c8e0d2b4f6a",
});Python (triport-sdk)
import os
from triport import TriportAdmin
admin = TriportAdmin(admin_token=os.environ["TRIPORT_ADMIN_TOKEN"])
admin.referrals.payouts.mark_sent(
"9f1c0b7e-4d2a-4c8e-9b3f-1a2b3c4d5e6f",
tx_hash="0x4a8f2c9e1b7d3f5a6c0e2d4b8f1a3c5e7d9b0f2a4c6e8d0b2f4a6c8e0d2b4f6a",
)Notes
- Terminal transition.
sentis a final status. Once recorded it cannot be changed by this endpoint; subsequent calls return409 payout_not_actionable. - Idempotency. This call is not idempotent — a second attempt on a payout
that is already
sentfails with409. Record the result of the first call. - Recording a failure instead. If the payout transaction did not settle, use
POST
/v1/admin/referrals/payouts/{id}/failed, which reverses the reserved rewards back to the user's available balance. - Listing payouts. To find a payout id and its current status, see the
read-side list endpoint
GET
/v1/referrals/payouts.