HTTP status codes
The Laso Finance API uses standard HTTP status codes. Here’s what each means and how to handle it.402 Payment Required
This is the normal x402 flow — not an error. The server is telling you the price and how to pay.x402-axios), this is handled automatically. The client reads the payment details, constructs a payment, and replays the request.
400 Bad Request
Invalid or missing parameters.- Missing
amountquery parameter on/get-cardor/send-payment - Amount below $5 or above $1,000
- Missing
grant_typeorrefresh_tokeninPOST /authrequest body - Invalid
formatparameter (must bejsonorhtml) - Missing
platformorrecipient_idon/send-payment
401 Unauthorized
Token is missing, expired, or invalid.id_tokenhas expired (tokens last ~1 hour)- Malformed
Authorizationheader - Using a revoked refresh token
POST /auth with grant_type: "refresh_token". If that also returns 401, re-authenticate via GET /auth.
403 Forbidden
You’re authenticated but not authorized for this resource.- Trying to access a card that belongs to a different user
- Using a token from one wallet to access another wallet’s data
404 Not Found
The requested resource doesn’t exist.- Invalid
card_idin/get-card-data - Typo in the card ID
card_id from the original /get-card response.