buy_credits_x402
MOVES MONEY: buy a project's credits by paying in stablecoin over x402. Call once without x402_payment to receive the payment requirements (returned as an error result containing the x402 PaymentRequired object), sign them with your wallet, then call again passing the base64 payment payload as x402_payment. Requires no API key — the payment is the credential — and costs no CRD.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| credits | Yes | How many credits to buy (within the project's min/max) | |
| buyer_id | No | Identifier to credit (defaults to your paying wallet address) | |
| buyer_name | No | Display name for the buyer record | |
| project_id | Yes | Project selling the credits | |
| buyer_email | No | Email to attach to the buyer record | |
| x402_payment | No | Base64-encoded x402 PaymentPayload signed by your wallet | |
| credit_type_id | No | Credit type to buy (defaults to the project's x402 credit type) |