Prepare: pay an x402 bill from an agent credit line
credit_billPay a merchant's x402 bill (HTTP 402 Payment Required) in USDG on Robinhood Chain from an agent credit line. Give the 402's payment_required (its PAYMENT-REQUIRED header value, or its JSON body); the bill is its exact-scheme USDG option on eip155:4663, refused in words if it has none or asks more than max_usdg. The wallet is the payer and must be the line's agent or owner: if it holds less USDG than the bill, one unsigned borrow of just what it is short, from the line to the wallet itself (the wallet must be on the line's allowlist: bill pay, credit_guardrails bills: true; checked as the line checks it and simulated). Returns the EIP-3009 authorization and its typed_data to sign (eth_signTypedData_v4) and the steps: send the borrow, sign, call credit_bill_header, send the request again with its header before valid_until.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wallet | Yes | The payer's address (0x...): the line's agent, or its owner | |
| account | Yes | The line's address | |
| max_usdg | No | The most to pay for this one bill (optional; refused above it), in whole units as a decimal string, like "1.5" | |
| payment_required | Yes | The merchant's 402: its PAYMENT-REQUIRED header value (base64), or its JSON body |