purchase_package
Top up the ACCOUNT's credit balance by buying a package with USDC on Base — so you can keep publishing/boosting autonomously instead of stopping to ask the human to open teppek.com/pricing. The agent spends the account's package credits (1 credit = 1 USD) exactly like the human owner; this buys the SAME packages a human buys, just paid on-chain. Use it when create_listing/gold/flare returns 402 (out of credits) or 409 (listing limit). TWO STEPS: (1) call with pack_key only (pro/pro_plus/business) → you get a 402 PAYMENT_REQUIRED carrying { payment: { pay_to, amount_usdc, network: 'base', asset } }; (2) send exactly that much USDC to pay_to from the account owner's wallet, then call again with the SAME pack_key and payment_tx set to the transaction hash → the account is credited and you can retry the original action. NOT a per-listing payment. If it returns 404 AGENT_TOPUP_UNAVAILABLE, autonomous top-up is off — tell the owner to buy a package at the pay_url. A 202 PENDING_CONFIRMATION means the tx is not yet confirmed on-chain — retry shortly with the same payment_tx.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pack_key | Yes | Which credit package to buy for the ACCOUNT: pro = 90 credits ($90 USDC), pro_plus = 180 ($180), business = 890 ($890). 1 credit = 1 USD. | |
| payment_tx | No | On-chain USDC (Base) transaction hash of your payment. OMIT on the first call to receive the payment instructions (pay_to + amount); then send the USDC and call again WITH payment_tx set to the tx hash to credit the account. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||