How your agent pays for each call
Your agent pays for the data it uses one call at a time, in USDC, from its own wallet. Nothing is a subscription and nothing is bought in advance. A call that fails is not charged.
What a service costs
Each service is priced for the work it does, and every service's current price is on the Services page. Your automation's page lists, in order, what a run may buy and what each step costs. After a run, the Runs page shows each purchase, what it cost and the transaction behind it.
How a call is paid, step by step
PortMula uses x402, an open protocol that puts HTTP status 402, "Payment Required", to work as a real payment handshake. A call goes like this:
- Your agent asks the service for its data with no payment attached.
- The service answers 402 with its terms: the price, the asset, the address to pay and the network.
- Your agent checks those terms against its own settings. If they name another network, another asset or an address that is not PortMula's, it refuses to sign anything.
- It builds an Algorand payment for exactly those terms and signs it with your provisioned agent wallet, the one PortMula created for your agent and holds the key to, encrypted, so it can pay while you are away. A wallet you connect yourself, such as Pera, is never used to pay for a service.
- It asks again with the signed payment attached. The service checks that the payment matches the terms it just quoted, to the last unit, and then does the work.
- The payment settles only if the work succeeded.
A failed call does not charge you
The payment settles only after the service has answered successfully. If the service refuses the request, hits an error or is down, the payment is never settled, so you are not charged and an outage costs you nothing but the wait. Your agent is told plainly that nothing was charged.
In the rare case where your agent signed a payment and never heard back, it cannot know whether the payment went through, so it tells you exactly that rather than guessing either way.
How the network is checked before your agent pays
Before a price is ever quoted, PortMula checks that the network named in the terms is the chain it is actually connected to. The network is named by the chain's genesis hash, a fingerprint unique to each Algorand network, rather than by a label. If they disagree, no price is quoted at all, and your agent separately refuses terms for any network but its own.