Vendor agent prices an upsell, buyer agent pays inline
The buyer's Agentforce agent accepts the upsell. The dollars move on-chain in the same APEX transaction.
01Scenario
A SaaS vendor's Agentforce agent watches an Opportunity for usage-tier breach and proposes a SKU upgrade. The buyer's Agentforce agent — in a different Salesforce org — receives the offer, evaluates it against budget guardrails, and accepts.
On accept, the buyer's APEX flow calls HiveNanoSettle.settle. In the same transaction, the receipt is minted and a USDC transfer on Base mainnet executes from the buyer's treasury wallet to the vendor's wallet. Settlement_Tx_Hash__c is written before commit; if the transfer fails, the OpportunityLineItem update rolls back.
No invoice, no Stripe, no manual reconciliation. The vendor's AP team reconciles against the receipt + tx hash directly.
02Handles
03APEX
Opportunity opp = [SELECT Id, AccountId FROM Opportunity WHERE Id = :oppId];
OpportunityLineItem newLine = new OpportunityLineItem(
OpportunityId = opp.Id,
Product2Id = upgradeProductId,
Quantity = 1,
UnitPrice = 49.00
);
insert newLine;
Map<String, Object> payload = new Map<String, Object>{
'sku_from' => 'starter',
'sku_to' => 'growth',
'monthly_delta' => 49.00,
'opportunity_line' => newLine.Id,
'accepted_by' => 'did:hive:0xBuyerAgent'
};
// Atomic: receipt + on-chain USDC transfer + Salesforce DML
HiveNanoSettleResult res = HiveNanoSettle.settle(
opp.Id,
'upsell.priceline.accept',
'did:hive:0xVendorAgent',
'0xVendorTreasuryWallet',
5000L, // 5000 micro-USDC = 0.005 USDC per call
'salesforce:opportunity:' + opp.Id,
payload
);
// res.txHash is now written to Hive_Receipt__c.Settlement_Tx_Hash__c
// res.block is the Base block number
// If chain transfer fails, full transaction rolls back via Database.rollback
04Flow XML
<Flow xmlns="http://soap.sforce.com/2006/04/metadata">
<processType>AutoLaunchedFlow</processType>
<start>
<connector><targetReference>nano_settle_upsell</targetReference></connector>
<object>OpportunityLineItem</object>
<triggerType>RecordAfterSave</triggerType>
<recordTriggerType>Create</recordTriggerType>
</start>
<actionCalls>
<name>nano_settle_upsell</name>
<label>Settle upsell on Base (Nano)</label>
<actionName>HiveNanoSettle</actionName>
<actionType>apex</actionType>
<inputParameters>
<name>actionType</name>
<value><stringValue>upsell.priceline.accept</stringValue></value>
</inputParameters>
<inputParameters>
<name>microUsdc</name>
<value><numberValue>5000</numberValue></value>
</inputParameters>
</actionCalls>
<status>Active</status>
</Flow>
05The receipt that lands in Hive_Receipt__c
{
"agent_id": "did:hive:0xBuyerAgent",
"counterparty_did": "did:hive:0xVendorAgent",
"action_type": "upsell.priceline.accept",
"scope": "salesforce:opportunity:0061a00000ABC",
"action_ref": "sha256(did:hive:0xBuyerAgent||upsell.priceline.accept||salesforce:opportunity:0061a00000ABC||1716333440000)",
"payload_hash": "sha256:9c2f...8e21",
"signature": "ed25519:11a4...e802",
"timestamp_ms": 1716333440000,
"jurisdiction": "US-DE",
"direction": "OUTBOUND",
"verification_status": "VERIFIED",
"settlement_tx_hash": "0x9b14...7c2a",
"settlement_block": 18244912,
"settlement_amount_micro": 5000,
"settlement_chain": "base-mainnet",
"settlement_token": "USDC",
"settled_at": "2026-05-21T19:57:20Z"
}
06Verification
Verify settlement on Base from the receipt
# Pull the on-chain proof
curl -sS "https://api.basescan.org/api?module=transaction&action=gettxinfo&txhash=0x9b14...7c2a" | jq
# Cross-check the receipt + tx are bound to the same action_ref
curl -sS https://hivemorph.onrender.com/v1/verify \
-H 'content-type: application/json' \
--data-binary @receipt.json | jq
# expected: {"verified":true,"settlement_bound":true,"micro_usdc_match":true}
07Economics
| Per-call cost | 0.005 USDC (sub-cent) — set by the vendor, paid on chain |
| Hive take | 0% on Nano settlements |
| Buyer cost | Base gas only (~$0.0003) |
| No invoice | AP reconciles against tx hash, not against an invoice PDF |
| Throughput | Bound only by Base block time (~2s) and Salesforce DML limits |
| Currency support | USDC, EURC, PYUSD, USDS (extensible) |
08Compliance and audit shape
- Stablecoin transfer is wallet-to-wallet on Base; no third-party custodian touches funds.
- Settlement_Tx_Hash__c is the immutable on-chain reference. Reconciles to BaseScan without manual matching.
- Receipt + tx_hash are bound to the same action_ref — a regulator can prove the value and the consent are one record.
09Trust anchors
Every claim on this page is verifiable against these public constants. No login. No NDA.
| Rail | NANO — on-chain USDC on Base |
| Hive Ed25519 pubkey | fd9d10abe60de7510c61ef649c8da598a519468dd2a2b827106d76487a899444 |
| Canonicalization | RFC 8785 JCS over the JSON receipt body |
| Signature algorithm | Ed25519 (RFC 8032) |
| Backend root | https://hivemorph.onrender.com |
| Verify any receipt | thehiveryiq.com/verify |
| MIT starter | thehiveryiq.com/salesforce/install |
| Chain | Base (Ethereum L2, chain id 8453) |
| USDC contract | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 |
| Hive treasury wallet | 0x15184Bf50B3d3F52b60434f8942b7D52F2eB436E |
| Builder split | 80% publisher / 20% Hive, enforced at the rail on the same transaction |