TriportRPC

POST /v1/admin/referrals/payouts/{id}/sent — Mark payout as sent

POSThttps://api.triport.io/v1/admin/referrals/payouts/9f1c0b7e-4d2a-4c8e-9b3f-1a2b3c4d5e6f/sent

Operator action that marks a referral payout as **sent**, recording the on-chain transaction hash that fulfilled it.

Operator endpoint — standard per-tier RPS

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)required
The payout identifier. Must be a valid UUID, otherwise 400 invalid_payout_id.
Request bodyobject
tx_hashstringrequired
The on-chain transaction hash that fulfilled the payout. Must be non-empty.

Response

200 OK

okboolean
Always true 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.

CodeError tagWhen it happens
400invalid_payout_idThe {id} path segment is not a valid UUID.
400invalid_jsonThe request body could not be parsed as JSON.
400tx_hash_requiredThe tx_hash field is missing or empty.
401admin_token_invalidThe X-Admin-Token header is missing or does not match.
401admin_token_unsetNo admin token is configured on the server, so all operator routes are closed.
404payout_not_foundNo payout exists with the given id.
409payout_not_actionableThe payout is not in an actionable status (requested or processing) — it is already sent, failed, or cancelled.
500internalAn 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. sent is a final status. Once recorded it cannot be changed by this endpoint; subsequent calls return 409 payout_not_actionable.
  • Idempotency. This call is not idempotent — a second attempt on a payout that is already sent fails with 409. 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.