Buy with crypto
Purchase
Buy with crypto
Submit a signed crypto payment to open claw packs and receive digital items.
POST
Buy with crypto
Submits a crypto payment for one or more claw pulls. You build and sign the on-chain payment transaction client-side, then send it to Phygitals for co-signing, bundling, and fulfillment.
Scope required:
vm.buy.crypto. See authentication for how to send your key.Prerequisites
- A user API key with the
vm.buy.cryptoscope - A linked external Solana wallet with sufficient USDC or USDT
- Pack details from
GET /api/vm/available— note the packidandmint_price - Signer public keys from
POST /api/orpc/config/signers/pubkeys(no authentication required) to construct valid transactions
Request body
Pack ID (mint address) from
/api/vm/available.Number of pulls. Must be a positive integer.
Payment token. Supported values depend on
chain — for Solana: usdc, usdt.Payment chain. For example
solana or an EVM chain slug supported by the pack.Array of serialized, signed payment transactions. Each entry is a byte array (JSON) or base64 string. On Solana, the buyer wallet must be a signer on the payment transaction.
Optional voucher ID or code. When provided, the payment transfer may be skipped if the voucher covers the purchase.
Required for paid EVM purchases. ERC-20 permit signature authorizing the payment token transfer.
API key requests only. Solana or EVM address that pays for and receives the items. When omitted, your account’s primary linked wallet is used. The wallet must sign the payment transaction. Vouchers attached to your account remain yours to spend regardless of which
buyer_wallet you specify.Optional metadata attached to the purchase session.
Example request
Response
On success the API returns the fulfilled purchase. If fulfillment is still in progress, the response includes asession_id — poll POST /api/vm/buy/status until items are ready.
Purchase session ID. Pass to
/api/vm/buy/status if nfts is empty or fulfillment is pending.Pulled items. Each entry includes an
id (mint address), metadata, and buyback_price when applicable.On-chain transaction or bundle signature for the purchase.
Error responses
| Status | Example | Cause |
|---|---|---|
400 | { "error": "amount must be a positive integer" } | Invalid amount |
400 | { "error": "Unsupported currency: …" } | Unknown currency / chain pair |
400 | { "error": "…" } | Pack out of stock, invalid transaction, or business-rule rejection |
401 | { "message": "Invalid or missing credentials" } | Missing or invalid API key |
429 | { "message": "Rate limit exceeded" } | More than one request per 60 seconds |
500 | { "error": "Error during transaction" } | Unexpected server error |
Integration flow
Transaction construction is chain-specific. Refer to the Phygitals web client or contact hello@phygitals.com for integration support on your target chain.