Paid responses include payment status, cost breakdown, and a receipt ID for accounting and debugging.

Example response

{
  "choices": [{ "message": { "role": "assistant", "content": "..." } }],
  "payment": {
    "status": "captured",
    "chain": "sui",
    "asset": "USDC",
    "amount": "0.005",
    "txHashOrDigest": "..."
  },
  "cost": {
    "gross": "0.005",
    "platformFee": "0.0001",
    "providerNet": "0.0049"
  },
  "receiptId": "receipt_...",
  "refundManagedBy": "api_provider"
}

Payment object

Field Description
status captured, verified, etc.
chain Chain used for payment (sui or solana)
asset Asset symbol (typically USDC)
amount Total amount paid (sum of split legs)
txHashOrDigest On-chain transaction hash or digest

Cost breakdown

Field Description
gross Total charged to payer
platformFee Galliun platform fee (direct split leg)
providerNet Amount received by provider wallet

The 402 cost object may include endpoint price and platform fee breakdown when returned by the API.

Receipt ID

The receiptId is a platform-generated identifier for the payment record. Use it for support, analytics, and reconciliation.

Developers can query receipts via the dashboard analytics APIs.

Refund recommendations

When execution fails after payment with a refund-recommended outcome:

{
  "error": "execution_failed_after_payment",
  "message": "The endpoint failed after payment. A refund may be recommended to the provider.",
  "refundRecommendationId": "...",
  "refundRecommendationStatus": "recommended"
}

Galliun does not queue or send on-chain refunds. Providers refund payers from their own wallet if they choose. See Refunds.

Next steps