Tutorial — Payments
Pay with Visa TAP
Visa's Trusted Agent Protocol gives a human-issued mandate authorizing an agent to spend on their card. The mandate is issued out-of-band on Visa's side; Tenzro takes the resulting payment credential and settles through its payment gateway, recording the receipt for audit.
- Level
- Intermediate
- Time
- ~20 min
- Prerequisites
- Visa TAP credentials, delegated machine DID
- Stack
- TypeScript
01
Acquire a TAP credential out-of-band
Visa issues the mandate and the resulting payment credential — that's outside the Tenzro flow. Once you have a signed credential, the Tenzro node will accept it.
// credential payload comes from Visa TAP's mandate issuance flow.
const credential = {
mandate_id: "tap_mandate_...",
merchant: "merch_abc",
amount: "42.00",
currency: "USD",
signature: "..."
};02
Submit the credential through the Tenzro gateway
The node verifies the TAP credential against the configured mandate registry and dispatches the card-rail settlement.
import { TenzroClient } from "tenzro-sdk";
const client = new TenzroClient({ endpoint: "https://rpc.tenzro.network" });
const receipt = await client.payment.payVisaTap(credential);
console.log("settled:", receipt);03
Inspect the settlement
The settlement engine writes the card-rail clear into CF_SETTLEMENTS for audit. Look it up by receipt ID.
const entry = await client.settlement.getSettlement(receipt.receipt_id);
console.log(entry);04
Audit the gateway protocol set
The gateway info call confirms which payment protocols are live on the connected node.
const info = await client.payment.gatewayInfo();
console.log(info);Related