{"openapi":"3.1.0","info":{"title":"Muny API","version":"1.0.0","description":"The payout API for $MUNY on Solana. Authenticate with `Authorization: Bearer <api key | access token>`. Amounts are decimal strings. All payout creation requires an idempotency key."},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"API key (mk_test_…/mk_live_…) or user access token"}},"schemas":{}},"paths":{"/health":{"get":{"summary":"Liveness","tags":["System"],"security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded"]},"network":{"type":"string"},"driver":{"type":"string"},"version":{"type":"string"},"checks":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","enum":["ok","fail"]}}},"required":["status","network","driver","version"],"additionalProperties":false}}}}}}},"/ready":{"get":{"summary":"Readiness (database + redis)","tags":["System"],"security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded"]},"network":{"type":"string"},"driver":{"type":"string"},"version":{"type":"string"},"checks":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","enum":["ok","fail"]}}},"required":["status","network","driver","version"],"additionalProperties":false}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok","degraded"]},"network":{"type":"string"},"driver":{"type":"string"},"version":{"type":"string"},"checks":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string","enum":["ok","fail"]}}},"required":["status","network","driver","version"],"additionalProperties":false}}}}}}},"/v1/chain":{"get":{"summary":"Active Solana network and $MUNY token configuration","tags":["System"],"security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["chain"]},"network":{"type":"string"},"driver":{"type":"string","enum":["mock","rpc"]},"token":{"type":"object","properties":{"symbol":{"type":"string"},"decimals":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"mint":{"type":"string"}},"required":["symbol","decimals","mint"],"additionalProperties":false},"explorer_base_url":{"type":"string"},"fee_sponsorship":{"type":"boolean"}},"required":["object","network","driver","token","explorer_base_url","fee_sponsorship"],"additionalProperties":false}}}}}}},"/v1/prices/muny":{"get":{"summary":"Indicative MUNY/USD price (display only)","tags":["System"],"security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["price"]},"token":{"type":"string"},"usd":{"type":"string"},"source":{"type":"string"},"as_of":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["object","token","usd","source","as_of"],"additionalProperties":false}}}}}}},"/v1/auth/register":{"post":{"summary":"Create an account (optionally with a business organization)","tags":["Auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"password":{"type":"string","minLength":10,"maxLength":200},"name":{"type":"string","minLength":1,"maxLength":120},"organization_name":{"type":"string","minLength":2,"maxLength":120},"device":{"type":"object","properties":{"platform":{"type":"string","enum":["ios","android","web"]},"device_name":{"type":"string","maxLength":120},"app_version":{"type":"string","maxLength":40}},"required":["platform"],"description":"Optional device descriptor. Mobile clients send this so the session is bound to a registered device."}},"required":["email","password","name"]}}}},"security":[],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"token_type":{"type":"string","enum":["Bearer"]},"access_token":{"type":"string"},"expires_in":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Access token lifetime in seconds"},"refresh_token":{"type":"string"},"refresh_expires_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"session_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["user"]},"email":{"type":"string"},"name":{"type":"string"},"avatar_url":{"type":["string","null"]},"email_verified":{"type":"boolean"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","email","name","avatar_url","email_verified","created_at"],"additionalProperties":false}},"required":["token_type","access_token","expires_in","refresh_token","refresh_expires_at","session_id","user"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/auth/login":{"post":{"summary":"Sign in with email and password","tags":["Auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"password":{"type":"string","minLength":1,"maxLength":200},"device":{"type":"object","properties":{"platform":{"type":"string","enum":["ios","android","web"]},"device_name":{"type":"string","maxLength":120},"app_version":{"type":"string","maxLength":40}},"required":["platform"],"description":"Optional device descriptor. Mobile clients send this so the session is bound to a registered device."}},"required":["email","password"]}}}},"security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"token_type":{"type":"string","enum":["Bearer"]},"access_token":{"type":"string"},"expires_in":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Access token lifetime in seconds"},"refresh_token":{"type":"string"},"refresh_expires_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"session_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["user"]},"email":{"type":"string"},"name":{"type":"string"},"avatar_url":{"type":["string","null"]},"email_verified":{"type":"boolean"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","email","name","avatar_url","email_verified","created_at"],"additionalProperties":false}},"required":["token_type","access_token","expires_in","refresh_token","refresh_expires_at","session_id","user"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/auth/refresh":{"post":{"summary":"Rotate a refresh token","tags":["Auth"],"description":"Returns a new access + refresh token pair. Each refresh token is single-use; reuse revokes the session family.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"refresh_token":{"type":"string","minLength":20}},"required":["refresh_token"]}}}},"security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"token_type":{"type":"string","enum":["Bearer"]},"access_token":{"type":"string"},"expires_in":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Access token lifetime in seconds"},"refresh_token":{"type":"string"},"refresh_expires_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"session_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["user"]},"email":{"type":"string"},"name":{"type":"string"},"avatar_url":{"type":["string","null"]},"email_verified":{"type":"boolean"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","email","name","avatar_url","email_verified","created_at"],"additionalProperties":false}},"required":["token_type","access_token","expires_in","refresh_token","refresh_expires_at","session_id","user"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/auth/logout":{"post":{"summary":"Revoke the current session","tags":["Auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"refresh_token":{"type":"string","minLength":20}}}}}},"responses":{"204":{"description":"Default Response"},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/auth/verify-email":{"post":{"summary":"Confirm an email address from the emailed link","tags":["Auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":20}},"required":["token"]}}}},"security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"verified":{"type":"boolean","enum":[true]},"email":{"type":"string"}},"required":["verified","email"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/auth/magic-link":{"post":{"summary":"Email a one-time sign-in link","tags":["Auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["email"]}}}},"security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"sent":{"type":"boolean","enum":[true]},"dev_token":{"type":"string"}},"required":["sent"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/auth/magic-link/verify":{"post":{"summary":"Exchange a magic-link token for a session","tags":["Auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":20},"device":{"type":"object","properties":{"platform":{"type":"string","enum":["ios","android","web"]},"device_name":{"type":"string","maxLength":120},"app_version":{"type":"string","maxLength":40}},"required":["platform"],"description":"Optional device descriptor. Mobile clients send this so the session is bound to a registered device."}},"required":["token"]}}}},"security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"token_type":{"type":"string","enum":["Bearer"]},"access_token":{"type":"string"},"expires_in":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Access token lifetime in seconds"},"refresh_token":{"type":"string"},"refresh_expires_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"session_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["user"]},"email":{"type":"string"},"name":{"type":"string"},"avatar_url":{"type":["string","null"]},"email_verified":{"type":"boolean"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","email","name","avatar_url","email_verified","created_at"],"additionalProperties":false}},"required":["token_type","access_token","expires_in","refresh_token","refresh_expires_at","session_id","user"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/me":{"get":{"summary":"Current user and organization memberships","tags":["Account"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["user"]},"email":{"type":"string"},"name":{"type":"string"},"avatar_url":{"type":["string","null"]},"email_verified":{"type":"boolean"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","email","name","avatar_url","email_verified","created_at"],"additionalProperties":false},"memberships":{"type":"array","items":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["organization"]},"name":{"type":"string"},"slug":{"type":"string"},"require_approval":{"type":"boolean"},"approval_threshold":{"type":["string","null"]},"max_payout_amount":{"type":"string"},"daily_payout_limit":{"type":"string"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","name","slug","require_approval","approval_threshold","max_payout_amount","daily_payout_limit","created_at"],"additionalProperties":false},"role":{"type":"string","enum":["owner","admin","developer","finance","viewer"]},"permissions":{"type":"array","items":{"type":"string","enum":["manage_organization","manage_team","manage_api_keys","manage_wallets","manage_recipients","create_payout","approve_payout","view_payouts","manage_webhooks","view_analytics","view_audit_log","view_payments","create_payments","refund_payments","manage_payment_settings"]}}},"required":["organization","role","permissions"],"additionalProperties":false}}},"required":["user","memberships"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete my account","tags":["Account"],"description":"Permanently deletes the signed-in user's account: signs out every device, removes devices and notifications, archives wallets and anonymizes personal data. Requires the password (or confirm: \"DELETE\" for password-less accounts). Organization owners must transfer ownership first. Self-custodied wallet keys live on the user's device and are not affected.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","maxLength":200},"confirm":{"type":"string","enum":["DELETE"]}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"summary":"Update profile","tags":["Account"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"avatar_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["user"]},"email":{"type":"string"},"name":{"type":"string"},"avatar_url":{"type":["string","null"]},"email_verified":{"type":"boolean"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","email","name","avatar_url","email_verified","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/me/verify-email/resend":{"post":{"summary":"Resend the email confirmation link","tags":["Account"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"sent":{"type":"boolean"},"reason":{"type":"string","enum":["already_verified","rate_limited"]}},"required":["sent"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/me/sessions":{"get":{"summary":"Active sessions","tags":["Account"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["session"]},"device_id":{"type":["string","null"]},"platform":{"type":["string","null"]},"user_agent":{"type":["string","null"]},"ip":{"type":["string","null"]},"current":{"type":"boolean"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"last_used_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"expires_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","device_id","platform","user_agent","ip","current","created_at","last_used_at","expires_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/me/sessions/{id}":{"delete":{"summary":"Revoke a session (sign out a device)","tags":["Account"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"Default Response"},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/devices":{"post":{"summary":"Register or refresh this device (push token, app version)","tags":["Devices"],"description":"Idempotent per push token. Mobile apps call this after sign-in and whenever the push token changes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"platform":{"type":"string","enum":["ios","android","web"]},"device_name":{"type":"string","maxLength":120},"app_version":{"type":"string","maxLength":40},"push_token":{"description":"APNs / FCM / Expo push token","type":"string","maxLength":4096},"push_provider":{"type":"string","enum":["apns","fcm","expo"]}},"required":["platform"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["device"]},"platform":{"type":"string","enum":["ios","android","web"]},"device_name":{"type":["string","null"]},"app_version":{"type":["string","null"]},"push_enabled":{"type":"boolean"},"last_seen_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","platform","device_name","app_version","push_enabled","last_seen_at","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"summary":"List devices","tags":["Devices"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["device"]},"platform":{"type":"string","enum":["ios","android","web"]},"device_name":{"type":["string","null"]},"app_version":{"type":["string","null"]},"push_enabled":{"type":"boolean"},"last_seen_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","platform","device_name","app_version","push_enabled","last_seen_at","created_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/devices/{id}":{"patch":{"summary":"Update a device","tags":["Devices"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"platform":{"type":"string","enum":["ios","android","web"]},"device_name":{"type":"string","maxLength":120},"app_version":{"type":"string","maxLength":40},"push_token":{"description":"APNs / FCM / Expo push token","type":"string","maxLength":4096},"push_provider":{"type":"string","enum":["apns","fcm","expo"]}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["device"]},"platform":{"type":"string","enum":["ios","android","web"]},"device_name":{"type":["string","null"]},"app_version":{"type":["string","null"]},"push_enabled":{"type":"boolean"},"last_seen_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","platform","device_name","app_version","push_enabled","last_seen_at","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove a device and sign it out","tags":["Devices"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"Default Response"},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/notifications":{"get":{"summary":"In-app notifications","tags":["Notifications"],"parameters":[{"schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"unread","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["notification"]},"type":{"type":"string","enum":["payout_received","payout_confirmed","payout_failed","deposit_received","security_alert","payment_received","refund_confirmed"]},"title":{"type":"string"},"body":{"type":"string"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"read_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","type","title","body","data","read_at","created_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]},"unread_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["object","data","has_more","next_cursor","unread_count"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/notifications/{id}/read":{"post":{"summary":"Mark as read","tags":["Notifications"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["notification"]},"type":{"type":"string","enum":["payout_received","payout_confirmed","payout_failed","deposit_received","security_alert","payment_received","refund_confirmed"]},"title":{"type":"string"},"body":{"type":"string"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"read_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","type","title","body","data","read_at","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/notifications/read-all":{"post":{"summary":"Mark all as read","tags":["Notifications"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"updated":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["updated"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/transfers/prepare":{"post":{"summary":"Prepare a fee-sponsored MUNY transfer for client signing","tags":["Transactions"],"description":"Returns a transaction whose network fee is paid by Muny. Sign it with the sending wallet and POST it to /v1/transfers/submit.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"recipient":{"type":"string","description":"Base58 Solana address","example":"7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"},"amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"},"reference":{"description":"Solana Pay reference key from a scanned QR / Muny checkout. Embedded in the transfer so the merchant can verify the payment.","type":"string","example":"7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"},"memo":{"description":"Public on-chain memo (never put personal data here)","type":"string","maxLength":120},"idempotency_key":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7e]+$"}},"required":["wallet_id","recipient","amount"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["prepared_transfer"]},"transfer_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transaction":{"type":"string","description":"Base64 serialized transaction. Fee payer is Muny; sign with the wallet and submit."},"fee_payer":{"type":"string"},"fee_sponsored":{"type":"boolean"},"expires_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["object","transfer_id","transaction","fee_payer","fee_sponsored","expires_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/transfers/submit":{"post":{"summary":"Submit a signed sponsored transfer","tags":["Transactions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"transfer_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"signed_transaction":{"type":"string","minLength":10,"description":"Base64 transaction signed by the sending wallet"}},"required":["transfer_id","signed_transaction"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["transaction"]},"kind":{"type":"string","enum":["payout","transfer","deposit","payment","refund"]},"status":{"type":"string","enum":["pending","submitted","confirmed","finalized","failed"]},"signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"network":{"type":"string"},"from_address":{"type":["string","null"]},"to_address":{"type":"string"},"amount":{"type":"string"},"token":{"type":"string"},"fee_lamports":{"type":["string","null"]},"fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"slot":{"type":["string","null"]},"error":{"type":["string","null"]},"payout_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"direction":{"type":"string","enum":["in","out"]},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","kind","status","signature","explorer_url","network","from_address","to_address","amount","token","fee_lamports","fee_sol","fee_sponsored","slot","error","payout_id","submitted_at","confirmed_at","finalized_at","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/organizations":{"post":{"summary":"Create a business organization (you become owner)","tags":["Organizations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120}},"required":["name"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["organization"]},"name":{"type":"string"},"slug":{"type":"string"},"require_approval":{"type":"boolean"},"approval_threshold":{"type":["string","null"]},"max_payout_amount":{"type":"string"},"daily_payout_limit":{"type":"string"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","name","slug","require_approval","approval_threshold","max_payout_amount","daily_payout_limit","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/organization":{"get":{"summary":"Current organization","tags":["Organizations"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["organization"]},"name":{"type":"string"},"slug":{"type":"string"},"require_approval":{"type":"boolean"},"approval_threshold":{"type":["string","null"]},"max_payout_amount":{"type":"string"},"daily_payout_limit":{"type":"string"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","name","slug","require_approval","approval_threshold","max_payout_amount","daily_payout_limit","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"summary":"Update organization name and payout policy","tags":["Organizations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"require_approval":{"type":"boolean"},"approval_threshold":{"anyOf":[{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"},{"type":"null"}]},"max_payout_amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"},"daily_payout_limit":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["organization"]},"name":{"type":"string"},"slug":{"type":"string"},"require_approval":{"type":"boolean"},"approval_threshold":{"type":["string","null"]},"max_payout_amount":{"type":"string"},"daily_payout_limit":{"type":"string"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","name","slug","require_approval","approval_threshold","max_payout_amount","daily_payout_limit","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/members":{"get":{"summary":"Team members","tags":["Organizations"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["member"]},"user_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","developer","finance","viewer"]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","user_id","name","email","role","created_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/members/{id}":{"patch":{"summary":"Change a member's role","tags":["Organizations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","developer","finance","viewer"]}},"required":["role"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["member"]},"user_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","developer","finance","viewer"]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","user_id","name","email","role","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"summary":"Remove a member","tags":["Organizations"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"Default Response"},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/invitations":{"post":{"summary":"Invite a team member","tags":["Organizations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string","enum":["owner","admin","developer","finance","viewer"]}},"required":["email","role"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["invitation"]},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","developer","finance","viewer"]},"invited_by":{"type":["string","null"]},"expires_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"accepted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"accept_url":{"type":"string"}},"required":["id","object","email","role","invited_by","expires_at","accepted_at","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"summary":"Pending invitations","tags":["Organizations"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["invitation"]},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","developer","finance","viewer"]},"invited_by":{"type":["string","null"]},"expires_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"accepted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"accept_url":{"type":"string"}},"required":["id","object","email","role","invited_by","expires_at","accepted_at","created_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/invitations/{id}":{"delete":{"summary":"Revoke an invitation","tags":["Organizations"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"Default Response"},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/invitations/accept":{"post":{"summary":"Accept an invitation as the signed-in user","tags":["Organizations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":20}},"required":["token"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["organization"]},"name":{"type":"string"},"slug":{"type":"string"},"require_approval":{"type":"boolean"},"approval_threshold":{"type":["string","null"]},"max_payout_amount":{"type":"string"},"daily_payout_limit":{"type":"string"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","name","slug","require_approval","approval_threshold","max_payout_amount","daily_payout_limit","created_at"],"additionalProperties":false},"role":{"type":"string","enum":["owner","admin","developer","finance","viewer"]}},"required":["organization","role"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/wallets":{"get":{"summary":"List wallets","tags":["Wallets"],"parameters":[{"schema":{"type":"string","enum":["organization","personal"]},"in":"query","name":"scope","required":false,"description":"Defaults to organization when an organization is selected, else personal"},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"include_balances","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["wallet"]},"label":{"type":"string"},"address":{"type":"string"},"type":{"type":"string","enum":["external","managed","embedded"]},"provider":{"type":"string"},"status":{"type":"string","enum":["active","archived"]},"is_default":{"type":"boolean"},"owner_type":{"type":"string","enum":["organization","user"]},"can_sign":{"type":"boolean","description":"Whether Muny can submit payouts from this wallet (managed/embedded custody)"},"balance":{"anyOf":[{"type":"object","properties":{"object":{"type":"string","enum":["balance"]},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"address":{"type":"string"},"token":{"type":"string"},"mint":{"type":"string"},"amount":{"type":"string"},"amount_raw":{"type":"string"},"decimals":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sol":{"type":"string","description":"SOL balance available for network fees (informational; fees are usually sponsored)"},"usd_estimate":{"type":["string","null"]},"price_usd":{"type":["string","null"]},"price_source":{"type":["string","null"]},"as_of":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["object","wallet_id","address","token","mint","amount","amount_raw","decimals","sol","usd_estimate","price_usd","price_source","as_of"],"additionalProperties":false},{"type":"null"}]},"last_activity_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","label","address","type","provider","status","is_default","owner_type","can_sign","balance","last_activity_at","created_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"summary":"Add an external wallet or create a managed wallet","tags":["Wallets"],"description":"external: watch-only address you control. managed: custody provider-backed wallet Muny can send payouts from.","requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["external"]},"label":{"type":"string","minLength":1,"maxLength":80},"address":{"type":"string","description":"Base58 Solana address","example":"7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"}},"required":["type","label","address"]},{"type":"object","properties":{"type":{"type":"string","enum":["managed"]},"label":{"type":"string","minLength":1,"maxLength":80}},"required":["type","label"]}]}}}},"parameters":[{"schema":{"type":"string","enum":["organization","personal"]},"in":"query","name":"scope","required":false}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["wallet"]},"label":{"type":"string"},"address":{"type":"string"},"type":{"type":"string","enum":["external","managed","embedded"]},"provider":{"type":"string"},"status":{"type":"string","enum":["active","archived"]},"is_default":{"type":"boolean"},"owner_type":{"type":"string","enum":["organization","user"]},"can_sign":{"type":"boolean","description":"Whether Muny can submit payouts from this wallet (managed/embedded custody)"},"balance":{"anyOf":[{"type":"object","properties":{"object":{"type":"string","enum":["balance"]},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"address":{"type":"string"},"token":{"type":"string"},"mint":{"type":"string"},"amount":{"type":"string"},"amount_raw":{"type":"string"},"decimals":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sol":{"type":"string","description":"SOL balance available for network fees (informational; fees are usually sponsored)"},"usd_estimate":{"type":["string","null"]},"price_usd":{"type":["string","null"]},"price_source":{"type":["string","null"]},"as_of":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["object","wallet_id","address","token","mint","amount","amount_raw","decimals","sol","usd_estimate","price_usd","price_source","as_of"],"additionalProperties":false},{"type":"null"}]},"last_activity_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","label","address","type","provider","status","is_default","owner_type","can_sign","balance","last_activity_at","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/wallets/{id}":{"get":{"summary":"Retrieve a wallet","tags":["Wallets"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["wallet"]},"label":{"type":"string"},"address":{"type":"string"},"type":{"type":"string","enum":["external","managed","embedded"]},"provider":{"type":"string"},"status":{"type":"string","enum":["active","archived"]},"is_default":{"type":"boolean"},"owner_type":{"type":"string","enum":["organization","user"]},"can_sign":{"type":"boolean","description":"Whether Muny can submit payouts from this wallet (managed/embedded custody)"},"balance":{"anyOf":[{"type":"object","properties":{"object":{"type":"string","enum":["balance"]},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"address":{"type":"string"},"token":{"type":"string"},"mint":{"type":"string"},"amount":{"type":"string"},"amount_raw":{"type":"string"},"decimals":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sol":{"type":"string","description":"SOL balance available for network fees (informational; fees are usually sponsored)"},"usd_estimate":{"type":["string","null"]},"price_usd":{"type":["string","null"]},"price_source":{"type":["string","null"]},"as_of":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["object","wallet_id","address","token","mint","amount","amount_raw","decimals","sol","usd_estimate","price_usd","price_source","as_of"],"additionalProperties":false},{"type":"null"}]},"last_activity_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","label","address","type","provider","status","is_default","owner_type","can_sign","balance","last_activity_at","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"summary":"Rename, set default or archive","tags":["Wallets"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":80},"is_default":{"type":"boolean","enum":[true]},"status":{"type":"string","enum":["active","archived"]}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["wallet"]},"label":{"type":"string"},"address":{"type":"string"},"type":{"type":"string","enum":["external","managed","embedded"]},"provider":{"type":"string"},"status":{"type":"string","enum":["active","archived"]},"is_default":{"type":"boolean"},"owner_type":{"type":"string","enum":["organization","user"]},"can_sign":{"type":"boolean","description":"Whether Muny can submit payouts from this wallet (managed/embedded custody)"},"balance":{"anyOf":[{"type":"object","properties":{"object":{"type":"string","enum":["balance"]},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"address":{"type":"string"},"token":{"type":"string"},"mint":{"type":"string"},"amount":{"type":"string"},"amount_raw":{"type":"string"},"decimals":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sol":{"type":"string","description":"SOL balance available for network fees (informational; fees are usually sponsored)"},"usd_estimate":{"type":["string","null"]},"price_usd":{"type":["string","null"]},"price_source":{"type":["string","null"]},"as_of":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["object","wallet_id","address","token","mint","amount","amount_raw","decimals","sol","usd_estimate","price_usd","price_source","as_of"],"additionalProperties":false},{"type":"null"}]},"last_activity_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","label","address","type","provider","status","is_default","owner_type","can_sign","balance","last_activity_at","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/wallets/{id}/balance":{"get":{"summary":"Live MUNY and SOL balance","tags":["Wallets"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["balance"]},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"address":{"type":"string"},"token":{"type":"string"},"mint":{"type":"string"},"amount":{"type":"string"},"amount_raw":{"type":"string"},"decimals":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"sol":{"type":"string","description":"SOL balance available for network fees (informational; fees are usually sponsored)"},"usd_estimate":{"type":["string","null"]},"price_usd":{"type":["string","null"]},"price_source":{"type":["string","null"]},"as_of":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["object","wallet_id","address","token","mint","amount","amount_raw","decimals","sol","usd_estimate","price_usd","price_source","as_of"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/dev/faucet":{"post":{"summary":"Credit test MUNY to a wallet (localnet/devnet mock only)","tags":["Wallets"],"description":"Disabled on mainnet and with the RPC driver. Use it to fund demo wallets and trigger deposit detection.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"}},"required":["wallet_id","amount"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["transaction"]},"kind":{"type":"string","enum":["payout","transfer","deposit","payment","refund"]},"status":{"type":"string","enum":["pending","submitted","confirmed","finalized","failed"]},"signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"network":{"type":"string"},"from_address":{"type":["string","null"]},"to_address":{"type":"string"},"amount":{"type":"string"},"token":{"type":"string"},"fee_lamports":{"type":["string","null"]},"fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"slot":{"type":["string","null"]},"error":{"type":["string","null"]},"payout_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"direction":{"type":"string","enum":["in","out"]},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","kind","status","signature","explorer_url","network","from_address","to_address","amount","token","fee_lamports","fee_sol","fee_sponsored","slot","error","payout_id","submitted_at","confirmed_at","finalized_at","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/recipients":{"post":{"summary":"Create a recipient","tags":["Recipients"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"address":{"type":"string","description":"Base58 Solana address","example":"7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"external_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"tags":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[\\w\\- ]+$"}},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":500},"description":"Up to 20 string key/value pairs for your own use"}},"required":["name","address"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["recipient"]},"name":{"type":"string"},"address":{"type":"string"},"email":{"type":["string","null"]},"external_id":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"archived_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"total_paid":{"type":"string"},"payout_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","object","name","address","email","external_id","tags","metadata","archived_at","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"summary":"List and search recipients","tags":["Recipients"],"parameters":[{"schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","maxLength":120},"in":"query","name":"q","required":false},{"schema":{"type":"string","maxLength":40},"in":"query","name":"tag","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"include_archived","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["recipient"]},"name":{"type":"string"},"address":{"type":"string"},"email":{"type":["string","null"]},"external_id":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"archived_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"total_paid":{"type":"string"},"payout_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","object","name","address","email","external_id","tags","metadata","archived_at","created_at","updated_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/recipients/{id}":{"get":{"summary":"Retrieve a recipient","tags":["Recipients"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["recipient"]},"name":{"type":"string"},"address":{"type":"string"},"email":{"type":["string","null"]},"external_id":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"archived_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"total_paid":{"type":"string"},"payout_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","object","name","address","email","external_id","tags","metadata","archived_at","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a recipient","tags":["Recipients"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"address":{"type":"string","description":"Base58 Solana address","example":"7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"external_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"tags":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":40,"pattern":"^[\\w\\- ]+$"}},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":500},"description":"Up to 20 string key/value pairs for your own use"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["recipient"]},"name":{"type":"string"},"address":{"type":"string"},"email":{"type":["string","null"]},"external_id":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"archived_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"total_paid":{"type":"string"},"payout_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","object","name","address","email","external_id","tags","metadata","archived_at","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/recipients/{id}/archive":{"post":{"summary":"Archive a recipient","tags":["Recipients"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["recipient"]},"name":{"type":"string"},"address":{"type":"string"},"email":{"type":["string","null"]},"external_id":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"archived_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"total_paid":{"type":"string"},"payout_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","object","name","address","email","external_id","tags","metadata","archived_at","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/recipients/{id}/unarchive":{"post":{"summary":"Restore a recipient","tags":["Recipients"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["recipient"]},"name":{"type":"string"},"address":{"type":"string"},"email":{"type":["string","null"]},"external_id":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"archived_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"total_paid":{"type":"string"},"payout_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","object","name","address","email","external_id","tags","metadata","archived_at","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/recipients/import":{"post":{"summary":"Bulk import recipients from CSV","tags":["Recipients"],"description":"Columns: name, address (or recipient/wallet), email, external_id, tags (separated by ;). Rows with an existing external_id are updated.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string","minLength":1,"maxLength":5000000}},"required":["csv"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"updated":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"skipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"errors":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"message":{"type":"string"}},"required":["row","message"],"additionalProperties":false}}},"required":["created","updated","skipped","errors"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payouts":{"post":{"summary":"Create a payout","tags":["Payouts"],"description":"Sends MUNY to one Solana address. Requires an idempotency key (Idempotency-Key header or idempotency_key field): retrying with the same key returns the original payout and never pays twice. The response is returned as soon as the payout is queued; follow progress via webhooks or GET /v1/payouts/{id}.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"recipient":{"type":"string","description":"Base58 Solana address","example":"7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"},"recipient_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"},"token":{"default":"MUNY","description":"Only MUNY is supported in v1","type":"string","enum":["MUNY"]},"reference":{"type":"string","minLength":1,"maxLength":120},"wallet_id":{"description":"Funding wallet. Defaults to the organization's default wallet.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotency_key":{"description":"Required unless sent as the Idempotency-Key header. Retries with the same key never pay twice.","type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7e]+$"},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":500},"description":"Up to 20 string key/value pairs for your own use"},"draft":{"description":"Create without queueing. Submit later with POST /v1/payouts/{id}/submit.","type":"boolean"}},"required":["amount"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payout"]},"status":{"type":"string","enum":["draft","awaiting_approval","queued","processing","confirmed","failed","cancelled"]},"recipient":{"type":"string","description":"Recipient Solana address"},"recipient_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"recipient_name":{"type":["string","null"]},"amount":{"type":"string"},"token":{"type":"string"},"reference":{"type":["string","null"]},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"batch_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"idempotency_key":{"type":["string","null"]},"network_fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"transaction":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["transaction"]},"kind":{"type":"string","enum":["payout","transfer","deposit","payment","refund"]},"status":{"type":"string","enum":["pending","submitted","confirmed","finalized","failed"]},"signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"network":{"type":"string"},"from_address":{"type":["string","null"]},"to_address":{"type":"string"},"amount":{"type":"string"},"token":{"type":"string"},"fee_lamports":{"type":["string","null"]},"fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"slot":{"type":["string","null"]},"error":{"type":["string","null"]},"payout_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"direction":{"type":"string","enum":["in","out"]},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","kind","status","signature","explorer_url","network","from_address","to_address","amount","token","fee_lamports","fee_sol","fee_sponsored","slot","error","payout_id","submitted_at","confirmed_at","finalized_at","created_at"],"additionalProperties":false},{"type":"null"}]},"failure_code":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"approved_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"queued_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"processing_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"cancelled_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","status","recipient","recipient_id","recipient_name","amount","token","reference","wallet_id","batch_id","idempotency_key","network_fee_sol","fee_sponsored","transaction","failure_code","failure_message","attempts","metadata","created_by","created_at","approved_at","queued_at","processing_at","confirmed_at","failed_at","cancelled_at"],"additionalProperties":false}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payout"]},"status":{"type":"string","enum":["draft","awaiting_approval","queued","processing","confirmed","failed","cancelled"]},"recipient":{"type":"string","description":"Recipient Solana address"},"recipient_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"recipient_name":{"type":["string","null"]},"amount":{"type":"string"},"token":{"type":"string"},"reference":{"type":["string","null"]},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"batch_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"idempotency_key":{"type":["string","null"]},"network_fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"transaction":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["transaction"]},"kind":{"type":"string","enum":["payout","transfer","deposit","payment","refund"]},"status":{"type":"string","enum":["pending","submitted","confirmed","finalized","failed"]},"signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"network":{"type":"string"},"from_address":{"type":["string","null"]},"to_address":{"type":"string"},"amount":{"type":"string"},"token":{"type":"string"},"fee_lamports":{"type":["string","null"]},"fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"slot":{"type":["string","null"]},"error":{"type":["string","null"]},"payout_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"direction":{"type":"string","enum":["in","out"]},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","kind","status","signature","explorer_url","network","from_address","to_address","amount","token","fee_lamports","fee_sol","fee_sponsored","slot","error","payout_id","submitted_at","confirmed_at","finalized_at","created_at"],"additionalProperties":false},{"type":"null"}]},"failure_code":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"approved_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"queued_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"processing_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"cancelled_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","status","recipient","recipient_id","recipient_name","amount","token","reference","wallet_id","batch_id","idempotency_key","network_fee_sol","fee_sponsored","transaction","failure_code","failure_message","attempts","metadata","created_by","created_at","approved_at","queued_at","processing_at","confirmed_at","failed_at","cancelled_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"summary":"List payouts","tags":["Payouts"],"parameters":[{"schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["draft","awaiting_approval","queued","processing","confirmed","failed","cancelled"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"batch_id","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"recipient_id","required":false},{"schema":{"type":"string","maxLength":120},"in":"query","name":"q","required":false,"description":"Search reference, recipient name or address"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payout"]},"status":{"type":"string","enum":["draft","awaiting_approval","queued","processing","confirmed","failed","cancelled"]},"recipient":{"type":"string","description":"Recipient Solana address"},"recipient_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"recipient_name":{"type":["string","null"]},"amount":{"type":"string"},"token":{"type":"string"},"reference":{"type":["string","null"]},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"batch_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"idempotency_key":{"type":["string","null"]},"network_fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"transaction":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["transaction"]},"kind":{"type":"string","enum":["payout","transfer","deposit","payment","refund"]},"status":{"type":"string","enum":["pending","submitted","confirmed","finalized","failed"]},"signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"network":{"type":"string"},"from_address":{"type":["string","null"]},"to_address":{"type":"string"},"amount":{"type":"string"},"token":{"type":"string"},"fee_lamports":{"type":["string","null"]},"fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"slot":{"type":["string","null"]},"error":{"type":["string","null"]},"payout_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"direction":{"type":"string","enum":["in","out"]},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","kind","status","signature","explorer_url","network","from_address","to_address","amount","token","fee_lamports","fee_sol","fee_sponsored","slot","error","payout_id","submitted_at","confirmed_at","finalized_at","created_at"],"additionalProperties":false},{"type":"null"}]},"failure_code":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"approved_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"queued_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"processing_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"cancelled_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","status","recipient","recipient_id","recipient_name","amount","token","reference","wallet_id","batch_id","idempotency_key","network_fee_sol","fee_sponsored","transaction","failure_code","failure_message","attempts","metadata","created_by","created_at","approved_at","queued_at","processing_at","confirmed_at","failed_at","cancelled_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payouts/{id}":{"get":{"summary":"Retrieve a payout","tags":["Payouts"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payout"]},"status":{"type":"string","enum":["draft","awaiting_approval","queued","processing","confirmed","failed","cancelled"]},"recipient":{"type":"string","description":"Recipient Solana address"},"recipient_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"recipient_name":{"type":["string","null"]},"amount":{"type":"string"},"token":{"type":"string"},"reference":{"type":["string","null"]},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"batch_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"idempotency_key":{"type":["string","null"]},"network_fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"transaction":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["transaction"]},"kind":{"type":"string","enum":["payout","transfer","deposit","payment","refund"]},"status":{"type":"string","enum":["pending","submitted","confirmed","finalized","failed"]},"signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"network":{"type":"string"},"from_address":{"type":["string","null"]},"to_address":{"type":"string"},"amount":{"type":"string"},"token":{"type":"string"},"fee_lamports":{"type":["string","null"]},"fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"slot":{"type":["string","null"]},"error":{"type":["string","null"]},"payout_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"direction":{"type":"string","enum":["in","out"]},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","kind","status","signature","explorer_url","network","from_address","to_address","amount","token","fee_lamports","fee_sol","fee_sponsored","slot","error","payout_id","submitted_at","confirmed_at","finalized_at","created_at"],"additionalProperties":false},{"type":"null"}]},"failure_code":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"approved_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"queued_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"processing_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"cancelled_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","status","recipient","recipient_id","recipient_name","amount","token","reference","wallet_id","batch_id","idempotency_key","network_fee_sol","fee_sponsored","transaction","failure_code","failure_message","attempts","metadata","created_by","created_at","approved_at","queued_at","processing_at","confirmed_at","failed_at","cancelled_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payouts/{id}/submit":{"post":{"summary":"Submit a draft payout","tags":["Payouts"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payout"]},"status":{"type":"string","enum":["draft","awaiting_approval","queued","processing","confirmed","failed","cancelled"]},"recipient":{"type":"string","description":"Recipient Solana address"},"recipient_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"recipient_name":{"type":["string","null"]},"amount":{"type":"string"},"token":{"type":"string"},"reference":{"type":["string","null"]},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"batch_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"idempotency_key":{"type":["string","null"]},"network_fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"transaction":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["transaction"]},"kind":{"type":"string","enum":["payout","transfer","deposit","payment","refund"]},"status":{"type":"string","enum":["pending","submitted","confirmed","finalized","failed"]},"signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"network":{"type":"string"},"from_address":{"type":["string","null"]},"to_address":{"type":"string"},"amount":{"type":"string"},"token":{"type":"string"},"fee_lamports":{"type":["string","null"]},"fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"slot":{"type":["string","null"]},"error":{"type":["string","null"]},"payout_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"direction":{"type":"string","enum":["in","out"]},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","kind","status","signature","explorer_url","network","from_address","to_address","amount","token","fee_lamports","fee_sol","fee_sponsored","slot","error","payout_id","submitted_at","confirmed_at","finalized_at","created_at"],"additionalProperties":false},{"type":"null"}]},"failure_code":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"approved_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"queued_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"processing_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"cancelled_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","status","recipient","recipient_id","recipient_name","amount","token","reference","wallet_id","batch_id","idempotency_key","network_fee_sol","fee_sponsored","transaction","failure_code","failure_message","attempts","metadata","created_by","created_at","approved_at","queued_at","processing_at","confirmed_at","failed_at","cancelled_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payouts/{id}/approve":{"post":{"summary":"Approve a payout awaiting approval","tags":["Payouts"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payout"]},"status":{"type":"string","enum":["draft","awaiting_approval","queued","processing","confirmed","failed","cancelled"]},"recipient":{"type":"string","description":"Recipient Solana address"},"recipient_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"recipient_name":{"type":["string","null"]},"amount":{"type":"string"},"token":{"type":"string"},"reference":{"type":["string","null"]},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"batch_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"idempotency_key":{"type":["string","null"]},"network_fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"transaction":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["transaction"]},"kind":{"type":"string","enum":["payout","transfer","deposit","payment","refund"]},"status":{"type":"string","enum":["pending","submitted","confirmed","finalized","failed"]},"signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"network":{"type":"string"},"from_address":{"type":["string","null"]},"to_address":{"type":"string"},"amount":{"type":"string"},"token":{"type":"string"},"fee_lamports":{"type":["string","null"]},"fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"slot":{"type":["string","null"]},"error":{"type":["string","null"]},"payout_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"direction":{"type":"string","enum":["in","out"]},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","kind","status","signature","explorer_url","network","from_address","to_address","amount","token","fee_lamports","fee_sol","fee_sponsored","slot","error","payout_id","submitted_at","confirmed_at","finalized_at","created_at"],"additionalProperties":false},{"type":"null"}]},"failure_code":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"approved_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"queued_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"processing_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"cancelled_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","status","recipient","recipient_id","recipient_name","amount","token","reference","wallet_id","batch_id","idempotency_key","network_fee_sol","fee_sponsored","transaction","failure_code","failure_message","attempts","metadata","created_by","created_at","approved_at","queued_at","processing_at","confirmed_at","failed_at","cancelled_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payouts/{id}/cancel":{"post":{"summary":"Cancel a payout that has not started settling","tags":["Payouts"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payout"]},"status":{"type":"string","enum":["draft","awaiting_approval","queued","processing","confirmed","failed","cancelled"]},"recipient":{"type":"string","description":"Recipient Solana address"},"recipient_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"recipient_name":{"type":["string","null"]},"amount":{"type":"string"},"token":{"type":"string"},"reference":{"type":["string","null"]},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"batch_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"idempotency_key":{"type":["string","null"]},"network_fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"transaction":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["transaction"]},"kind":{"type":"string","enum":["payout","transfer","deposit","payment","refund"]},"status":{"type":"string","enum":["pending","submitted","confirmed","finalized","failed"]},"signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"network":{"type":"string"},"from_address":{"type":["string","null"]},"to_address":{"type":"string"},"amount":{"type":"string"},"token":{"type":"string"},"fee_lamports":{"type":["string","null"]},"fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"slot":{"type":["string","null"]},"error":{"type":["string","null"]},"payout_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"direction":{"type":"string","enum":["in","out"]},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","kind","status","signature","explorer_url","network","from_address","to_address","amount","token","fee_lamports","fee_sol","fee_sponsored","slot","error","payout_id","submitted_at","confirmed_at","finalized_at","created_at"],"additionalProperties":false},{"type":"null"}]},"failure_code":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"approved_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"queued_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"processing_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"cancelled_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","status","recipient","recipient_id","recipient_name","amount","token","reference","wallet_id","batch_id","idempotency_key","network_fee_sol","fee_sponsored","transaction","failure_code","failure_message","attempts","metadata","created_by","created_at","approved_at","queued_at","processing_at","confirmed_at","failed_at","cancelled_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payouts/{id}/retry":{"post":{"summary":"Retry a failed payout","tags":["Payouts"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payout"]},"status":{"type":"string","enum":["draft","awaiting_approval","queued","processing","confirmed","failed","cancelled"]},"recipient":{"type":"string","description":"Recipient Solana address"},"recipient_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"recipient_name":{"type":["string","null"]},"amount":{"type":"string"},"token":{"type":"string"},"reference":{"type":["string","null"]},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"batch_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"idempotency_key":{"type":["string","null"]},"network_fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"transaction":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["transaction"]},"kind":{"type":"string","enum":["payout","transfer","deposit","payment","refund"]},"status":{"type":"string","enum":["pending","submitted","confirmed","finalized","failed"]},"signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"network":{"type":"string"},"from_address":{"type":["string","null"]},"to_address":{"type":"string"},"amount":{"type":"string"},"token":{"type":"string"},"fee_lamports":{"type":["string","null"]},"fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"slot":{"type":["string","null"]},"error":{"type":["string","null"]},"payout_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"direction":{"type":"string","enum":["in","out"]},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","kind","status","signature","explorer_url","network","from_address","to_address","amount","token","fee_lamports","fee_sol","fee_sponsored","slot","error","payout_id","submitted_at","confirmed_at","finalized_at","created_at"],"additionalProperties":false},{"type":"null"}]},"failure_code":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"approved_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"queued_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"processing_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"cancelled_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","status","recipient","recipient_id","recipient_name","amount","token","reference","wallet_id","batch_id","idempotency_key","network_fee_sol","fee_sponsored","transaction","failure_code","failure_message","attempts","metadata","created_by","created_at","approved_at","queued_at","processing_at","confirmed_at","failed_at","cancelled_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payout-batches/validate":{"post":{"summary":"Parse and validate a payout CSV without creating anything","tags":["Payout batches"],"description":"Columns: recipient, amount, reference, email (optional), name (optional). Returns row-level errors, warnings and totals.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"csv":{"type":"string","minLength":1,"maxLength":10000000}},"required":["csv"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"array","items":{"type":"object","properties":{"row":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"recipient":{"type":"string"},"amount":{"type":"string"},"reference":{"type":["string","null"]},"email":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["row","recipient","amount","reference","email","name"],"additionalProperties":false}},"errors":{"type":"array","items":{"type":"object","properties":{"row":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"field":{"type":["string","null"]},"code":{"type":"string"},"message":{"type":"string"}},"required":["row","field","code","message"],"additionalProperties":false}},"warnings":{"type":"array","items":{"type":"object","properties":{"row":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"field":{"type":["string","null"]},"code":{"type":"string"},"message":{"type":"string"}},"required":["row","field","code","message"],"additionalProperties":false}},"total_rows":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_recipients":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unique_recipients":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_amount":{"type":"string"},"total_amount_raw":{"type":"string"}},"required":["valid","errors","warnings","total_rows","total_recipients","unique_recipients","total_amount","total_amount_raw"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payout-batches":{"post":{"summary":"Create a payout batch","tags":["Payout batches"],"description":"Creates one payout per item, all-or-nothing: if any item is invalid nothing is created and the errors are returned. Requires an idempotency key. Processing is asynchronous; poll the batch or listen for payout_batch.completed.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"token":{"default":"MUNY","type":"string","enum":["MUNY"]},"items":{"minItems":1,"type":"array","items":{"type":"object","properties":{"recipient":{"type":"string"},"amount":{"type":"string"},"reference":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":254},{"type":"null"}]}},"required":["recipient","amount"]}},"idempotency_key":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7e]+$"},"source_filename":{"type":"string","maxLength":255},"save_recipients":{"description":"Add new addresses to the recipient address book","type":"boolean"}},"required":["items"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payout_batch"]},"name":{"type":"string"},"status":{"type":"string","enum":["draft","awaiting_approval","queued","processing","completed","completed_with_errors","cancelled"]},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"token":{"type":"string"},"total_amount":{"type":"string"},"confirmed_amount":{"type":"string"},"total_network_fees_sol":{"type":"string"},"counts":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draft":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"awaiting_approval":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"queued":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"processing":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"confirmed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cancelled":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["total","draft","awaiting_approval","queued","processing","confirmed","failed","cancelled"],"additionalProperties":false},"source_filename":{"type":["string","null"]},"idempotency_key":{"type":["string","null"]},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"approved_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","name","status","wallet_id","token","total_amount","confirmed_amount","total_network_fees_sol","counts","source_filename","idempotency_key","created_by","created_at","approved_at","completed_at"],"additionalProperties":false}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payout_batch"]},"name":{"type":"string"},"status":{"type":"string","enum":["draft","awaiting_approval","queued","processing","completed","completed_with_errors","cancelled"]},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"token":{"type":"string"},"total_amount":{"type":"string"},"confirmed_amount":{"type":"string"},"total_network_fees_sol":{"type":"string"},"counts":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draft":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"awaiting_approval":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"queued":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"processing":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"confirmed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cancelled":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["total","draft","awaiting_approval","queued","processing","confirmed","failed","cancelled"],"additionalProperties":false},"source_filename":{"type":["string","null"]},"idempotency_key":{"type":["string","null"]},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"approved_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","name","status","wallet_id","token","total_amount","confirmed_amount","total_network_fees_sol","counts","source_filename","idempotency_key","created_by","created_at","approved_at","completed_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"summary":"List batches","tags":["Payout batches"],"parameters":[{"schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["draft","awaiting_approval","queued","processing","completed","completed_with_errors","cancelled"]},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payout_batch"]},"name":{"type":"string"},"status":{"type":"string","enum":["draft","awaiting_approval","queued","processing","completed","completed_with_errors","cancelled"]},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"token":{"type":"string"},"total_amount":{"type":"string"},"confirmed_amount":{"type":"string"},"total_network_fees_sol":{"type":"string"},"counts":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draft":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"awaiting_approval":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"queued":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"processing":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"confirmed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cancelled":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["total","draft","awaiting_approval","queued","processing","confirmed","failed","cancelled"],"additionalProperties":false},"source_filename":{"type":["string","null"]},"idempotency_key":{"type":["string","null"]},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"approved_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","name","status","wallet_id","token","total_amount","confirmed_amount","total_network_fees_sol","counts","source_filename","idempotency_key","created_by","created_at","approved_at","completed_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payout-batches/{id}":{"get":{"summary":"Retrieve a batch with live progress counts","tags":["Payout batches"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payout_batch"]},"name":{"type":"string"},"status":{"type":"string","enum":["draft","awaiting_approval","queued","processing","completed","completed_with_errors","cancelled"]},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"token":{"type":"string"},"total_amount":{"type":"string"},"confirmed_amount":{"type":"string"},"total_network_fees_sol":{"type":"string"},"counts":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draft":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"awaiting_approval":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"queued":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"processing":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"confirmed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cancelled":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["total","draft","awaiting_approval","queued","processing","confirmed","failed","cancelled"],"additionalProperties":false},"source_filename":{"type":["string","null"]},"idempotency_key":{"type":["string","null"]},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"approved_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","name","status","wallet_id","token","total_amount","confirmed_amount","total_network_fees_sol","counts","source_filename","idempotency_key","created_by","created_at","approved_at","completed_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payout-batches/{id}/payouts":{"get":{"summary":"List the payouts in a batch","tags":["Payout batches"],"parameters":[{"schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["draft","awaiting_approval","queued","processing","confirmed","failed","cancelled"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payout"]},"status":{"type":"string","enum":["draft","awaiting_approval","queued","processing","confirmed","failed","cancelled"]},"recipient":{"type":"string","description":"Recipient Solana address"},"recipient_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"recipient_name":{"type":["string","null"]},"amount":{"type":"string"},"token":{"type":"string"},"reference":{"type":["string","null"]},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"batch_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"idempotency_key":{"type":["string","null"]},"network_fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"transaction":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["transaction"]},"kind":{"type":"string","enum":["payout","transfer","deposit","payment","refund"]},"status":{"type":"string","enum":["pending","submitted","confirmed","finalized","failed"]},"signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"network":{"type":"string"},"from_address":{"type":["string","null"]},"to_address":{"type":"string"},"amount":{"type":"string"},"token":{"type":"string"},"fee_lamports":{"type":["string","null"]},"fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"slot":{"type":["string","null"]},"error":{"type":["string","null"]},"payout_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"direction":{"type":"string","enum":["in","out"]},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","kind","status","signature","explorer_url","network","from_address","to_address","amount","token","fee_lamports","fee_sol","fee_sponsored","slot","error","payout_id","submitted_at","confirmed_at","finalized_at","created_at"],"additionalProperties":false},{"type":"null"}]},"failure_code":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"approved_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"queued_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"processing_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"cancelled_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","status","recipient","recipient_id","recipient_name","amount","token","reference","wallet_id","batch_id","idempotency_key","network_fee_sol","fee_sponsored","transaction","failure_code","failure_message","attempts","metadata","created_by","created_at","approved_at","queued_at","processing_at","confirmed_at","failed_at","cancelled_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payout-batches/{id}/export":{"get":{"summary":"Download batch results as CSV","tags":["Payout batches"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"text/csv":{"schema":{"type":"string"}}}}}}},"/v1/payout-batches/{id}/approve":{"post":{"summary":"Approve a batch","tags":["Payout batches"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payout_batch"]},"name":{"type":"string"},"status":{"type":"string","enum":["draft","awaiting_approval","queued","processing","completed","completed_with_errors","cancelled"]},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"token":{"type":"string"},"total_amount":{"type":"string"},"confirmed_amount":{"type":"string"},"total_network_fees_sol":{"type":"string"},"counts":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draft":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"awaiting_approval":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"queued":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"processing":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"confirmed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cancelled":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["total","draft","awaiting_approval","queued","processing","confirmed","failed","cancelled"],"additionalProperties":false},"source_filename":{"type":["string","null"]},"idempotency_key":{"type":["string","null"]},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"approved_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","name","status","wallet_id","token","total_amount","confirmed_amount","total_network_fees_sol","counts","source_filename","idempotency_key","created_by","created_at","approved_at","completed_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payout-batches/{id}/cancel":{"post":{"summary":"Cancel all unsettled payouts in a batch","tags":["Payout batches"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payout_batch"]},"name":{"type":"string"},"status":{"type":"string","enum":["draft","awaiting_approval","queued","processing","completed","completed_with_errors","cancelled"]},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"token":{"type":"string"},"total_amount":{"type":"string"},"confirmed_amount":{"type":"string"},"total_network_fees_sol":{"type":"string"},"counts":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draft":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"awaiting_approval":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"queued":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"processing":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"confirmed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cancelled":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["total","draft","awaiting_approval","queued","processing","confirmed","failed","cancelled"],"additionalProperties":false},"source_filename":{"type":["string","null"]},"idempotency_key":{"type":["string","null"]},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"approved_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","name","status","wallet_id","token","total_amount","confirmed_amount","total_network_fees_sol","counts","source_filename","idempotency_key","created_by","created_at","approved_at","completed_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payout-batches/{id}/retry-failed":{"post":{"summary":"Retry every failed payout in a batch","tags":["Payout batches"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payout_batch"]},"name":{"type":"string"},"status":{"type":"string","enum":["draft","awaiting_approval","queued","processing","completed","completed_with_errors","cancelled"]},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"token":{"type":"string"},"total_amount":{"type":"string"},"confirmed_amount":{"type":"string"},"total_network_fees_sol":{"type":"string"},"counts":{"type":"object","properties":{"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"draft":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"awaiting_approval":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"queued":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"processing":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"confirmed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cancelled":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["total","draft","awaiting_approval","queued","processing","confirmed","failed","cancelled"],"additionalProperties":false},"source_filename":{"type":["string","null"]},"idempotency_key":{"type":["string","null"]},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"approved_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","name","status","wallet_id","token","total_amount","confirmed_amount","total_network_fees_sol","counts","source_filename","idempotency_key","created_by","created_at","approved_at","completed_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/api-keys":{"post":{"summary":"Create an API key (the secret is returned once)","tags":["Developers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"scopes":{"minItems":1,"type":"array","items":{"type":"string","enum":["create_payout","view_payouts","manage_recipients","manage_webhooks","view_analytics","manage_wallets","view_payments","create_payments","refund_payments"]}},"expires_in_days":{"type":"integer","minimum":1,"maximum":730}},"required":["name","scopes"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["api_key"]},"name":{"type":"string"},"prefix":{"type":"string","description":"Non-secret identifier shown in the dashboard, e.g. mk_test_8fA2"},"mode":{"type":"string","enum":["test","live"]},"scopes":{"type":"array","items":{"type":"string","enum":["create_payout","view_payouts","manage_recipients","manage_webhooks","view_analytics","manage_wallets","view_payments","create_payments","refund_payments"]}},"last_used_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"last_used_ip":{"type":["string","null"]},"created_by":{"type":["string","null"]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"expires_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"key":{"type":"string","description":"The full secret. Shown exactly once — store it securely."}},"required":["id","object","name","prefix","mode","scopes","last_used_at","last_used_ip","created_by","created_at","expires_at","revoked_at","key"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"summary":"List API keys","tags":["Developers"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["api_key"]},"name":{"type":"string"},"prefix":{"type":"string","description":"Non-secret identifier shown in the dashboard, e.g. mk_test_8fA2"},"mode":{"type":"string","enum":["test","live"]},"scopes":{"type":"array","items":{"type":"string","enum":["create_payout","view_payouts","manage_recipients","manage_webhooks","view_analytics","manage_wallets","view_payments","create_payments","refund_payments"]}},"last_used_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"last_used_ip":{"type":["string","null"]},"created_by":{"type":["string","null"]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"expires_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","name","prefix","mode","scopes","last_used_at","last_used_ip","created_by","created_at","expires_at","revoked_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/api-keys/{id}/revoke":{"post":{"summary":"Revoke an API key immediately","tags":["Developers"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["api_key"]},"name":{"type":"string"},"prefix":{"type":"string","description":"Non-secret identifier shown in the dashboard, e.g. mk_test_8fA2"},"mode":{"type":"string","enum":["test","live"]},"scopes":{"type":"array","items":{"type":"string","enum":["create_payout","view_payouts","manage_recipients","manage_webhooks","view_analytics","manage_wallets","view_payments","create_payments","refund_payments"]}},"last_used_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"last_used_ip":{"type":["string","null"]},"created_by":{"type":["string","null"]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"expires_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","name","prefix","mode","scopes","last_used_at","last_used_ip","created_by","created_at","expires_at","revoked_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/webhooks":{"post":{"summary":"Create a webhook endpoint (signing secret returned once)","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"description":{"type":"string","maxLength":200},"events":{"minItems":1,"type":"array","items":{"type":"string","enum":["payout.created","payout.processing","payout.confirmed","payout.failed","payout_batch.completed","wallet.deposit_detected","payment.created","payment.submitted","payment.confirmed","payment.finalized","payment.failed","payment.expired","payment.cancelled","payment.refunded"]}},"enabled":{"default":true,"type":"boolean"}},"required":["url","events"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["webhook_endpoint"]},"url":{"type":"string"},"description":{"type":["string","null"]},"events":{"type":"array","items":{"type":"string","enum":["payout.created","payout.processing","payout.confirmed","payout.failed","payout_batch.completed","wallet.deposit_detected","payment.created","payment.submitted","payment.confirmed","payment.finalized","payment.failed","payment.expired","payment.cancelled","payment.refunded"]}},"enabled":{"type":"boolean"},"secret_hint":{"type":"string"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"stats":{"type":"object","properties":{"delivered_24h":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed_24h":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["delivered_24h","failed_24h"],"additionalProperties":false},"secret":{"type":"string","description":"Signing secret (whsec_…). Shown once; rotate to get a new one."}},"required":["id","object","url","description","events","enabled","secret_hint","created_at","updated_at","secret"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"summary":"List webhook endpoints","tags":["Webhooks"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["webhook_endpoint"]},"url":{"type":"string"},"description":{"type":["string","null"]},"events":{"type":"array","items":{"type":"string","enum":["payout.created","payout.processing","payout.confirmed","payout.failed","payout_batch.completed","wallet.deposit_detected","payment.created","payment.submitted","payment.confirmed","payment.finalized","payment.failed","payment.expired","payment.cancelled","payment.refunded"]}},"enabled":{"type":"boolean"},"secret_hint":{"type":"string"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"stats":{"type":"object","properties":{"delivered_24h":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed_24h":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["delivered_24h","failed_24h"],"additionalProperties":false}},"required":["id","object","url","description","events","enabled","secret_hint","created_at","updated_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/webhooks/{id}":{"get":{"summary":"Retrieve a webhook endpoint","tags":["Webhooks"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["webhook_endpoint"]},"url":{"type":"string"},"description":{"type":["string","null"]},"events":{"type":"array","items":{"type":"string","enum":["payout.created","payout.processing","payout.confirmed","payout.failed","payout_batch.completed","wallet.deposit_detected","payment.created","payment.submitted","payment.confirmed","payment.finalized","payment.failed","payment.expired","payment.cancelled","payment.refunded"]}},"enabled":{"type":"boolean"},"secret_hint":{"type":"string"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"stats":{"type":"object","properties":{"delivered_24h":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed_24h":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["delivered_24h","failed_24h"],"additionalProperties":false}},"required":["id","object","url","description","events","enabled","secret_hint","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a webhook endpoint","tags":["Webhooks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"description":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"events":{"minItems":1,"type":"array","items":{"type":"string","enum":["payout.created","payout.processing","payout.confirmed","payout.failed","payout_batch.completed","wallet.deposit_detected","payment.created","payment.submitted","payment.confirmed","payment.finalized","payment.failed","payment.expired","payment.cancelled","payment.refunded"]}},"enabled":{"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["webhook_endpoint"]},"url":{"type":"string"},"description":{"type":["string","null"]},"events":{"type":"array","items":{"type":"string","enum":["payout.created","payout.processing","payout.confirmed","payout.failed","payout_batch.completed","wallet.deposit_detected","payment.created","payment.submitted","payment.confirmed","payment.finalized","payment.failed","payment.expired","payment.cancelled","payment.refunded"]}},"enabled":{"type":"boolean"},"secret_hint":{"type":"string"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"stats":{"type":"object","properties":{"delivered_24h":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed_24h":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["delivered_24h","failed_24h"],"additionalProperties":false}},"required":["id","object","url","description","events","enabled","secret_hint","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a webhook endpoint","tags":["Webhooks"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"204":{"description":"Default Response"},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/webhooks/{id}/rotate-secret":{"post":{"summary":"Rotate the signing secret","tags":["Webhooks"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["webhook_endpoint"]},"url":{"type":"string"},"description":{"type":["string","null"]},"events":{"type":"array","items":{"type":"string","enum":["payout.created","payout.processing","payout.confirmed","payout.failed","payout_batch.completed","wallet.deposit_detected","payment.created","payment.submitted","payment.confirmed","payment.finalized","payment.failed","payment.expired","payment.cancelled","payment.refunded"]}},"enabled":{"type":"boolean"},"secret_hint":{"type":"string"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"stats":{"type":"object","properties":{"delivered_24h":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed_24h":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["delivered_24h","failed_24h"],"additionalProperties":false},"secret":{"type":"string","description":"Signing secret (whsec_…). Shown once; rotate to get a new one."}},"required":["id","object","url","description","events","enabled","secret_hint","created_at","updated_at","secret"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/webhooks/{id}/test":{"post":{"summary":"Send a test event","tags":["Webhooks"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["webhook_delivery"]},"endpoint_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"event_id":{"type":"string"},"event_type":{"type":"string","enum":["payout.created","payout.processing","payout.confirmed","payout.failed","payout_batch.completed","wallet.deposit_detected","payment.created","payment.submitted","payment.confirmed","payment.finalized","payment.failed","payment.expired","payment.cancelled","payment.refunded"]},"status":{"type":"string","enum":["pending","retrying","succeeded","failed"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"response_status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"response_body":{"type":["string","null"]},"error":{"type":["string","null"]},"duration_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"next_attempt_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"last_attempt_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"payload":{}},"required":["id","object","endpoint_id","event_id","event_type","status","attempts","response_status","response_body","error","duration_ms","next_attempt_at","last_attempt_at","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/webhooks/{id}/deliveries":{"get":{"summary":"Delivery log for an endpoint","tags":["Webhooks"],"parameters":[{"schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["pending","retrying","succeeded","failed"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["webhook_delivery"]},"endpoint_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"event_id":{"type":"string"},"event_type":{"type":"string","enum":["payout.created","payout.processing","payout.confirmed","payout.failed","payout_batch.completed","wallet.deposit_detected","payment.created","payment.submitted","payment.confirmed","payment.finalized","payment.failed","payment.expired","payment.cancelled","payment.refunded"]},"status":{"type":"string","enum":["pending","retrying","succeeded","failed"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"response_status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"response_body":{"type":["string","null"]},"error":{"type":["string","null"]},"duration_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"next_attempt_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"last_attempt_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"payload":{}},"required":["id","object","endpoint_id","event_id","event_type","status","attempts","response_status","response_body","error","duration_ms","next_attempt_at","last_attempt_at","created_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/webhook-deliveries/{id}/resend":{"post":{"summary":"Resend a delivery now","tags":["Webhooks"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["webhook_delivery"]},"endpoint_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"event_id":{"type":"string"},"event_type":{"type":"string","enum":["payout.created","payout.processing","payout.confirmed","payout.failed","payout_batch.completed","wallet.deposit_detected","payment.created","payment.submitted","payment.confirmed","payment.finalized","payment.failed","payment.expired","payment.cancelled","payment.refunded"]},"status":{"type":"string","enum":["pending","retrying","succeeded","failed"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"response_status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"response_body":{"type":["string","null"]},"error":{"type":["string","null"]},"duration_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"next_attempt_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"last_attempt_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"payload":{}},"required":["id","object","endpoint_id","event_id","event_type","status","attempts","response_status","response_body","error","duration_ms","next_attempt_at","last_attempt_at","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/usage":{"get":{"summary":"API usage for this organization","tags":["Developers"],"parameters":[{"schema":{"default":"30d","type":"string","enum":["7d","30d","90d"]},"in":"query","name":"range","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["usage"]},"range":{"type":"string"},"requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"success_rate":{"type":"number","description":"Percentage 0–100 of API requests that returned < 400, e.g. 98.14"},"errors":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"payouts_created_via_api":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"payout_volume_via_api":{"type":"string"},"daily":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"errors":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["date","requests","errors"],"additionalProperties":false}},"top_endpoints":{"type":"array","items":{"type":"object","properties":{"method":{"type":"string"},"route":{"type":"string"},"requests":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"errors":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["method","route","requests","errors"],"additionalProperties":false}},"recent_errors":{"type":"array","items":{"type":"object","properties":{"method":{"type":"string"},"route":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"request_id":{"type":"string"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["method","route","status","request_id","created_at"],"additionalProperties":false}}},"required":["object","range","requests","success_rate","errors","payouts_created_via_api","payout_volume_via_api","daily","top_endpoints","recent_errors"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/transactions":{"get":{"summary":"On-chain settlement history","tags":["Transactions"],"description":"Organization scope: payouts, deposits and transfers of the organization. Personal scope: everything sent to or from your own wallets.","parameters":[{"schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["payout","transfer","deposit","payment","refund"]},"in":"query","name":"kind","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"wallet_id","required":false},{"schema":{"type":"string","enum":["organization","personal"]},"in":"query","name":"scope","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["transaction"]},"kind":{"type":"string","enum":["payout","transfer","deposit","payment","refund"]},"status":{"type":"string","enum":["pending","submitted","confirmed","finalized","failed"]},"signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"network":{"type":"string"},"from_address":{"type":["string","null"]},"to_address":{"type":"string"},"amount":{"type":"string"},"token":{"type":"string"},"fee_lamports":{"type":["string","null"]},"fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"slot":{"type":["string","null"]},"error":{"type":["string","null"]},"payout_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"direction":{"type":"string","enum":["in","out"]},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","kind","status","signature","explorer_url","network","from_address","to_address","amount","token","fee_lamports","fee_sol","fee_sponsored","slot","error","payout_id","submitted_at","confirmed_at","finalized_at","created_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/transactions/{id}":{"get":{"summary":"Retrieve a transaction","tags":["Transactions"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["transaction"]},"kind":{"type":"string","enum":["payout","transfer","deposit","payment","refund"]},"status":{"type":"string","enum":["pending","submitted","confirmed","finalized","failed"]},"signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"network":{"type":"string"},"from_address":{"type":["string","null"]},"to_address":{"type":"string"},"amount":{"type":"string"},"token":{"type":"string"},"fee_lamports":{"type":["string","null"]},"fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"slot":{"type":["string","null"]},"error":{"type":["string","null"]},"payout_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"direction":{"type":"string","enum":["in","out"]},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","kind","status","signature","explorer_url","network","from_address","to_address","amount","token","fee_lamports","fee_sol","fee_sponsored","slot","error","payout_id","submitted_at","confirmed_at","finalized_at","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/audit-logs":{"get":{"summary":"Organization activity / audit log","tags":["Organizations"],"parameters":[{"schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","maxLength":80},"in":"query","name":"action","required":false},{"schema":{"type":"string","maxLength":80},"in":"query","name":"entity_type","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["audit_log"]},"action":{"type":"string"},"actor":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"entity_type":{"type":["string","null"]},"entity_id":{"type":["string","null"]},"ip":{"type":["string","null"]},"request_id":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","action","actor","entity_type","entity_id","ip","request_id","metadata","created_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/analytics/summary":{"get":{"summary":"Payout analytics","tags":["Analytics"],"parameters":[{"schema":{"default":"30d","type":"string","enum":["7d","30d","90d","12m"]},"in":"query","name":"range","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["analytics_summary"]},"range":{"type":"string"},"total_volume":{"type":"string"},"payout_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unique_recipients":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"average_payout":{"type":"string"},"failure_rate":{"type":"number","description":"Percentage 0–100 of settled payouts that failed, e.g. 2.16"},"previous":{"type":"object","properties":{"total_volume":{"type":"string"},"payout_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"unique_recipients":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["total_volume","payout_count","unique_recipients"],"additionalProperties":false},"daily":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"volume":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"failed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["date","volume","count","failed"],"additionalProperties":false}},"monthly":{"type":"array","items":{"type":"object","properties":{"month":{"type":"string"},"volume":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["month","volume","count"],"additionalProperties":false}}},"required":["object","range","total_volume","payout_count","unique_recipients","average_payout","failure_rate","previous","daily","monthly"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payment-intents":{"post":{"summary":"Create a payment intent (hosted checkout)","tags":["Payments"],"description":"Creates a payment the customer completes on Muny's hosted checkout (`checkout_url`) or by scanning `solana_pay_url`. Requires an idempotency key. The payment is confirmed only when Muny verifies the transfer on chain.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"},"line_items":{"description":"Alternative to amount: total = Σ quantity × unit_amount","minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"quantity":{"type":"integer","minimum":1,"maximum":10000},"unit_amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"}},"required":["name","quantity","unit_amount"]}},"token":{"default":"MUNY","type":"string","enum":["MUNY"]},"reference":{"type":"string","minLength":1,"maxLength":120},"external_order_id":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","maxLength":500},"customer":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":"string","maxLength":120}}},"collect_email":{"type":"boolean"},"collect_name":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":500},"description":"Up to 20 string key/value pairs for your own use"},"success_url":{"type":"string","maxLength":2048,"format":"uri"},"cancel_url":{"type":"string","maxLength":2048,"format":"uri"},"display_amount":{"description":"Price in a fiat currency. Without `amount`, Muny quotes the MUNY amount at the current price and locks it on the payment.","type":"string","pattern":"^\\d+(\\.\\d{1,3})?$"},"display_currency":{"description":"ISO-4217 code of display_amount, e.g. USD","type":"string","pattern":"^[A-Z]{3}$"},"expires_in_minutes":{"description":"Defaults to the merchant setting (30 min)","type":"integer","minimum":5,"maximum":10080},"wallet_id":{"description":"Settlement wallet. Defaults to the merchant's default receiving wallet.","type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"idempotency_key":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7e]+$"}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payment_intent"]},"livemode":{"type":"boolean"},"network":{"type":"string"},"status":{"type":"string","enum":["requires_payment","pending","submitted","confirmed","finalized","expired","cancelled","failed","refunded","partially_refunded"]},"amount":{"type":"string"},"amount_refunded":{"type":"string"},"token":{"type":"string"},"token_mint":{"type":"string"},"display_amount":{"type":["string","null"]},"display_currency":{"type":["string","null"]},"quote":{"anyOf":[{"type":"object","properties":{"price":{"type":"string"},"currency":{"type":"string"},"source":{"type":"string"},"quoted_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["price","currency","source","quoted_at"],"additionalProperties":false},{"type":"null"}],"description":"Set when the token amount was quoted from display_amount (fiat) at creation"},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"recipient_address":{"type":"string","description":"Settlement wallet owner address (fixed at creation)"},"reference":{"type":["string","null"]},"reference_key":{"type":"string","description":"Solana Pay reference public key embedded in the payment transaction"},"external_order_id":{"type":["string","null"]},"description":{"type":["string","null"]},"line_items":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"quantity":{"type":"integer","minimum":1,"maximum":10000},"unit_amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"}},"required":["name","quantity","unit_amount"],"additionalProperties":false}},{"type":"null"}]},"customer":{"type":"object","properties":{"email":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["email","name"],"additionalProperties":false},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"source":{"type":"string","enum":["api","dashboard","payment_link","checkout_session"]},"payment_link_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"checkout_url":{"type":"string"},"solana_pay_url":{"type":"string"},"success_url":{"type":["string","null"]},"cancel_url":{"type":["string","null"]},"payer_address":{"type":["string","null"]},"transaction_signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"transaction":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["transaction"]},"kind":{"type":"string","enum":["payout","transfer","deposit","payment","refund"]},"status":{"type":"string","enum":["pending","submitted","confirmed","finalized","failed"]},"signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"network":{"type":"string"},"from_address":{"type":["string","null"]},"to_address":{"type":"string"},"amount":{"type":"string"},"token":{"type":"string"},"fee_lamports":{"type":["string","null"]},"fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"slot":{"type":["string","null"]},"error":{"type":["string","null"]},"payout_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"direction":{"type":"string","enum":["in","out"]},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","kind","status","signature","explorer_url","network","from_address","to_address","amount","token","fee_lamports","fee_sol","fee_sponsored","slot","error","payout_id","submitted_at","confirmed_at","finalized_at","created_at"],"additionalProperties":false},{"type":"null"}]},"fiat_value_at_payment":{"anyOf":[{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"},"price":{"type":"string"},"source":{"type":"string"}},"required":["amount","currency","price","source"],"additionalProperties":false},{"type":"null"}],"description":"Fiat snapshot taken when the payment confirmed. Historic values never use today's price."},"failure_code":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"risk_decision":{"anyOf":[{"type":"string","enum":["allow","review","deny"]},{"type":"null"}]},"late_confirmation":{"type":"boolean"},"idempotency_key":{"type":["string","null"]},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["refund"]},"payment_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amount":{"type":"string"},"token":{"type":"string"},"status":{"type":"string","enum":["pending","requires_signature","submitted","confirmed","failed"]},"reason":{"type":["string","null"]},"destination_address":{"type":"string"},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transaction_signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"transaction_to_sign":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","payment_id","amount","token","status","reason","destination_address","wallet_id","transaction_signature","explorer_url","transaction_to_sign","failure_message","created_by","created_at","submitted_at","confirmed_at"],"additionalProperties":false}},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"expires_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"expired_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"cancelled_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"refunded_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","livemode","network","status","amount","amount_refunded","token","token_mint","display_amount","display_currency","quote","wallet_id","recipient_address","reference","reference_key","external_order_id","description","line_items","customer","metadata","source","payment_link_id","checkout_url","solana_pay_url","success_url","cancel_url","payer_address","transaction_signature","explorer_url","transaction","fiat_value_at_payment","failure_code","failure_message","risk_decision","late_confirmation","idempotency_key","created_by","expires_at","created_at","updated_at","submitted_at","confirmed_at","finalized_at","expired_at","cancelled_at","failed_at","refunded_at"],"additionalProperties":false}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payment_intent"]},"livemode":{"type":"boolean"},"network":{"type":"string"},"status":{"type":"string","enum":["requires_payment","pending","submitted","confirmed","finalized","expired","cancelled","failed","refunded","partially_refunded"]},"amount":{"type":"string"},"amount_refunded":{"type":"string"},"token":{"type":"string"},"token_mint":{"type":"string"},"display_amount":{"type":["string","null"]},"display_currency":{"type":["string","null"]},"quote":{"anyOf":[{"type":"object","properties":{"price":{"type":"string"},"currency":{"type":"string"},"source":{"type":"string"},"quoted_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["price","currency","source","quoted_at"],"additionalProperties":false},{"type":"null"}],"description":"Set when the token amount was quoted from display_amount (fiat) at creation"},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"recipient_address":{"type":"string","description":"Settlement wallet owner address (fixed at creation)"},"reference":{"type":["string","null"]},"reference_key":{"type":"string","description":"Solana Pay reference public key embedded in the payment transaction"},"external_order_id":{"type":["string","null"]},"description":{"type":["string","null"]},"line_items":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"quantity":{"type":"integer","minimum":1,"maximum":10000},"unit_amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"}},"required":["name","quantity","unit_amount"],"additionalProperties":false}},{"type":"null"}]},"customer":{"type":"object","properties":{"email":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["email","name"],"additionalProperties":false},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"source":{"type":"string","enum":["api","dashboard","payment_link","checkout_session"]},"payment_link_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"checkout_url":{"type":"string"},"solana_pay_url":{"type":"string"},"success_url":{"type":["string","null"]},"cancel_url":{"type":["string","null"]},"payer_address":{"type":["string","null"]},"transaction_signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"transaction":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["transaction"]},"kind":{"type":"string","enum":["payout","transfer","deposit","payment","refund"]},"status":{"type":"string","enum":["pending","submitted","confirmed","finalized","failed"]},"signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"network":{"type":"string"},"from_address":{"type":["string","null"]},"to_address":{"type":"string"},"amount":{"type":"string"},"token":{"type":"string"},"fee_lamports":{"type":["string","null"]},"fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"slot":{"type":["string","null"]},"error":{"type":["string","null"]},"payout_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"direction":{"type":"string","enum":["in","out"]},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","kind","status","signature","explorer_url","network","from_address","to_address","amount","token","fee_lamports","fee_sol","fee_sponsored","slot","error","payout_id","submitted_at","confirmed_at","finalized_at","created_at"],"additionalProperties":false},{"type":"null"}]},"fiat_value_at_payment":{"anyOf":[{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"},"price":{"type":"string"},"source":{"type":"string"}},"required":["amount","currency","price","source"],"additionalProperties":false},{"type":"null"}],"description":"Fiat snapshot taken when the payment confirmed. Historic values never use today's price."},"failure_code":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"risk_decision":{"anyOf":[{"type":"string","enum":["allow","review","deny"]},{"type":"null"}]},"late_confirmation":{"type":"boolean"},"idempotency_key":{"type":["string","null"]},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["refund"]},"payment_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amount":{"type":"string"},"token":{"type":"string"},"status":{"type":"string","enum":["pending","requires_signature","submitted","confirmed","failed"]},"reason":{"type":["string","null"]},"destination_address":{"type":"string"},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transaction_signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"transaction_to_sign":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","payment_id","amount","token","status","reason","destination_address","wallet_id","transaction_signature","explorer_url","transaction_to_sign","failure_message","created_by","created_at","submitted_at","confirmed_at"],"additionalProperties":false}},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"expires_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"expired_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"cancelled_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"refunded_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","livemode","network","status","amount","amount_refunded","token","token_mint","display_amount","display_currency","quote","wallet_id","recipient_address","reference","reference_key","external_order_id","description","line_items","customer","metadata","source","payment_link_id","checkout_url","solana_pay_url","success_url","cancel_url","payer_address","transaction_signature","explorer_url","transaction","fiat_value_at_payment","failure_code","failure_message","risk_decision","late_confirmation","idempotency_key","created_by","expires_at","created_at","updated_at","submitted_at","confirmed_at","finalized_at","expired_at","cancelled_at","failed_at","refunded_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"summary":"List payment intents","tags":["Payments"],"parameters":[{"schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["requires_payment","pending","submitted","confirmed","finalized","expired","cancelled","failed","refunded","partially_refunded"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"q","required":false,"description":"Payment id, transaction signature, reference or customer email"},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"wallet_id","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"payment_link_id","required":false},{"schema":{"type":"string","enum":["MUNY"]},"in":"query","name":"token","required":false},{"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"in":"query","name":"created_gte","required":false},{"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"in":"query","name":"created_lte","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payment_intent"]},"livemode":{"type":"boolean"},"network":{"type":"string"},"status":{"type":"string","enum":["requires_payment","pending","submitted","confirmed","finalized","expired","cancelled","failed","refunded","partially_refunded"]},"amount":{"type":"string"},"amount_refunded":{"type":"string"},"token":{"type":"string"},"token_mint":{"type":"string"},"display_amount":{"type":["string","null"]},"display_currency":{"type":["string","null"]},"quote":{"anyOf":[{"type":"object","properties":{"price":{"type":"string"},"currency":{"type":"string"},"source":{"type":"string"},"quoted_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["price","currency","source","quoted_at"],"additionalProperties":false},{"type":"null"}],"description":"Set when the token amount was quoted from display_amount (fiat) at creation"},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"recipient_address":{"type":"string","description":"Settlement wallet owner address (fixed at creation)"},"reference":{"type":["string","null"]},"reference_key":{"type":"string","description":"Solana Pay reference public key embedded in the payment transaction"},"external_order_id":{"type":["string","null"]},"description":{"type":["string","null"]},"line_items":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"quantity":{"type":"integer","minimum":1,"maximum":10000},"unit_amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"}},"required":["name","quantity","unit_amount"],"additionalProperties":false}},{"type":"null"}]},"customer":{"type":"object","properties":{"email":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["email","name"],"additionalProperties":false},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"source":{"type":"string","enum":["api","dashboard","payment_link","checkout_session"]},"payment_link_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"checkout_url":{"type":"string"},"solana_pay_url":{"type":"string"},"success_url":{"type":["string","null"]},"cancel_url":{"type":["string","null"]},"payer_address":{"type":["string","null"]},"transaction_signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"transaction":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["transaction"]},"kind":{"type":"string","enum":["payout","transfer","deposit","payment","refund"]},"status":{"type":"string","enum":["pending","submitted","confirmed","finalized","failed"]},"signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"network":{"type":"string"},"from_address":{"type":["string","null"]},"to_address":{"type":"string"},"amount":{"type":"string"},"token":{"type":"string"},"fee_lamports":{"type":["string","null"]},"fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"slot":{"type":["string","null"]},"error":{"type":["string","null"]},"payout_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"direction":{"type":"string","enum":["in","out"]},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","kind","status","signature","explorer_url","network","from_address","to_address","amount","token","fee_lamports","fee_sol","fee_sponsored","slot","error","payout_id","submitted_at","confirmed_at","finalized_at","created_at"],"additionalProperties":false},{"type":"null"}]},"fiat_value_at_payment":{"anyOf":[{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"},"price":{"type":"string"},"source":{"type":"string"}},"required":["amount","currency","price","source"],"additionalProperties":false},{"type":"null"}],"description":"Fiat snapshot taken when the payment confirmed. Historic values never use today's price."},"failure_code":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"risk_decision":{"anyOf":[{"type":"string","enum":["allow","review","deny"]},{"type":"null"}]},"late_confirmation":{"type":"boolean"},"idempotency_key":{"type":["string","null"]},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["refund"]},"payment_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amount":{"type":"string"},"token":{"type":"string"},"status":{"type":"string","enum":["pending","requires_signature","submitted","confirmed","failed"]},"reason":{"type":["string","null"]},"destination_address":{"type":"string"},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transaction_signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"transaction_to_sign":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","payment_id","amount","token","status","reason","destination_address","wallet_id","transaction_signature","explorer_url","transaction_to_sign","failure_message","created_by","created_at","submitted_at","confirmed_at"],"additionalProperties":false}},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"expires_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"expired_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"cancelled_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"refunded_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","livemode","network","status","amount","amount_refunded","token","token_mint","display_amount","display_currency","quote","wallet_id","recipient_address","reference","reference_key","external_order_id","description","line_items","customer","metadata","source","payment_link_id","checkout_url","solana_pay_url","success_url","cancel_url","payer_address","transaction_signature","explorer_url","transaction","fiat_value_at_payment","failure_code","failure_message","risk_decision","late_confirmation","idempotency_key","created_by","expires_at","created_at","updated_at","submitted_at","confirmed_at","finalized_at","expired_at","cancelled_at","failed_at","refunded_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/checkout/sessions":{"post":{"summary":"Create a checkout session from line items","tags":["Payments"],"description":"Convenience wrapper: creates a payment intent whose amount is the sum of the line items. Returns the payment intent (with checkout_url).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"line_items":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"quantity":{"type":"integer","minimum":1,"maximum":10000},"unit_amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"}},"required":["name","quantity","unit_amount"]}},"token":{"default":"MUNY","type":"string","enum":["MUNY"]},"reference":{"type":"string","minLength":1,"maxLength":120},"customer_email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":500},"description":"Up to 20 string key/value pairs for your own use"},"success_url":{"type":"string","maxLength":2048,"format":"uri"},"cancel_url":{"type":"string","maxLength":2048,"format":"uri"},"expires_in_minutes":{"type":"integer","minimum":5,"maximum":10080},"idempotency_key":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7e]+$"}},"required":["line_items"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payment_intent"]},"livemode":{"type":"boolean"},"network":{"type":"string"},"status":{"type":"string","enum":["requires_payment","pending","submitted","confirmed","finalized","expired","cancelled","failed","refunded","partially_refunded"]},"amount":{"type":"string"},"amount_refunded":{"type":"string"},"token":{"type":"string"},"token_mint":{"type":"string"},"display_amount":{"type":["string","null"]},"display_currency":{"type":["string","null"]},"quote":{"anyOf":[{"type":"object","properties":{"price":{"type":"string"},"currency":{"type":"string"},"source":{"type":"string"},"quoted_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["price","currency","source","quoted_at"],"additionalProperties":false},{"type":"null"}],"description":"Set when the token amount was quoted from display_amount (fiat) at creation"},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"recipient_address":{"type":"string","description":"Settlement wallet owner address (fixed at creation)"},"reference":{"type":["string","null"]},"reference_key":{"type":"string","description":"Solana Pay reference public key embedded in the payment transaction"},"external_order_id":{"type":["string","null"]},"description":{"type":["string","null"]},"line_items":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"quantity":{"type":"integer","minimum":1,"maximum":10000},"unit_amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"}},"required":["name","quantity","unit_amount"],"additionalProperties":false}},{"type":"null"}]},"customer":{"type":"object","properties":{"email":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["email","name"],"additionalProperties":false},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"source":{"type":"string","enum":["api","dashboard","payment_link","checkout_session"]},"payment_link_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"checkout_url":{"type":"string"},"solana_pay_url":{"type":"string"},"success_url":{"type":["string","null"]},"cancel_url":{"type":["string","null"]},"payer_address":{"type":["string","null"]},"transaction_signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"transaction":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["transaction"]},"kind":{"type":"string","enum":["payout","transfer","deposit","payment","refund"]},"status":{"type":"string","enum":["pending","submitted","confirmed","finalized","failed"]},"signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"network":{"type":"string"},"from_address":{"type":["string","null"]},"to_address":{"type":"string"},"amount":{"type":"string"},"token":{"type":"string"},"fee_lamports":{"type":["string","null"]},"fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"slot":{"type":["string","null"]},"error":{"type":["string","null"]},"payout_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"direction":{"type":"string","enum":["in","out"]},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","kind","status","signature","explorer_url","network","from_address","to_address","amount","token","fee_lamports","fee_sol","fee_sponsored","slot","error","payout_id","submitted_at","confirmed_at","finalized_at","created_at"],"additionalProperties":false},{"type":"null"}]},"fiat_value_at_payment":{"anyOf":[{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"},"price":{"type":"string"},"source":{"type":"string"}},"required":["amount","currency","price","source"],"additionalProperties":false},{"type":"null"}],"description":"Fiat snapshot taken when the payment confirmed. Historic values never use today's price."},"failure_code":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"risk_decision":{"anyOf":[{"type":"string","enum":["allow","review","deny"]},{"type":"null"}]},"late_confirmation":{"type":"boolean"},"idempotency_key":{"type":["string","null"]},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["refund"]},"payment_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amount":{"type":"string"},"token":{"type":"string"},"status":{"type":"string","enum":["pending","requires_signature","submitted","confirmed","failed"]},"reason":{"type":["string","null"]},"destination_address":{"type":"string"},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transaction_signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"transaction_to_sign":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","payment_id","amount","token","status","reason","destination_address","wallet_id","transaction_signature","explorer_url","transaction_to_sign","failure_message","created_by","created_at","submitted_at","confirmed_at"],"additionalProperties":false}},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"expires_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"expired_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"cancelled_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"refunded_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","livemode","network","status","amount","amount_refunded","token","token_mint","display_amount","display_currency","quote","wallet_id","recipient_address","reference","reference_key","external_order_id","description","line_items","customer","metadata","source","payment_link_id","checkout_url","solana_pay_url","success_url","cancel_url","payer_address","transaction_signature","explorer_url","transaction","fiat_value_at_payment","failure_code","failure_message","risk_decision","late_confirmation","idempotency_key","created_by","expires_at","created_at","updated_at","submitted_at","confirmed_at","finalized_at","expired_at","cancelled_at","failed_at","refunded_at"],"additionalProperties":false}}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payment_intent"]},"livemode":{"type":"boolean"},"network":{"type":"string"},"status":{"type":"string","enum":["requires_payment","pending","submitted","confirmed","finalized","expired","cancelled","failed","refunded","partially_refunded"]},"amount":{"type":"string"},"amount_refunded":{"type":"string"},"token":{"type":"string"},"token_mint":{"type":"string"},"display_amount":{"type":["string","null"]},"display_currency":{"type":["string","null"]},"quote":{"anyOf":[{"type":"object","properties":{"price":{"type":"string"},"currency":{"type":"string"},"source":{"type":"string"},"quoted_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["price","currency","source","quoted_at"],"additionalProperties":false},{"type":"null"}],"description":"Set when the token amount was quoted from display_amount (fiat) at creation"},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"recipient_address":{"type":"string","description":"Settlement wallet owner address (fixed at creation)"},"reference":{"type":["string","null"]},"reference_key":{"type":"string","description":"Solana Pay reference public key embedded in the payment transaction"},"external_order_id":{"type":["string","null"]},"description":{"type":["string","null"]},"line_items":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"quantity":{"type":"integer","minimum":1,"maximum":10000},"unit_amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"}},"required":["name","quantity","unit_amount"],"additionalProperties":false}},{"type":"null"}]},"customer":{"type":"object","properties":{"email":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["email","name"],"additionalProperties":false},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"source":{"type":"string","enum":["api","dashboard","payment_link","checkout_session"]},"payment_link_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"checkout_url":{"type":"string"},"solana_pay_url":{"type":"string"},"success_url":{"type":["string","null"]},"cancel_url":{"type":["string","null"]},"payer_address":{"type":["string","null"]},"transaction_signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"transaction":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["transaction"]},"kind":{"type":"string","enum":["payout","transfer","deposit","payment","refund"]},"status":{"type":"string","enum":["pending","submitted","confirmed","finalized","failed"]},"signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"network":{"type":"string"},"from_address":{"type":["string","null"]},"to_address":{"type":"string"},"amount":{"type":"string"},"token":{"type":"string"},"fee_lamports":{"type":["string","null"]},"fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"slot":{"type":["string","null"]},"error":{"type":["string","null"]},"payout_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"direction":{"type":"string","enum":["in","out"]},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","kind","status","signature","explorer_url","network","from_address","to_address","amount","token","fee_lamports","fee_sol","fee_sponsored","slot","error","payout_id","submitted_at","confirmed_at","finalized_at","created_at"],"additionalProperties":false},{"type":"null"}]},"fiat_value_at_payment":{"anyOf":[{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"},"price":{"type":"string"},"source":{"type":"string"}},"required":["amount","currency","price","source"],"additionalProperties":false},{"type":"null"}],"description":"Fiat snapshot taken when the payment confirmed. Historic values never use today's price."},"failure_code":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"risk_decision":{"anyOf":[{"type":"string","enum":["allow","review","deny"]},{"type":"null"}]},"late_confirmation":{"type":"boolean"},"idempotency_key":{"type":["string","null"]},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["refund"]},"payment_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amount":{"type":"string"},"token":{"type":"string"},"status":{"type":"string","enum":["pending","requires_signature","submitted","confirmed","failed"]},"reason":{"type":["string","null"]},"destination_address":{"type":"string"},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transaction_signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"transaction_to_sign":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","payment_id","amount","token","status","reason","destination_address","wallet_id","transaction_signature","explorer_url","transaction_to_sign","failure_message","created_by","created_at","submitted_at","confirmed_at"],"additionalProperties":false}},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"expires_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"expired_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"cancelled_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"refunded_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","livemode","network","status","amount","amount_refunded","token","token_mint","display_amount","display_currency","quote","wallet_id","recipient_address","reference","reference_key","external_order_id","description","line_items","customer","metadata","source","payment_link_id","checkout_url","solana_pay_url","success_url","cancel_url","payer_address","transaction_signature","explorer_url","transaction","fiat_value_at_payment","failure_code","failure_message","risk_decision","late_confirmation","idempotency_key","created_by","expires_at","created_at","updated_at","submitted_at","confirmed_at","finalized_at","expired_at","cancelled_at","failed_at","refunded_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payment-intents/{id}":{"get":{"summary":"Retrieve a payment intent","tags":["Payments"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payment_intent"]},"livemode":{"type":"boolean"},"network":{"type":"string"},"status":{"type":"string","enum":["requires_payment","pending","submitted","confirmed","finalized","expired","cancelled","failed","refunded","partially_refunded"]},"amount":{"type":"string"},"amount_refunded":{"type":"string"},"token":{"type":"string"},"token_mint":{"type":"string"},"display_amount":{"type":["string","null"]},"display_currency":{"type":["string","null"]},"quote":{"anyOf":[{"type":"object","properties":{"price":{"type":"string"},"currency":{"type":"string"},"source":{"type":"string"},"quoted_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["price","currency","source","quoted_at"],"additionalProperties":false},{"type":"null"}],"description":"Set when the token amount was quoted from display_amount (fiat) at creation"},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"recipient_address":{"type":"string","description":"Settlement wallet owner address (fixed at creation)"},"reference":{"type":["string","null"]},"reference_key":{"type":"string","description":"Solana Pay reference public key embedded in the payment transaction"},"external_order_id":{"type":["string","null"]},"description":{"type":["string","null"]},"line_items":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"quantity":{"type":"integer","minimum":1,"maximum":10000},"unit_amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"}},"required":["name","quantity","unit_amount"],"additionalProperties":false}},{"type":"null"}]},"customer":{"type":"object","properties":{"email":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["email","name"],"additionalProperties":false},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"source":{"type":"string","enum":["api","dashboard","payment_link","checkout_session"]},"payment_link_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"checkout_url":{"type":"string"},"solana_pay_url":{"type":"string"},"success_url":{"type":["string","null"]},"cancel_url":{"type":["string","null"]},"payer_address":{"type":["string","null"]},"transaction_signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"transaction":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["transaction"]},"kind":{"type":"string","enum":["payout","transfer","deposit","payment","refund"]},"status":{"type":"string","enum":["pending","submitted","confirmed","finalized","failed"]},"signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"network":{"type":"string"},"from_address":{"type":["string","null"]},"to_address":{"type":"string"},"amount":{"type":"string"},"token":{"type":"string"},"fee_lamports":{"type":["string","null"]},"fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"slot":{"type":["string","null"]},"error":{"type":["string","null"]},"payout_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"direction":{"type":"string","enum":["in","out"]},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","kind","status","signature","explorer_url","network","from_address","to_address","amount","token","fee_lamports","fee_sol","fee_sponsored","slot","error","payout_id","submitted_at","confirmed_at","finalized_at","created_at"],"additionalProperties":false},{"type":"null"}]},"fiat_value_at_payment":{"anyOf":[{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"},"price":{"type":"string"},"source":{"type":"string"}},"required":["amount","currency","price","source"],"additionalProperties":false},{"type":"null"}],"description":"Fiat snapshot taken when the payment confirmed. Historic values never use today's price."},"failure_code":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"risk_decision":{"anyOf":[{"type":"string","enum":["allow","review","deny"]},{"type":"null"}]},"late_confirmation":{"type":"boolean"},"idempotency_key":{"type":["string","null"]},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["refund"]},"payment_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amount":{"type":"string"},"token":{"type":"string"},"status":{"type":"string","enum":["pending","requires_signature","submitted","confirmed","failed"]},"reason":{"type":["string","null"]},"destination_address":{"type":"string"},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transaction_signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"transaction_to_sign":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","payment_id","amount","token","status","reason","destination_address","wallet_id","transaction_signature","explorer_url","transaction_to_sign","failure_message","created_by","created_at","submitted_at","confirmed_at"],"additionalProperties":false}},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"expires_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"expired_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"cancelled_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"refunded_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","livemode","network","status","amount","amount_refunded","token","token_mint","display_amount","display_currency","quote","wallet_id","recipient_address","reference","reference_key","external_order_id","description","line_items","customer","metadata","source","payment_link_id","checkout_url","solana_pay_url","success_url","cancel_url","payer_address","transaction_signature","explorer_url","transaction","fiat_value_at_payment","failure_code","failure_message","risk_decision","late_confirmation","idempotency_key","created_by","expires_at","created_at","updated_at","submitted_at","confirmed_at","finalized_at","expired_at","cancelled_at","failed_at","refunded_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payment-intents/{id}/cancel":{"post":{"summary":"Cancel an unpaid payment intent","tags":["Payments"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payment_intent"]},"livemode":{"type":"boolean"},"network":{"type":"string"},"status":{"type":"string","enum":["requires_payment","pending","submitted","confirmed","finalized","expired","cancelled","failed","refunded","partially_refunded"]},"amount":{"type":"string"},"amount_refunded":{"type":"string"},"token":{"type":"string"},"token_mint":{"type":"string"},"display_amount":{"type":["string","null"]},"display_currency":{"type":["string","null"]},"quote":{"anyOf":[{"type":"object","properties":{"price":{"type":"string"},"currency":{"type":"string"},"source":{"type":"string"},"quoted_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["price","currency","source","quoted_at"],"additionalProperties":false},{"type":"null"}],"description":"Set when the token amount was quoted from display_amount (fiat) at creation"},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"recipient_address":{"type":"string","description":"Settlement wallet owner address (fixed at creation)"},"reference":{"type":["string","null"]},"reference_key":{"type":"string","description":"Solana Pay reference public key embedded in the payment transaction"},"external_order_id":{"type":["string","null"]},"description":{"type":["string","null"]},"line_items":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"quantity":{"type":"integer","minimum":1,"maximum":10000},"unit_amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"}},"required":["name","quantity","unit_amount"],"additionalProperties":false}},{"type":"null"}]},"customer":{"type":"object","properties":{"email":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["email","name"],"additionalProperties":false},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"source":{"type":"string","enum":["api","dashboard","payment_link","checkout_session"]},"payment_link_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"checkout_url":{"type":"string"},"solana_pay_url":{"type":"string"},"success_url":{"type":["string","null"]},"cancel_url":{"type":["string","null"]},"payer_address":{"type":["string","null"]},"transaction_signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"transaction":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["transaction"]},"kind":{"type":"string","enum":["payout","transfer","deposit","payment","refund"]},"status":{"type":"string","enum":["pending","submitted","confirmed","finalized","failed"]},"signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"network":{"type":"string"},"from_address":{"type":["string","null"]},"to_address":{"type":"string"},"amount":{"type":"string"},"token":{"type":"string"},"fee_lamports":{"type":["string","null"]},"fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"slot":{"type":["string","null"]},"error":{"type":["string","null"]},"payout_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"direction":{"type":"string","enum":["in","out"]},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","kind","status","signature","explorer_url","network","from_address","to_address","amount","token","fee_lamports","fee_sol","fee_sponsored","slot","error","payout_id","submitted_at","confirmed_at","finalized_at","created_at"],"additionalProperties":false},{"type":"null"}]},"fiat_value_at_payment":{"anyOf":[{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"},"price":{"type":"string"},"source":{"type":"string"}},"required":["amount","currency","price","source"],"additionalProperties":false},{"type":"null"}],"description":"Fiat snapshot taken when the payment confirmed. Historic values never use today's price."},"failure_code":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"risk_decision":{"anyOf":[{"type":"string","enum":["allow","review","deny"]},{"type":"null"}]},"late_confirmation":{"type":"boolean"},"idempotency_key":{"type":["string","null"]},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["refund"]},"payment_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amount":{"type":"string"},"token":{"type":"string"},"status":{"type":"string","enum":["pending","requires_signature","submitted","confirmed","failed"]},"reason":{"type":["string","null"]},"destination_address":{"type":"string"},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transaction_signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"transaction_to_sign":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","payment_id","amount","token","status","reason","destination_address","wallet_id","transaction_signature","explorer_url","transaction_to_sign","failure_message","created_by","created_at","submitted_at","confirmed_at"],"additionalProperties":false}},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"expires_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"expired_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"cancelled_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"refunded_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","livemode","network","status","amount","amount_refunded","token","token_mint","display_amount","display_currency","quote","wallet_id","recipient_address","reference","reference_key","external_order_id","description","line_items","customer","metadata","source","payment_link_id","checkout_url","solana_pay_url","success_url","cancel_url","payer_address","transaction_signature","explorer_url","transaction","fiat_value_at_payment","failure_code","failure_message","risk_decision","late_confirmation","idempotency_key","created_by","expires_at","created_at","updated_at","submitted_at","confirmed_at","finalized_at","expired_at","cancelled_at","failed_at","refunded_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payments":{"get":{"summary":"List payments (intents with a payment attempt)","tags":["Payments"],"parameters":[{"schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["requires_payment","pending","submitted","confirmed","finalized","expired","cancelled","failed","refunded","partially_refunded"]},"in":"query","name":"status","required":false},{"schema":{"type":"string","maxLength":200},"in":"query","name":"q","required":false,"description":"Payment id, transaction signature, reference or customer email"},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"wallet_id","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"payment_link_id","required":false},{"schema":{"type":"string","enum":["MUNY"]},"in":"query","name":"token","required":false},{"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"in":"query","name":"created_gte","required":false},{"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"in":"query","name":"created_lte","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payment_intent"]},"livemode":{"type":"boolean"},"network":{"type":"string"},"status":{"type":"string","enum":["requires_payment","pending","submitted","confirmed","finalized","expired","cancelled","failed","refunded","partially_refunded"]},"amount":{"type":"string"},"amount_refunded":{"type":"string"},"token":{"type":"string"},"token_mint":{"type":"string"},"display_amount":{"type":["string","null"]},"display_currency":{"type":["string","null"]},"quote":{"anyOf":[{"type":"object","properties":{"price":{"type":"string"},"currency":{"type":"string"},"source":{"type":"string"},"quoted_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["price","currency","source","quoted_at"],"additionalProperties":false},{"type":"null"}],"description":"Set when the token amount was quoted from display_amount (fiat) at creation"},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"recipient_address":{"type":"string","description":"Settlement wallet owner address (fixed at creation)"},"reference":{"type":["string","null"]},"reference_key":{"type":"string","description":"Solana Pay reference public key embedded in the payment transaction"},"external_order_id":{"type":["string","null"]},"description":{"type":["string","null"]},"line_items":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"quantity":{"type":"integer","minimum":1,"maximum":10000},"unit_amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"}},"required":["name","quantity","unit_amount"],"additionalProperties":false}},{"type":"null"}]},"customer":{"type":"object","properties":{"email":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["email","name"],"additionalProperties":false},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"source":{"type":"string","enum":["api","dashboard","payment_link","checkout_session"]},"payment_link_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"checkout_url":{"type":"string"},"solana_pay_url":{"type":"string"},"success_url":{"type":["string","null"]},"cancel_url":{"type":["string","null"]},"payer_address":{"type":["string","null"]},"transaction_signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"transaction":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["transaction"]},"kind":{"type":"string","enum":["payout","transfer","deposit","payment","refund"]},"status":{"type":"string","enum":["pending","submitted","confirmed","finalized","failed"]},"signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"network":{"type":"string"},"from_address":{"type":["string","null"]},"to_address":{"type":"string"},"amount":{"type":"string"},"token":{"type":"string"},"fee_lamports":{"type":["string","null"]},"fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"slot":{"type":["string","null"]},"error":{"type":["string","null"]},"payout_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"direction":{"type":"string","enum":["in","out"]},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","kind","status","signature","explorer_url","network","from_address","to_address","amount","token","fee_lamports","fee_sol","fee_sponsored","slot","error","payout_id","submitted_at","confirmed_at","finalized_at","created_at"],"additionalProperties":false},{"type":"null"}]},"fiat_value_at_payment":{"anyOf":[{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"},"price":{"type":"string"},"source":{"type":"string"}},"required":["amount","currency","price","source"],"additionalProperties":false},{"type":"null"}],"description":"Fiat snapshot taken when the payment confirmed. Historic values never use today's price."},"failure_code":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"risk_decision":{"anyOf":[{"type":"string","enum":["allow","review","deny"]},{"type":"null"}]},"late_confirmation":{"type":"boolean"},"idempotency_key":{"type":["string","null"]},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["refund"]},"payment_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amount":{"type":"string"},"token":{"type":"string"},"status":{"type":"string","enum":["pending","requires_signature","submitted","confirmed","failed"]},"reason":{"type":["string","null"]},"destination_address":{"type":"string"},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transaction_signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"transaction_to_sign":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","payment_id","amount","token","status","reason","destination_address","wallet_id","transaction_signature","explorer_url","transaction_to_sign","failure_message","created_by","created_at","submitted_at","confirmed_at"],"additionalProperties":false}},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"expires_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"expired_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"cancelled_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"refunded_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","livemode","network","status","amount","amount_refunded","token","token_mint","display_amount","display_currency","quote","wallet_id","recipient_address","reference","reference_key","external_order_id","description","line_items","customer","metadata","source","payment_link_id","checkout_url","solana_pay_url","success_url","cancel_url","payer_address","transaction_signature","explorer_url","transaction","fiat_value_at_payment","failure_code","failure_message","risk_decision","late_confirmation","idempotency_key","created_by","expires_at","created_at","updated_at","submitted_at","confirmed_at","finalized_at","expired_at","cancelled_at","failed_at","refunded_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payments/analytics":{"get":{"summary":"Payment analytics","tags":["Payments"],"parameters":[{"schema":{"default":"30d","type":"string","enum":["7d","30d","90d","12m"]},"in":"query","name":"range","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["payments_analytics"]},"range":{"type":"string"},"total_received":{"type":"string"},"payment_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"average_payment":{"type":"string"},"success_rate":{"type":"number","description":"Percentage 0–100 of closed checkouts that were paid"},"usd_value_received":{"type":"string","description":"Sum of per-payment fiat snapshots (USD)"},"previous":{"type":"object","properties":{"total_received":{"type":"string"},"payment_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["total_received","payment_count"],"additionalProperties":false},"daily":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"volume":{"type":"string"},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["date","volume","count"],"additionalProperties":false}},"status_breakdown":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["requires_payment","pending","submitted","confirmed","finalized","expired","cancelled","failed","refunded","partially_refunded"]},"count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["status","count"],"additionalProperties":false}},"top_links":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"payments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"volume":{"type":"string"}},"required":["id","name","payments","volume"],"additionalProperties":false}}},"required":["object","range","total_received","payment_count","average_payment","success_rate","usd_value_received","previous","daily","status_breakdown","top_links"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payments/{id}":{"get":{"summary":"Retrieve a payment (with refunds)","tags":["Payments"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payment_intent"]},"livemode":{"type":"boolean"},"network":{"type":"string"},"status":{"type":"string","enum":["requires_payment","pending","submitted","confirmed","finalized","expired","cancelled","failed","refunded","partially_refunded"]},"amount":{"type":"string"},"amount_refunded":{"type":"string"},"token":{"type":"string"},"token_mint":{"type":"string"},"display_amount":{"type":["string","null"]},"display_currency":{"type":["string","null"]},"quote":{"anyOf":[{"type":"object","properties":{"price":{"type":"string"},"currency":{"type":"string"},"source":{"type":"string"},"quoted_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["price","currency","source","quoted_at"],"additionalProperties":false},{"type":"null"}],"description":"Set when the token amount was quoted from display_amount (fiat) at creation"},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"recipient_address":{"type":"string","description":"Settlement wallet owner address (fixed at creation)"},"reference":{"type":["string","null"]},"reference_key":{"type":"string","description":"Solana Pay reference public key embedded in the payment transaction"},"external_order_id":{"type":["string","null"]},"description":{"type":["string","null"]},"line_items":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"quantity":{"type":"integer","minimum":1,"maximum":10000},"unit_amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"}},"required":["name","quantity","unit_amount"],"additionalProperties":false}},{"type":"null"}]},"customer":{"type":"object","properties":{"email":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["email","name"],"additionalProperties":false},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"source":{"type":"string","enum":["api","dashboard","payment_link","checkout_session"]},"payment_link_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"checkout_url":{"type":"string"},"solana_pay_url":{"type":"string"},"success_url":{"type":["string","null"]},"cancel_url":{"type":["string","null"]},"payer_address":{"type":["string","null"]},"transaction_signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"transaction":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["transaction"]},"kind":{"type":"string","enum":["payout","transfer","deposit","payment","refund"]},"status":{"type":"string","enum":["pending","submitted","confirmed","finalized","failed"]},"signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"network":{"type":"string"},"from_address":{"type":["string","null"]},"to_address":{"type":"string"},"amount":{"type":"string"},"token":{"type":"string"},"fee_lamports":{"type":["string","null"]},"fee_sol":{"type":["string","null"]},"fee_sponsored":{"type":"boolean"},"slot":{"type":["string","null"]},"error":{"type":["string","null"]},"payout_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"direction":{"type":"string","enum":["in","out"]},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","kind","status","signature","explorer_url","network","from_address","to_address","amount","token","fee_lamports","fee_sol","fee_sponsored","slot","error","payout_id","submitted_at","confirmed_at","finalized_at","created_at"],"additionalProperties":false},{"type":"null"}]},"fiat_value_at_payment":{"anyOf":[{"type":"object","properties":{"amount":{"type":"string"},"currency":{"type":"string"},"price":{"type":"string"},"source":{"type":"string"}},"required":["amount","currency","price","source"],"additionalProperties":false},{"type":"null"}],"description":"Fiat snapshot taken when the payment confirmed. Historic values never use today's price."},"failure_code":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"risk_decision":{"anyOf":[{"type":"string","enum":["allow","review","deny"]},{"type":"null"}]},"late_confirmation":{"type":"boolean"},"idempotency_key":{"type":["string","null"]},"refunds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["refund"]},"payment_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amount":{"type":"string"},"token":{"type":"string"},"status":{"type":"string","enum":["pending","requires_signature","submitted","confirmed","failed"]},"reason":{"type":["string","null"]},"destination_address":{"type":"string"},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transaction_signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"transaction_to_sign":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","payment_id","amount","token","status","reason","destination_address","wallet_id","transaction_signature","explorer_url","transaction_to_sign","failure_message","created_by","created_at","submitted_at","confirmed_at"],"additionalProperties":false}},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"expires_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"finalized_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"expired_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"cancelled_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"failed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"refunded_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","livemode","network","status","amount","amount_refunded","token","token_mint","display_amount","display_currency","quote","wallet_id","recipient_address","reference","reference_key","external_order_id","description","line_items","customer","metadata","source","payment_link_id","checkout_url","solana_pay_url","success_url","cancel_url","payer_address","transaction_signature","explorer_url","transaction","fiat_value_at_payment","failure_code","failure_message","risk_decision","late_confirmation","idempotency_key","created_by","expires_at","created_at","updated_at","submitted_at","confirmed_at","finalized_at","expired_at","cancelled_at","failed_at","refunded_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payments/{id}/events":{"get":{"summary":"Webhook deliveries for this payment","tags":["Payments"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["webhook_delivery"]},"endpoint_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"event_id":{"type":"string"},"event_type":{"type":"string","enum":["payout.created","payout.processing","payout.confirmed","payout.failed","payout_batch.completed","wallet.deposit_detected","payment.created","payment.submitted","payment.confirmed","payment.finalized","payment.failed","payment.expired","payment.cancelled","payment.refunded"]},"status":{"type":"string","enum":["pending","retrying","succeeded","failed"]},"attempts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"response_status":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"response_body":{"type":["string","null"]},"error":{"type":["string","null"]},"duration_ms":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"next_attempt_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"last_attempt_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"payload":{}},"required":["id","object","endpoint_id","event_id","event_type","status","attempts","response_status","response_body","error","duration_ms","next_attempt_at","last_attempt_at","created_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payments/{id}/refunds":{"post":{"summary":"Refund a payment (full or partial)","tags":["Payments"],"description":"Refunds go back to the verified payer. Managed settlement wallets are refunded by Muny. External (non-custodial) wallets return status=requires_signature with transaction_to_sign: sign it with the settlement wallet and POST /v1/refunds/{id}/submit.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"description":"Token amount. Defaults to the full refundable amount","type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","example":"500"},"display_amount":{"description":"Refund in the payment's display currency (e.g. a WooCommerce refund in USD); converted proportionally to the original quote","type":"string","pattern":"^\\d+(\\.\\d{1,3})?$"},"reason":{"type":"string","maxLength":500},"idempotency_key":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x21-\\x7e]+$"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["refund"]},"payment_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amount":{"type":"string"},"token":{"type":"string"},"status":{"type":"string","enum":["pending","requires_signature","submitted","confirmed","failed"]},"reason":{"type":["string","null"]},"destination_address":{"type":"string"},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transaction_signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"transaction_to_sign":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","payment_id","amount","token","status","reason","destination_address","wallet_id","transaction_signature","explorer_url","transaction_to_sign","failure_message","created_by","created_at","submitted_at","confirmed_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"summary":"List refunds of a payment","tags":["Payments"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["refund"]},"payment_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amount":{"type":"string"},"token":{"type":"string"},"status":{"type":"string","enum":["pending","requires_signature","submitted","confirmed","failed"]},"reason":{"type":["string","null"]},"destination_address":{"type":"string"},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transaction_signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"transaction_to_sign":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","payment_id","amount","token","status","reason","destination_address","wallet_id","transaction_signature","explorer_url","transaction_to_sign","failure_message","created_by","created_at","submitted_at","confirmed_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/refunds/{id}":{"get":{"summary":"Retrieve a refund","tags":["Payments"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["refund"]},"payment_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amount":{"type":"string"},"token":{"type":"string"},"status":{"type":"string","enum":["pending","requires_signature","submitted","confirmed","failed"]},"reason":{"type":["string","null"]},"destination_address":{"type":"string"},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transaction_signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"transaction_to_sign":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","payment_id","amount","token","status","reason","destination_address","wallet_id","transaction_signature","explorer_url","transaction_to_sign","failure_message","created_by","created_at","submitted_at","confirmed_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/refunds/{id}/submit":{"post":{"summary":"Submit a merchant-signed refund transaction","tags":["Payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"signed_transaction":{"type":"string","minLength":10,"description":"Base64 transaction signed by the settlement wallet"}},"required":["signed_transaction"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["refund"]},"payment_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"amount":{"type":"string"},"token":{"type":"string"},"status":{"type":"string","enum":["pending","requires_signature","submitted","confirmed","failed"]},"reason":{"type":["string","null"]},"destination_address":{"type":"string"},"wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"transaction_signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"transaction_to_sign":{"type":["string","null"]},"failure_message":{"type":["string","null"]},"created_by":{"type":"object","properties":{"type":{"type":"string","enum":["user","api_key","system"]},"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["type","id","name"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"submitted_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]}},"required":["id","object","payment_id","amount","token","status","reason","destination_address","wallet_id","transaction_signature","explorer_url","transaction_to_sign","failure_message","created_by","created_at","submitted_at","confirmed_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payment-links":{"post":{"summary":"Create a payment link","tags":["Payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"token":{"default":"MUNY","type":"string","enum":["MUNY"]},"amount":{"description":"Fixed price. Omit/null to let the customer choose.","anyOf":[{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"},{"type":"null"}]},"min_amount":{"anyOf":[{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"},{"type":"null"}]},"max_amount":{"anyOf":[{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"},{"type":"null"}]},"success_url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"collect_email":{"type":"boolean"},"collect_name":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":500},"description":"Up to 20 string key/value pairs for your own use"},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["name"]}}}},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payment_link"]},"livemode":{"type":"boolean"},"name":{"type":"string"},"description":{"type":["string","null"]},"url":{"type":"string"},"slug":{"type":"string"},"token":{"type":"string"},"amount":{"description":"Fixed price; null means the customer chooses","type":["string","null"]},"min_amount":{"type":["string","null"]},"max_amount":{"type":["string","null"]},"success_url":{"type":["string","null"]},"collect_email":{"type":"boolean"},"collect_name":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"active":{"type":"boolean"},"expires_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"stats":{"type":"object","properties":{"payments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"volume":{"type":"string"}},"required":["payments","volume"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","livemode","name","description","url","slug","token","amount","min_amount","max_amount","success_url","collect_email","collect_name","metadata","active","expires_at","stats","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"summary":"List payment links","tags":["Payments"],"parameters":[{"schema":{"default":25,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"cursor","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"active","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payment_link"]},"livemode":{"type":"boolean"},"name":{"type":"string"},"description":{"type":["string","null"]},"url":{"type":"string"},"slug":{"type":"string"},"token":{"type":"string"},"amount":{"description":"Fixed price; null means the customer chooses","type":["string","null"]},"min_amount":{"type":["string","null"]},"max_amount":{"type":["string","null"]},"success_url":{"type":["string","null"]},"collect_email":{"type":"boolean"},"collect_name":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"active":{"type":"boolean"},"expires_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"stats":{"type":"object","properties":{"payments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"volume":{"type":"string"}},"required":["payments","volume"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","livemode","name","description","url","slug","token","amount","min_amount","max_amount","success_url","collect_email","collect_name","metadata","active","expires_at","stats","created_at","updated_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payment-links/{id}":{"get":{"summary":"Retrieve a payment link","tags":["Payments"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payment_link"]},"livemode":{"type":"boolean"},"name":{"type":"string"},"description":{"type":["string","null"]},"url":{"type":"string"},"slug":{"type":"string"},"token":{"type":"string"},"amount":{"description":"Fixed price; null means the customer chooses","type":["string","null"]},"min_amount":{"type":["string","null"]},"max_amount":{"type":["string","null"]},"success_url":{"type":["string","null"]},"collect_email":{"type":"boolean"},"collect_name":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"active":{"type":"boolean"},"expires_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"stats":{"type":"object","properties":{"payments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"volume":{"type":"string"}},"required":["payments","volume"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","livemode","name","description","url","slug","token","amount","min_amount","max_amount","success_url","collect_email","collect_name","metadata","active","expires_at","stats","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a payment link","tags":["Payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"amount":{"description":"Fixed price. Omit/null to let the customer choose.","anyOf":[{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"},{"type":"null"}]},"min_amount":{"anyOf":[{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"},{"type":"null"}]},"max_amount":{"anyOf":[{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"},{"type":"null"}]},"success_url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"collect_email":{"type":"boolean"},"collect_name":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":500},"description":"Up to 20 string key/value pairs for your own use"},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"active":{"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payment_link"]},"livemode":{"type":"boolean"},"name":{"type":"string"},"description":{"type":["string","null"]},"url":{"type":"string"},"slug":{"type":"string"},"token":{"type":"string"},"amount":{"description":"Fixed price; null means the customer chooses","type":["string","null"]},"min_amount":{"type":["string","null"]},"max_amount":{"type":["string","null"]},"success_url":{"type":["string","null"]},"collect_email":{"type":"boolean"},"collect_name":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"active":{"type":"boolean"},"expires_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"stats":{"type":"object","properties":{"payments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"volume":{"type":"string"}},"required":["payments","volume"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","livemode","name","description","url","slug","token","amount","min_amount","max_amount","success_url","collect_email","collect_name","metadata","active","expires_at","stats","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payment-links/{id}/disable":{"post":{"summary":"Disable a payment link","tags":["Payments"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payment_link"]},"livemode":{"type":"boolean"},"name":{"type":"string"},"description":{"type":["string","null"]},"url":{"type":"string"},"slug":{"type":"string"},"token":{"type":"string"},"amount":{"description":"Fixed price; null means the customer chooses","type":["string","null"]},"min_amount":{"type":["string","null"]},"max_amount":{"type":["string","null"]},"success_url":{"type":["string","null"]},"collect_email":{"type":"boolean"},"collect_name":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"active":{"type":"boolean"},"expires_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"stats":{"type":"object","properties":{"payments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"volume":{"type":"string"}},"required":["payments","volume"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","livemode","name","description","url","slug","token","amount","min_amount","max_amount","success_url","collect_email","collect_name","metadata","active","expires_at","stats","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payment-links/{id}/enable":{"post":{"summary":"Re-enable a payment link","tags":["Payments"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payment_link"]},"livemode":{"type":"boolean"},"name":{"type":"string"},"description":{"type":["string","null"]},"url":{"type":"string"},"slug":{"type":"string"},"token":{"type":"string"},"amount":{"description":"Fixed price; null means the customer chooses","type":["string","null"]},"min_amount":{"type":["string","null"]},"max_amount":{"type":["string","null"]},"success_url":{"type":["string","null"]},"collect_email":{"type":"boolean"},"collect_name":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"active":{"type":"boolean"},"expires_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"stats":{"type":"object","properties":{"payments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"volume":{"type":"string"}},"required":["payments","volume"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","livemode","name","description","url","slug","token","amount","min_amount","max_amount","success_url","collect_email","collect_name","metadata","active","expires_at","stats","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/payment-links/{id}/duplicate":{"post":{"summary":"Duplicate a payment link","tags":["Payments"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"object":{"type":"string","enum":["payment_link"]},"livemode":{"type":"boolean"},"name":{"type":"string"},"description":{"type":["string","null"]},"url":{"type":"string"},"slug":{"type":"string"},"token":{"type":"string"},"amount":{"description":"Fixed price; null means the customer chooses","type":["string","null"]},"min_amount":{"type":["string","null"]},"max_amount":{"type":["string","null"]},"success_url":{"type":["string","null"]},"collect_email":{"type":"boolean"},"collect_name":{"type":"boolean"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"active":{"type":"boolean"},"expires_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"stats":{"type":"object","properties":{"payments":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"volume":{"type":"string"}},"required":["payments","volume"],"additionalProperties":false},"created_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"updated_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"}},"required":["id","object","livemode","name","description","url","slug","token","amount","min_amount","max_amount","success_url","collect_email","collect_name","metadata","active","expires_at","stats","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/merchant-settings":{"get":{"summary":"Checkout and settlement settings","tags":["Payments"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["merchant_settings"]},"display_name":{"type":"string"},"logo_url":{"type":["string","null"]},"support_email":{"type":["string","null"]},"settlement_wallet_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"settlement_address":{"type":["string","null"]},"checkout_accent":{"type":"string","enum":["gold","silver","emerald","sapphire","rose"]},"default_success_url":{"type":["string","null"]},"default_cancel_url":{"type":["string","null"]},"payment_expiry_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["object","display_name","logo_url","support_email","settlement_wallet_id","settlement_address","checkout_accent","default_success_url","default_cancel_url","payment_expiry_minutes"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"summary":"Update checkout and settlement settings","tags":["Payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"display_name":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"logo_url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"support_email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"settlement_wallet_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"checkout_accent":{"type":"string","enum":["gold","silver","emerald","sapphire","rose"]},"default_success_url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"default_cancel_url":{"anyOf":[{"type":"string","maxLength":2048,"format":"uri"},{"type":"null"}]},"payment_expiry_minutes":{"type":"integer","minimum":5,"maximum":10080}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["merchant_settings"]},"display_name":{"type":"string"},"logo_url":{"type":["string","null"]},"support_email":{"type":["string","null"]},"settlement_wallet_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"settlement_address":{"type":["string","null"]},"checkout_accent":{"type":"string","enum":["gold","silver","emerald","sapphire","rose"]},"default_success_url":{"type":["string","null"]},"default_cancel_url":{"type":["string","null"]},"payment_expiry_minutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["object","display_name","logo_url","support_email","settlement_wallet_id","settlement_address","checkout_accent","default_success_url","default_cancel_url","payment_expiry_minutes"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/checkout/{id}":{"get":{"summary":"Public checkout view of a payment","tags":["Checkout (public)"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["checkout"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"livemode":{"type":"boolean"},"network":{"type":"string"},"status":{"type":"string","enum":["requires_payment","pending","submitted","confirmed","finalized","expired","cancelled","failed","refunded","partially_refunded"]},"amount":{"type":"string"},"token":{"type":"string"},"token_mint":{"type":"string"},"decimals":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"usd_estimate":{"type":["string","null"]},"merchant":{"type":"object","properties":{"name":{"type":"string"},"logo_url":{"type":["string","null"]},"support_email":{"type":["string","null"]},"accent":{"type":"string","enum":["gold","silver","emerald","sapphire","rose"]}},"required":["name","logo_url","support_email","accent"],"additionalProperties":false},"description":{"type":["string","null"]},"reference":{"type":["string","null"]},"line_items":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"quantity":{"type":"integer","minimum":1,"maximum":10000},"unit_amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"}},"required":["name","quantity","unit_amount"],"additionalProperties":false}},{"type":"null"}]},"recipient_address":{"type":"string"},"reference_key":{"type":"string"},"solana_pay_url":{"type":"string"},"collect_email":{"type":"boolean"},"collect_name":{"type":"boolean"},"customer_email":{"type":["string","null"]},"customer_name":{"type":["string","null"]},"success_url":{"type":["string","null"]},"cancel_url":{"type":["string","null"]},"transaction_signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"expires_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"wallet_payments_available":{"type":"boolean"},"simulate_available":{"type":"boolean"}},"required":["object","id","livemode","network","status","amount","token","token_mint","decimals","usd_estimate","merchant","description","reference","line_items","recipient_address","reference_key","solana_pay_url","collect_email","collect_name","customer_email","customer_name","success_url","cancel_url","transaction_signature","explorer_url","expires_at","confirmed_at","wallet_payments_available","simulate_available"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/checkout/{id}/customer":{"post":{"summary":"Attach customer details collected on checkout","tags":["Checkout (public)"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":"string","minLength":1,"maxLength":120}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["checkout"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"livemode":{"type":"boolean"},"network":{"type":"string"},"status":{"type":"string","enum":["requires_payment","pending","submitted","confirmed","finalized","expired","cancelled","failed","refunded","partially_refunded"]},"amount":{"type":"string"},"token":{"type":"string"},"token_mint":{"type":"string"},"decimals":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"usd_estimate":{"type":["string","null"]},"merchant":{"type":"object","properties":{"name":{"type":"string"},"logo_url":{"type":["string","null"]},"support_email":{"type":["string","null"]},"accent":{"type":"string","enum":["gold","silver","emerald","sapphire","rose"]}},"required":["name","logo_url","support_email","accent"],"additionalProperties":false},"description":{"type":["string","null"]},"reference":{"type":["string","null"]},"line_items":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"quantity":{"type":"integer","minimum":1,"maximum":10000},"unit_amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"}},"required":["name","quantity","unit_amount"],"additionalProperties":false}},{"type":"null"}]},"recipient_address":{"type":"string"},"reference_key":{"type":"string"},"solana_pay_url":{"type":"string"},"collect_email":{"type":"boolean"},"collect_name":{"type":"boolean"},"customer_email":{"type":["string","null"]},"customer_name":{"type":["string","null"]},"success_url":{"type":["string","null"]},"cancel_url":{"type":["string","null"]},"transaction_signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"expires_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"wallet_payments_available":{"type":"boolean"},"simulate_available":{"type":"boolean"}},"required":["object","id","livemode","network","status","amount","token","token_mint","decimals","usd_estimate","merchant","description","reference","line_items","recipient_address","reference_key","solana_pay_url","collect_email","collect_name","customer_email","customer_name","success_url","cancel_url","transaction_signature","explorer_url","expires_at","confirmed_at","wallet_payments_available","simulate_available"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/checkout/{id}/transaction":{"post":{"summary":"Build the payment transaction for a wallet","tags":["Checkout (public)"],"description":"Solana Pay transaction-request style: the server builds the exact transfer (amount, mint, recipient, reference). The wallet signs and sends it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"string","description":"Paying wallet public key"}},"required":["account"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"transaction":{"type":"string","description":"Base64 v0 transaction: transferChecked(exact amount) + reference, payer = customer"},"message":{"type":"string"}},"required":["transaction","message"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/checkout/{id}/submit":{"post":{"summary":"Report a submitted transaction signature (hint only)","tags":["Checkout (public)"],"description":"Speeds up detection. The signature is never trusted: the payment completes only after on-chain verification.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"signature":{"type":"string","minLength":64,"maxLength":100}},"required":["signature"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["checkout"]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"livemode":{"type":"boolean"},"network":{"type":"string"},"status":{"type":"string","enum":["requires_payment","pending","submitted","confirmed","finalized","expired","cancelled","failed","refunded","partially_refunded"]},"amount":{"type":"string"},"token":{"type":"string"},"token_mint":{"type":"string"},"decimals":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"usd_estimate":{"type":["string","null"]},"merchant":{"type":"object","properties":{"name":{"type":"string"},"logo_url":{"type":["string","null"]},"support_email":{"type":["string","null"]},"accent":{"type":"string","enum":["gold","silver","emerald","sapphire","rose"]}},"required":["name","logo_url","support_email","accent"],"additionalProperties":false},"description":{"type":["string","null"]},"reference":{"type":["string","null"]},"line_items":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"quantity":{"type":"integer","minimum":1,"maximum":10000},"unit_amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"}},"required":["name","quantity","unit_amount"],"additionalProperties":false}},{"type":"null"}]},"recipient_address":{"type":"string"},"reference_key":{"type":"string"},"solana_pay_url":{"type":"string"},"collect_email":{"type":"boolean"},"collect_name":{"type":"boolean"},"customer_email":{"type":["string","null"]},"customer_name":{"type":["string","null"]},"success_url":{"type":["string","null"]},"cancel_url":{"type":["string","null"]},"transaction_signature":{"type":["string","null"]},"explorer_url":{"type":["string","null"]},"expires_at":{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},"confirmed_at":{"anyOf":[{"type":"string","description":"ISO-8601 timestamp","example":"2026-10-01T09:30:00.000Z"},{"type":"null"}]},"wallet_payments_available":{"type":"boolean"},"simulate_available":{"type":"boolean"}},"required":["object","id","livemode","network","status","amount","token","token_mint","decimals","usd_estimate","merchant","description","reference","line_items","recipient_address","reference_key","solana_pay_url","collect_email","collect_name","customer_email","customer_name","success_url","cancel_url","transaction_signature","explorer_url","expires_at","confirmed_at","wallet_payments_available","simulate_available"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/checkout/{id}/simulate":{"post":{"summary":"Test mode: simulate a customer paying (mock chain only)","tags":["Checkout (public)"],"description":"Sends a simulated on-chain transfer carrying this payment's reference. Verification then runs exactly as for a real payment. Unavailable on mainnet and with the RPC driver.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"},"wrong_recipient":{"type":"boolean"},"wrong_mint":{"type":"boolean"},"omit_reference":{"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"signature":{"type":"string"},"payer":{"type":"string"}},"required":["signature","payer"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/checkout/links/{slug}":{"get":{"summary":"Public view of a payment link","tags":["Checkout (public)"],"parameters":[{"schema":{"type":"string","pattern":"^[a-z0-9]{6,32}$"},"in":"path","name":"slug","required":true}],"security":[],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["payment_link_checkout"]},"slug":{"type":"string"},"active":{"type":"boolean"},"name":{"type":"string"},"description":{"type":["string","null"]},"amount":{"type":["string","null"]},"min_amount":{"type":["string","null"]},"max_amount":{"type":["string","null"]},"token":{"type":"string"},"collect_email":{"type":"boolean"},"collect_name":{"type":"boolean"},"merchant":{"type":"object","properties":{"name":{"type":"string"},"logo_url":{"type":["string","null"]},"accent":{"type":"string","enum":["gold","silver","emerald","sapphire","rose"]}},"required":["name","logo_url","accent"],"additionalProperties":false},"livemode":{"type":"boolean"}},"required":["object","slug","active","name","description","amount","min_amount","max_amount","token","collect_email","collect_name","merchant","livemode"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"summary":"Start a checkout from a payment link","tags":["Checkout (public)"],"description":"Creates a fresh payment intent server-side. For fixed-price links any client-supplied amount is ignored.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"string","pattern":"^(?:0|[1-9]\\d*)(?:\\.\\d+)?$","description":"Token amount in whole units as a decimal string. Never a JSON number.","example":"500"},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"name":{"type":"string","maxLength":120}}}}}},"parameters":[{"schema":{"type":"string","pattern":"^[a-z0-9]{6,32}$"},"in":"path","name":"slug","required":true}],"security":[],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"checkout_url":{"type":"string"}},"required":["id","checkout_url"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"422":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","not_found_error","idempotency_error","conflict_error","rate_limit_error","risk_error","api_error"]},"code":{"type":"string"},"message":{"type":"string"},"request_id":{"type":"string"},"details":{}},"required":["type","code","message","request_id"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}}},"servers":[{"url":"https://api.muny.io"}],"security":[{"bearer":[]}],"tags":[{"name":"Auth"},{"name":"Account"},{"name":"Organizations"},{"name":"Payouts"},{"name":"Payout batches"},{"name":"Payments"},{"name":"Checkout (public)"},{"name":"Recipients"},{"name":"Wallets"},{"name":"Transactions"},{"name":"Developers"},{"name":"Webhooks"},{"name":"Notifications"},{"name":"Devices"},{"name":"Analytics"},{"name":"System"}]}