{"openapi":"3.1.0","info":{"title":"钱包账务微服务 API","version":"0.1.0"},"paths":{"/api/v1/health":{"get":{"tags":["health"],"summary":"Health Check","operationId":"health_check_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Check Api V1 Health Get"}}}}}}},"/api/v1/health/live":{"get":{"tags":["health"],"summary":"Liveness Check","operationId":"liveness_check_api_v1_health_live_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Liveness Check Api V1 Health Live Get"}}}}}}},"/api/v1/health/ready":{"get":{"tags":["health"],"summary":"Readiness Check","operationId":"readiness_check_api_v1_health_ready_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Readiness Check Api V1 Health Ready Get"}}}},"503":{"description":"Database readiness check failed"}}}},"/api/v1/billing-intents/{idempotency_key}":{"get":{"tags":["billing-intents"],"summary":"查询 payment status","operationId":"get_billing_intent_status_api_v1_billing_intents__idempotency_key__get","parameters":[{"name":"idempotency_key","in":"path","required":true,"schema":{"type":"string","title":"Idempotency Key"}},{"name":"X-Service-Name","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingIntentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/customer-payment-intents":{"post":{"tags":["customer-payment-intents"],"summary":"Record a provider-neutral customer payment intent","operationId":"create_customer_payment_intent_api_v1_customer_payment_intents_post","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerPaymentIntentCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerPaymentIntentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/recharges/offline-bank-transfer":{"post":{"tags":["recharge"],"summary":"创建线下转账充值记录","operationId":"create_offline_bank_transfer_recharge_api_v1_recharges_offline_bank_transfer_post","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}},{"name":"X-Operator-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Type"}},{"name":"X-Operator-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfflineBankTransferRechargeCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RechargeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/recharges/stripe":{"post":{"tags":["recharge"],"summary":"创建 Stripe 充值记录","operationId":"create_stripe_recharge_api_v1_recharges_stripe_post","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}},{"name":"X-Operator-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Type"}},{"name":"X-Operator-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeRechargeCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RechargeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/recharges/stripe/verify-and-credit":{"post":{"tags":["recharge"],"summary":"查询 Stripe 支付状态并入账","operationId":"verify_and_credit_stripe_recharge_api_v1_recharges_stripe_verify_and_credit_post","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}},{"name":"X-Operator-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Type"}},{"name":"X-Operator-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeVerifyAndCreditRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RechargeCreditResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/recharges/confirm-by-source":{"post":{"tags":["recharge"],"summary":"按外部来源确认入账","operationId":"confirm_recharge_by_source_api_v1_recharges_confirm_by_source_post","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}},{"name":"X-Operator-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Type"}},{"name":"X-Operator-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RechargeConfirmBySourceRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RechargeCreditResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/recharges/{recharge_id}/confirm":{"post":{"tags":["recharge"],"summary":"按充值 ID 确认入账","operationId":"confirm_recharge_api_v1_recharges__recharge_id__confirm_post","parameters":[{"name":"recharge_id","in":"path","required":true,"schema":{"type":"string","title":"Recharge Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}},{"name":"X-Operator-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Type"}},{"name":"X-Operator-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RechargeConfirmRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RechargeCreditResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/recharges/{recharge_id}/reject":{"post":{"tags":["recharge"],"summary":"拒绝充值","operationId":"reject_recharge_api_v1_recharges__recharge_id__reject_post","parameters":[{"name":"recharge_id","in":"path","required":true,"schema":{"type":"string","title":"Recharge Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}},{"name":"X-Operator-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Type"}},{"name":"X-Operator-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RechargeRejectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RechargeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/recharges/{recharge_id}":{"get":{"tags":["recharge"],"summary":"查询充值详情","operationId":"get_recharge_api_v1_recharges__recharge_id__get","parameters":[{"name":"recharge_id","in":"path","required":true,"schema":{"type":"string","title":"Recharge Id"}},{"name":"X-Service-Name","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RechargeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/recharges":{"get":{"tags":["recharge"],"summary":"查询充值列表","operationId":"list_recharges_api_v1_recharges_get","parameters":[{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Id"}},{"name":"channel","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/RechargeChannel"},{"type":"null"}],"title":"Channel"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/RechargeStatus"},{"type":"null"}],"title":"Status"}},{"name":"created_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created From"}},{"name":"created_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created To"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"X-Service-Name","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RechargeResponse"},"title":"Response List Recharges Api V1 Recharges Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/stats/recharges":{"get":{"tags":["stats"],"summary":"查询充值统计","operationId":"recharge_stats_api_v1_stats_recharges_get","parameters":[{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Id"}},{"name":"currency","in":"query","required":false,"schema":{"type":"string","minLength":3,"maxLength":3,"default":"USD","title":"Currency"}},{"name":"created_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created From"}},{"name":"created_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created To"}},{"name":"X-Service-Name","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RechargeStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/wallets":{"post":{"tags":["wallet"],"summary":"创建或获取钱包账户","operationId":"create_wallet_account_api_v1_wallets_post","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}},{"name":"X-Operator-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Type"}},{"name":"X-Operator-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletAccountCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletAccountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/wallets/{account_id}/balance":{"get":{"tags":["wallet"],"summary":"查询钱包余额","operationId":"get_wallet_balance_api_v1_wallets__account_id__balance_get","parameters":[{"name":"account_id","in":"path","required":true,"schema":{"type":"string","title":"Account Id"}},{"name":"X-Service-Name","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletBalanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/transactions/recharge":{"post":{"tags":["wallet"],"summary":"充值入账","operationId":"recharge_api_v1_transactions_recharge_post","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}},{"name":"X-Operator-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Type"}},{"name":"X-Operator-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RechargeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletTransactionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/transactions/deduct":{"post":{"tags":["wallet"],"summary":"余额扣减","operationId":"deduct_api_v1_transactions_deduct_post","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}},{"name":"X-Operator-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Type"}},{"name":"X-Operator-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeductRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletTransactionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/transactions/refund":{"post":{"tags":["wallet"],"summary":"退款入账","operationId":"refund_api_v1_transactions_refund_post","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}},{"name":"X-Operator-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Type"}},{"name":"X-Operator-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletTransactionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/transactions/freeze":{"post":{"tags":["wallet"],"summary":"冻结余额","operationId":"freeze_api_v1_transactions_freeze_post","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}},{"name":"X-Operator-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Type"}},{"name":"X-Operator-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreezeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletTransactionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/transactions/release-freeze":{"post":{"tags":["wallet"],"summary":"释放冻结余额","operationId":"release_freeze_api_v1_transactions_release_freeze_post","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}},{"name":"X-Operator-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Type"}},{"name":"X-Operator-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReleaseFreezeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletTransactionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/wallets/{wallet_id}/debits":{"post":{"tags":["debit"],"summary":"创建通用扣款","operationId":"create_debit_api_v1_wallets__wallet_id__debits_post","parameters":[{"name":"wallet_id","in":"path","required":true,"schema":{"type":"string","title":"Wallet Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}},{"name":"X-Operator-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Type"}},{"name":"X-Operator-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DebitCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DebitResponse"}}}},"409":{"description":"Debit rejected by wallet rules"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/wallets/{wallet_id}/holds":{"post":{"tags":["debit"],"summary":"创建押金预留","operationId":"create_hold_api_v1_wallets__wallet_id__holds_post","parameters":[{"name":"wallet_id","in":"path","required":true,"schema":{"type":"string","title":"Wallet Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}},{"name":"X-Operator-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Type"}},{"name":"X-Operator-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HoldCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HoldResponse"}}}},"409":{"description":"Hold rejected by wallet rules"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/holds/{hold_id}/release":{"post":{"tags":["debit"],"summary":"释放押金预留","operationId":"release_hold_api_v1_holds__hold_id__release_post","parameters":[{"name":"hold_id","in":"path","required":true,"schema":{"type":"string","title":"Hold Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}},{"name":"X-Operator-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Type"}},{"name":"X-Operator-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HoldReleaseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HoldResponse"}}}},"409":{"description":"Hold release rejected"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/holds/{hold_id}/capture":{"post":{"tags":["debit"],"summary":"押金预留转扣款","operationId":"capture_hold_api_v1_holds__hold_id__capture_post","parameters":[{"name":"hold_id","in":"path","required":true,"schema":{"type":"string","title":"Hold Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}},{"name":"X-Operator-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Type"}},{"name":"X-Operator-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HoldCaptureRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DebitResponse"}}}},"409":{"description":"Hold capture rejected"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/debits/{debit_id}":{"get":{"tags":["debit"],"summary":"查询扣款记录","operationId":"get_debit_api_v1_debits__debit_id__get","parameters":[{"name":"debit_id","in":"path","required":true,"schema":{"type":"string","title":"Debit Id"}},{"name":"X-Service-Name","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DebitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/holds/{hold_id}":{"get":{"tags":["debit"],"summary":"查询押金预留记录","operationId":"get_hold_api_v1_holds__hold_id__get","parameters":[{"name":"hold_id","in":"path","required":true,"schema":{"type":"string","title":"Hold Id"}},{"name":"X-Service-Name","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HoldResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/accounts/balances":{"get":{"tags":["wallet-projections"],"summary":"List Balances","operationId":"list_balances_api_v1_accounts_balances_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_BalanceProjection_"}}}},"400":{"description":"Invalid cursor"},"403":{"description":"ERP reader is not authorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ledger/entries":{"get":{"tags":["wallet-projections"],"summary":"List Ledger","operationId":"list_ledger_api_v1_ledger_entries_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_LedgerProjection_"}}}},"400":{"description":"Invalid cursor"},"403":{"description":"ERP reader is not authorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/withdrawals":{"get":{"tags":["wallet-projections"],"summary":"List Withdrawals","operationId":"list_withdrawals_api_v1_withdrawals_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_WithdrawalProjection_"}}}},"400":{"description":"Invalid cursor"},"403":{"description":"ERP reader is not authorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/top-ups":{"get":{"tags":["wallet-projections"],"summary":"List Top Ups","operationId":"list_top_ups_api_v1_top_ups_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_TopUpProjection_"}}}},"400":{"description":"Invalid cursor"},"403":{"description":"ERP reader is not authorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payment-requests":{"get":{"tags":["wallet-projections"],"summary":"List Payment Requests","operationId":"list_payment_requests_api_v1_payment_requests_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPage_PaymentRequestProjection_"}}}},"400":{"description":"Invalid cursor"},"403":{"description":"ERP reader is not authorized"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payment-requests/query-before-retry":{"get":{"tags":["wallet-projections"],"summary":"Query Payment Request Before Retry","operationId":"query_payment_request_before_retry_api_v1_payment_requests_query_before_retry_get","parameters":[{"name":"source_service","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"Source Service"}},{"name":"payment_request_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"},{"type":"null"}],"title":"Payment Request Id"}},{"name":"idempotency_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":8,"maxLength":128},{"type":"null"}],"title":"Idempotency Key"}},{"name":"correlation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"Correlation Id"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequestProjection"}}}},"403":{"description":"Authenticated source does not match query scope"},"404":{"description":"Fact not found"},"409":{"description":"Ambiguous fact"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ledger-entries":{"get":{"tags":["ledger"],"summary":"查询钱包流水","operationId":"list_ledger_entries_api_v1_ledger_entries_get","parameters":[{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"Company Id"}},{"name":"wallet_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wallet Id"}},{"name":"entry_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/LedgerEntryType"},{"type":"null"}],"title":"Entry Type"}},{"name":"source_service","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"Source Service"}},{"name":"external_ref","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"External Ref"}},{"name":"idempotency_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"Idempotency Key"}},{"name":"currency","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":3,"maxLength":3},{"type":"null"}],"title":"Currency"}},{"name":"created_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created From"}},{"name":"created_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created To"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"X-Service-Name","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerEntryListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/wallets/{wallet_id}/ledger-entries":{"get":{"tags":["ledger"],"summary":"查询指定钱包流水","operationId":"list_wallet_ledger_entries_api_v1_wallets__wallet_id__ledger_entries_get","parameters":[{"name":"wallet_id","in":"path","required":true,"schema":{"type":"string","title":"Wallet Id"}},{"name":"entry_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/LedgerEntryType"},{"type":"null"}],"title":"Entry Type"}},{"name":"source_service","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"Source Service"}},{"name":"external_ref","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"External Ref"}},{"name":"idempotency_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"Idempotency Key"}},{"name":"created_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created From"}},{"name":"created_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created To"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"X-Service-Name","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LedgerEntryListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/ledger-entries/export":{"get":{"tags":["ledger"],"summary":"导出钱包流水 CSV","description":"Read-only CSV export. created_from and created_to are required, the window is limited to 31 days, and results are capped at 10000 rows.","operationId":"export_ledger_entries_api_v1_ledger_entries_export_get","parameters":[{"name":"company_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"Company Id"}},{"name":"wallet_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wallet Id"}},{"name":"entry_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/LedgerEntryType"},{"type":"null"}],"title":"Entry Type"}},{"name":"source_service","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"Source Service"}},{"name":"external_ref","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"External Ref"}},{"name":"idempotency_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"Idempotency Key"}},{"name":"currency","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":3,"maxLength":3},{"type":"null"}],"title":"Currency"}},{"name":"created_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created From"}},{"name":"created_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created To"}},{"name":"X-Service-Name","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payment-methods":{"post":{"tags":["payment-methods"],"summary":"注册 tokenized card-on-file","operationId":"register_payment_method_api_v1_payment_methods_post","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}},{"name":"X-Operator-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Type"}},{"name":"X-Operator-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodRegisterRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentMethodResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/zohobooks/ledger-sync-jobs":{"post":{"tags":["zohobooks"],"summary":"Legacy ZohoBooks sync write (retiring; no new callers)","description":"Deprecated compatibility surface. New integrations use accounting evidence read-back and reconciliation; this write will be disabled and removed under docs/adr/0001-wallet-facts-ledger-boundary.md.","operationId":"create_ledger_sync_job_api_v1_integrations_zohobooks_ledger_sync_jobs_post","deprecated":true,"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}},{"name":"X-Operator-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Type"}},{"name":"X-Operator-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoBooksLedgerSyncRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoBooksSyncJobResponse"}}}},"410":{"description":"ZohoBooks ledger-sync writes have been retired"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/zohobooks/sync-jobs":{"get":{"tags":["zohobooks"],"summary":"查询 ZohoBooks 同步任务列表","operationId":"list_sync_jobs_api_v1_integrations_zohobooks_sync_jobs_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"job_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"X-Service-Name","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ZohoBooksSyncJobResponse"},"title":"Response List Sync Jobs Api V1 Integrations Zohobooks Sync Jobs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/zohobooks/sync-jobs/{job_id}":{"get":{"tags":["zohobooks"],"summary":"查询 ZohoBooks 同步任务","operationId":"get_sync_job_api_v1_integrations_zohobooks_sync_jobs__job_id__get","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"X-Service-Name","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoBooksSyncJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/zohobooks/sync-jobs/{job_id}/retry":{"post":{"tags":["zohobooks"],"summary":"Legacy ZohoBooks retry write (retiring; no new callers)","description":"Deprecated compatibility surface. New integrations use accounting evidence read-back and reconciliation; this write will be disabled and removed under docs/adr/0001-wallet-facts-ledger-boundary.md.","operationId":"retry_sync_job_api_v1_integrations_zohobooks_sync_jobs__job_id__retry_post","deprecated":true,"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}},{"name":"X-Operator-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Type"}},{"name":"X-Operator-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoBooksSyncJobResponse"}}}},"410":{"description":"ZohoBooks sync retries have been retired"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/zohobooks/ledger-links/{ledger_entry_id}":{"get":{"tags":["zohobooks"],"summary":"查询钱包流水的 ZohoBooks 同步结果","operationId":"get_ledger_link_api_v1_integrations_zohobooks_ledger_links__ledger_entry_id__get","parameters":[{"name":"ledger_entry_id","in":"path","required":true,"schema":{"type":"string","title":"Ledger Entry Id"}},{"name":"X-Service-Name","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoBooksLedgerLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/zohobooks/account-mappings":{"get":{"tags":["zohobooks"],"summary":"查询 ZohoBooks 科目映射","operationId":"list_account_mappings_api_v1_integrations_zohobooks_account_mappings_get","parameters":[{"name":"entry_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entry Type"}},{"name":"balance_bucket","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Balance Bucket"}},{"name":"currency","in":"query","required":false,"schema":{"anyOf":[{"type":"string","minLength":3,"maxLength":3},{"type":"null"}],"title":"Currency"}},{"name":"direction","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direction"}},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"X-Service-Name","in":"header","required":false,"schema":{"anyOf":[{"type":"string","minLength":1,"maxLength":128},{"type":"null"}],"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ZohoBooksAccountMappingResponse"},"title":"Response List Account Mappings Api V1 Integrations Zohobooks Account Mappings Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["zohobooks"],"summary":"Legacy ZohoBooks mapping write (retiring; no new callers)","description":"Deprecated compatibility surface. No new mappings may be created; this write will be disabled and removed under docs/adr/0001-wallet-facts-ledger-boundary.md.","operationId":"create_account_mapping_api_v1_integrations_zohobooks_account_mappings_post","deprecated":true,"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}},{"name":"X-Operator-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Type"}},{"name":"X-Operator-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoBooksAccountMappingCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoBooksAccountMappingResponse"}}}},"410":{"description":"ZohoBooks mapping writes have been retired"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/zohobooks/account-mappings/{mapping_id}":{"patch":{"tags":["zohobooks"],"summary":"Legacy ZohoBooks mapping update (retiring; no new callers)","description":"Deprecated compatibility surface. Existing mappings may only be handled during the approved retirement; this write will be disabled and removed under docs/adr/0001-wallet-facts-ledger-boundary.md.","operationId":"update_account_mapping_api_v1_integrations_zohobooks_account_mappings__mapping_id__patch","deprecated":true,"parameters":[{"name":"mapping_id","in":"path","required":true,"schema":{"type":"string","title":"Mapping Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}},{"name":"X-Operator-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Type"}},{"name":"X-Operator-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoBooksAccountMappingUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoBooksAccountMappingResponse"}}}},"410":{"description":"ZohoBooks mapping writes have been retired"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/zohobooks/webhooks":{"post":{"tags":["zohobooks"],"summary":"接收 ZohoBooks webhook","operationId":"receive_webhook_api_v1_integrations_zohobooks_webhooks_post","parameters":[{"name":"X-Zoho-Webhook-Signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Zoho-Webhook-Signature"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZohoBooksSyncJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/stripe/webhooks":{"post":{"tags":["stripe"],"summary":"接收 Stripe webhook","operationId":"receive_stripe_webhook_api_v1_integrations_stripe_webhooks_post","parameters":[{"name":"Stripe-Signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeWebhookEventResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/line-consolidation-flags/{business_line}":{"put":{"tags":["line-consolidation"],"summary":"Set Wallet Stripe webhook cutover owner","description":"Wallet-owned Stripe webhook ingestion cutover switch. It controls whether Wallet accepts Stripe webhook events for a business line; it does not define product, plan, or subscription facts.","operationId":"set_line_flag_api_v1_line_consolidation_flags__business_line__put","parameters":[{"name":"business_line","in":"path","required":true,"schema":{"type":"string","title":"Business Line"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}},{"name":"X-Operator-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Type"}},{"name":"X-Operator-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineConsolidationFlagRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LineConsolidationFlagResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/vendor-withdrawals":{"post":{"tags":["vendor-withdrawals"],"summary":"Create Vendor Withdrawal","operationId":"create_vendor_withdrawal_api_v1_vendor_withdrawals_post","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}},{"name":"X-Operator-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Type"}},{"name":"X-Operator-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorWithdrawalCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorWithdrawalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/vendor-withdrawals/{withdrawal_id}/reservations":{"post":{"tags":["vendor-withdrawals"],"summary":"Reserve Vendor Withdrawal","operationId":"reserve_vendor_withdrawal_api_v1_vendor_withdrawals__withdrawal_id__reservations_post","parameters":[{"name":"withdrawal_id","in":"path","required":true,"schema":{"type":"string","title":"Withdrawal Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}},{"name":"X-Operator-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Type"}},{"name":"X-Operator-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorWithdrawalReserveRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorWithdrawalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/vendor-withdrawals/{withdrawal_id}/releases":{"post":{"tags":["vendor-withdrawals"],"summary":"Release Vendor Withdrawal","operationId":"release_vendor_withdrawal_api_v1_vendor_withdrawals__withdrawal_id__releases_post","parameters":[{"name":"withdrawal_id","in":"path","required":true,"schema":{"type":"string","title":"Withdrawal Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-Request-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Request-Id"}},{"name":"X-Correlation-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Correlation-Id"}},{"name":"X-Operator-Type","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Type"}},{"name":"X-Operator-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Operator-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorWithdrawalReleaseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VendorWithdrawalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/vendor-withdrawals/{withdrawal_id}/offline-payments":{"post":{"tags":["vendor-withdrawals"],"summary":"Record Vendor Offline Payment","operationId":"record_vendor_offline_payment_api_v1_vendor_withdrawals__withdrawal_id__offline_payments_post","parameters":[{"name":"withdrawal_id","in":"path","required":true,"schema":{"type":"string","title":"Withdrawal Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Correlation-ID","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Correlation-Id"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfflinePaymentRecordRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/vendor-withdrawals/{withdrawal_id}/offline-payment-final-registrations":{"post":{"tags":["vendor-withdrawals"],"summary":"Register Vendor Offline Payment","operationId":"register_vendor_offline_payment_api_v1_vendor_withdrawals__withdrawal_id__offline_payment_final_registrations_post","parameters":[{"name":"withdrawal_id","in":"path","required":true,"schema":{"type":"string","title":"Withdrawal Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Correlation-ID","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Correlation-Id"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfflinePaymentFinalRegistrationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/vendor-withdrawals/{withdrawal_id}/offline-payment-registration-exceptions":{"post":{"tags":["vendor-withdrawals"],"summary":"Raise Vendor Offline Payment Registration Exception","operationId":"raise_vendor_offline_payment_registration_exception_api_v1_vendor_withdrawals__withdrawal_id__offline_payment_registration_exceptions_post","parameters":[{"name":"withdrawal_id","in":"path","required":true,"schema":{"type":"string","title":"Withdrawal Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Correlation-ID","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Correlation-Id"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfflinePaymentRegistrationExceptionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/vendor-withdrawals/{withdrawal_id}/offline-payment-registration-corrections":{"post":{"tags":["vendor-withdrawals"],"summary":"Correct Vendor Offline Payment Registration","operationId":"correct_vendor_offline_payment_registration_api_v1_vendor_withdrawals__withdrawal_id__offline_payment_registration_corrections_post","parameters":[{"name":"withdrawal_id","in":"path","required":true,"schema":{"type":"string","title":"Withdrawal Id"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"title":"Idempotency-Key"}},{"name":"X-Service-Name","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Service-Name"}},{"name":"X-Correlation-ID","in":"header","required":true,"schema":{"type":"string","minLength":1,"maxLength":128,"title":"X-Correlation-Id"}},{"name":"X-Service-Token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Service-Token"}},{"name":"Authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentFactCorrectionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentFactCorrectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ApprovalOwnerRef":{"properties":{"owner_type":{"type":"string","maxLength":64,"pattern":"^[^\\x00-\\x20\\x7f]+$","title":"Owner Type"},"owner_id":{"type":"string","maxLength":128,"pattern":"^[^\\x00-\\x20\\x7f]+$","title":"Owner Id"}},"additionalProperties":false,"type":"object","required":["owner_type","owner_id"],"title":"ApprovalOwnerRef"},"ApprovalTransitionRef":{"allOf":[{"if":{"properties":{"request_type":{"const":"prf"}}},"then":{"properties":{"validation_path":{"const":"larus-ops:prf:ceo-final-approval:v1"}}}},{"if":{"properties":{"request_type":{"const":"vendor_withdrawal"}}},"then":{"properties":{"validation_path":{"const":"larus-ops:vendor-withdrawal:ceo-final-approval:v1"}}}}],"properties":{"provider":{"type":"string","const":"larus-ops","title":"Provider"},"approval_ref":{"type":"string","maxLength":256,"pattern":"^[^\\x00-\\x20\\x7f]+$","title":"Approval Ref"},"approval_version":{"type":"integer","multipleOf":1.0,"minimum":1.0,"title":"Approval Version"},"request_ref":{"type":"string","maxLength":256,"pattern":"^[^\\x00-\\x20\\x7f]+$","title":"Request Ref"},"request_type":{"type":"string","enum":["prf","vendor_withdrawal"],"title":"Request Type"},"request_owner":{"$ref":"#/components/schemas/ApprovalOwnerRef"},"decision":{"type":"string","const":"approved","title":"Decision"},"ceo_actor_ref":{"type":"string","maxLength":256,"pattern":"^person:[^\\x00-\\x20\\x7f]+$","title":"Ceo Actor Ref"},"approved_amount":{"type":"integer","multipleOf":1.0,"maximum":9.223372036854776e+18,"exclusiveMinimum":0.0,"title":"Approved Amount"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency"},"payee_hash":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Payee Hash"},"request_hash":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Request Hash","description":"SHA-256 of request_hash_v1"},"decided_at":{"type":"string","format":"date-time","title":"Decided At"},"validation_path":{"type":"string","enum":["larus-ops:prf:ceo-final-approval:v1","larus-ops:vendor-withdrawal:ceo-final-approval:v1"],"title":"Validation Path"},"evidence_refs":{"items":{"type":"string","maxLength":512,"pattern":"^[^\\x00-\\x20\\x7f]+$"},"type":"array","maxItems":32,"minItems":1,"uniqueItems":true,"title":"Evidence Refs"}},"additionalProperties":false,"type":"object","required":["provider","approval_ref","approval_version","request_ref","request_type","request_owner","decision","ceo_actor_ref","approved_amount","currency","payee_hash","request_hash","decided_at","validation_path","evidence_refs"],"title":"ApprovalTransitionRef"},"BalanceBucket":{"type":"string","enum":["amount","special_amount"],"title":"BalanceBucket"},"BalanceProjection":{"properties":{"wallet_id":{"type":"string","title":"Wallet Id"},"owner":{"$ref":"#/components/schemas/OwnerRef"},"currency":{"type":"string","title":"Currency"},"status":{"type":"string","title":"Status"},"amount":{"type":"integer","title":"Amount"},"special_amount":{"type":"integer","title":"Special Amount"},"frozen_amount":{"type":"integer","title":"Frozen Amount"},"frozen_special_amount":{"type":"integer","title":"Frozen Special Amount"},"version":{"type":"integer","title":"Version"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"additionalProperties":false,"type":"object","required":["wallet_id","owner","currency","status","amount","special_amount","frozen_amount","frozen_special_amount","version","updated_at"],"title":"BalanceProjection"},"BillingIntentResponse":{"properties":{"id":{"type":"string","title":"Id"},"source_service":{"type":"string","title":"Source Service"},"idempotency_key":{"type":"string","title":"Idempotency Key"},"business_line":{"type":"string","title":"Business Line"},"external_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference"},"amount":{"type":"integer","title":"Amount"},"currency":{"type":"string","title":"Currency"},"payment_channel":{"type":"string","title":"Payment Channel"},"provider":{"type":"string","title":"Provider"},"version":{"type":"integer","title":"Version"},"status":{"type":"string","title":"Status"},"checkout_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Checkout Url"},"stripe_checkout_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Checkout Session Id","deprecated":true},"stripe_payment_intent_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe Payment Intent Id","deprecated":true},"callback_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Callback Url"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","source_service","idempotency_key","business_line","external_reference","amount","currency","payment_channel","provider","version","status","checkout_url","callback_url","paid_at","metadata"],"title":"BillingIntentResponse"},"BusinessRef":{"properties":{"source_service":{"type":"string","maxLength":128,"minLength":1,"title":"Source Service"},"ref":{"type":"string","maxLength":256,"minLength":1,"title":"Ref"},"version":{"type":"integer","minimum":1.0,"title":"Version"}},"additionalProperties":false,"type":"object","required":["source_service","ref","version"],"title":"BusinessRef"},"CursorPage_BalanceProjection_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/BalanceProjection"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"additionalProperties":false,"type":"object","title":"CursorPage[BalanceProjection]"},"CursorPage_LedgerProjection_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LedgerProjection"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"additionalProperties":false,"type":"object","title":"CursorPage[LedgerProjection]"},"CursorPage_PaymentRequestProjection_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/PaymentRequestProjection"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"additionalProperties":false,"type":"object","title":"CursorPage[PaymentRequestProjection]"},"CursorPage_TopUpProjection_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/TopUpProjection"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"additionalProperties":false,"type":"object","title":"CursorPage[TopUpProjection]"},"CursorPage_WithdrawalProjection_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/WithdrawalProjection"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"additionalProperties":false,"type":"object","title":"CursorPage[WithdrawalProjection]"},"CustomerPaymentIntentCreateRequest":{"properties":{"source_service":{"type":"string","maxLength":128,"minLength":1,"title":"Source Service"},"platform":{"type":"string","enum":["larus","ilease","nrs","btw"],"title":"Platform"},"callback_route":{"type":"string","maxLength":1000,"minLength":1,"title":"Callback Route","description":"HTTPS callback route on the authenticated Operation's configured host; userinfo, query, fragment, and non-443 ports are rejected."},"idempotency_key":{"type":"string","maxLength":128,"minLength":8,"title":"Idempotency Key"},"business_line":{"type":"string","maxLength":64,"minLength":1,"title":"Business Line"},"business_reference":{"type":"string","maxLength":256,"minLength":1,"title":"Business Reference"},"business_reference_version":{"type":"integer","minimum":1.0,"title":"Business Reference Version"},"owner":{"$ref":"#/components/schemas/CustomerPaymentOwner"},"amount_minor":{"type":"integer","maximum":9.223372036854776e+18,"exclusiveMinimum":0.0,"title":"Amount Minor"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency"},"payment_channel":{"type":"string","enum":["wallet_balance","credit_card","subscription"],"title":"Payment Channel"},"provider":{"type":"string","pattern":"^[a-z][a-z0-9_-]{1,31}$|^none$","title":"Provider"},"purpose":{"type":"string","maxLength":128,"minLength":1,"title":"Purpose"},"request_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Request Id"},"correlation_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Correlation Id"}},"additionalProperties":false,"type":"object","required":["source_service","platform","callback_route","idempotency_key","business_line","business_reference","business_reference_version","owner","amount_minor","currency","payment_channel","provider","purpose"],"title":"CustomerPaymentIntentCreateRequest"},"CustomerPaymentIntentResponse":{"properties":{"id":{"type":"string","title":"Id"},"source_service":{"type":"string","title":"Source Service"},"platform":{"type":"string","enum":["larus","ilease","nrs","btw"],"title":"Platform"},"callback_route":{"type":"string","title":"Callback Route"},"idempotency_key":{"type":"string","title":"Idempotency Key"},"request_hash":{"type":"string","title":"Request Hash"},"business_line":{"type":"string","title":"Business Line"},"business_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Reference"},"business_reference_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Business Reference Version"},"owner":{"$ref":"#/components/schemas/CustomerPaymentOwner"},"amount_minor":{"type":"integer","title":"Amount Minor"},"currency":{"type":"string","title":"Currency"},"payment_channel":{"type":"string","title":"Payment Channel"},"provider":{"type":"string","title":"Provider"},"purpose":{"type":"string","title":"Purpose"},"version":{"type":"integer","title":"Version"},"status":{"type":"string","title":"Status"},"correlation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Correlation Id"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id"}},"type":"object","required":["id","source_service","platform","callback_route","idempotency_key","request_hash","business_line","business_reference","business_reference_version","owner","amount_minor","currency","payment_channel","provider","purpose","version","status","correlation_id","request_id"],"title":"CustomerPaymentIntentResponse"},"CustomerPaymentOwner":{"properties":{"type":{"type":"string","enum":["organization","person","user_portal_user"],"title":"Type"},"id":{"type":"string","maxLength":128,"minLength":1,"title":"Id"}},"additionalProperties":false,"type":"object","required":["type","id"],"title":"CustomerPaymentOwner"},"DebitBusinessType":{"type":"string","enum":["ip_lease","abuse_fee","ip_trade_penalty","ip_trade_deposit_capture"],"title":"DebitBusinessType"},"DebitCreateRequest":{"properties":{"amount":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"business_type":{"$ref":"#/components/schemas/DebitBusinessType"},"business_id":{"type":"string","maxLength":128,"minLength":1,"title":"Business Id"},"debit_strategy":{"$ref":"#/components/schemas/DeductStrategy"},"amount_debit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Amount Debit"},"special_amount_debit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Special Amount Debit"},"remark":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Remark"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":128,"minLength":8},{"type":"null"}],"title":"Idempotency Key"},"source_service":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Source Service"},"request_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Request Id"}},"type":"object","required":["amount","business_type","business_id","debit_strategy"],"title":"DebitCreateRequest"},"DebitResponse":{"properties":{"id":{"type":"string","title":"Id"},"debit_no":{"type":"string","title":"Debit No"},"wallet_id":{"type":"string","title":"Wallet Id"},"company_id":{"type":"string","title":"Company Id"},"currency":{"type":"string","title":"Currency"},"amount":{"type":"integer","title":"Amount"},"amount_debited":{"type":"integer","title":"Amount Debited"},"special_amount_debited":{"type":"integer","title":"Special Amount Debited"},"business_type":{"type":"string","title":"Business Type"},"business_id":{"type":"string","title":"Business Id"},"debit_strategy":{"type":"string","title":"Debit Strategy"},"status":{"$ref":"#/components/schemas/DebitStatus"},"ledger_entry_ids":{"items":{"type":"string"},"type":"array","title":"Ledger Entry Ids"},"debited_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Debited At"},"metadata_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata Json"},"remark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remark"},"payment_ref":{"type":"string","title":"Payment Ref","readOnly":true}},"type":"object","required":["id","debit_no","wallet_id","company_id","currency","amount","amount_debited","special_amount_debited","business_type","business_id","debit_strategy","status","ledger_entry_ids","payment_ref"],"title":"DebitResponse"},"DebitStatus":{"type":"string","enum":["pending","succeeded","failed","cancelled"],"title":"DebitStatus"},"DeductRequest":{"properties":{"account_id":{"type":"string","title":"Account Id"},"source_service":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Source Service"},"external_ref":{"type":"string","maxLength":128,"minLength":1,"title":"External Ref"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":128,"minLength":8},{"type":"null"}],"title":"Idempotency Key"},"request_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Request Id"},"reason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Reason"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"amount":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount"},"strategy":{"$ref":"#/components/schemas/DeductStrategy","default":"amount_only"},"amount_debit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Amount Debit"},"special_amount_debit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Special Amount Debit"}},"type":"object","required":["account_id","external_ref","amount"],"title":"DeductRequest"},"DeductStrategy":{"type":"string","enum":["amount_only","special_amount_only","special_then_amount","amount_then_special","split_by_request"],"title":"DeductStrategy"},"FreezeRequest":{"properties":{"account_id":{"type":"string","title":"Account Id"},"source_service":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Source Service"},"external_ref":{"type":"string","maxLength":128,"minLength":1,"title":"External Ref"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":128,"minLength":8},{"type":"null"}],"title":"Idempotency Key"},"request_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Request Id"},"reason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Reason"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"bucket":{"$ref":"#/components/schemas/BalanceBucket"},"amount":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount"}},"type":"object","required":["account_id","external_ref","bucket","amount"],"title":"FreezeRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HoldBusinessType":{"type":"string","enum":["ip_trade_deposit"],"title":"HoldBusinessType"},"HoldCaptureRequest":{"properties":{"amount":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount"},"business_type":{"$ref":"#/components/schemas/DebitBusinessType"},"business_id":{"type":"string","maxLength":128,"minLength":1,"title":"Business Id"},"reason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Reason"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":128,"minLength":8},{"type":"null"}],"title":"Idempotency Key"},"source_service":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Source Service"},"request_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Request Id"}},"type":"object","required":["amount","business_type","business_id"],"title":"HoldCaptureRequest"},"HoldCreateRequest":{"properties":{"amount":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"business_type":{"$ref":"#/components/schemas/HoldBusinessType","default":"ip_trade_deposit"},"business_id":{"type":"string","maxLength":128,"minLength":1,"title":"Business Id"},"hold_strategy":{"$ref":"#/components/schemas/DeductStrategy"},"hold_reason":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Hold Reason"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":128,"minLength":8},{"type":"null"}],"title":"Idempotency Key"},"source_service":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Source Service"},"request_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Request Id"}},"type":"object","required":["amount","business_id","hold_strategy"],"title":"HoldCreateRequest"},"HoldReleaseRequest":{"properties":{"reason":{"type":"string","maxLength":1000,"minLength":1,"title":"Reason"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":128,"minLength":8},{"type":"null"}],"title":"Idempotency Key"},"source_service":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Source Service"},"request_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Request Id"}},"type":"object","required":["reason"],"title":"HoldReleaseRequest"},"HoldResponse":{"properties":{"id":{"type":"string","title":"Id"},"hold_no":{"type":"string","title":"Hold No"},"wallet_id":{"type":"string","title":"Wallet Id"},"company_id":{"type":"string","title":"Company Id"},"currency":{"type":"string","title":"Currency"},"amount":{"type":"integer","title":"Amount"},"held_amount":{"type":"integer","title":"Held Amount"},"held_special_amount":{"type":"integer","title":"Held Special Amount"},"business_type":{"type":"string","title":"Business Type"},"business_id":{"type":"string","title":"Business Id"},"hold_strategy":{"type":"string","title":"Hold Strategy"},"hold_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hold Reason"},"status":{"$ref":"#/components/schemas/HoldStatus"},"ledger_entry_ids":{"items":{"type":"string"},"type":"array","title":"Ledger Entry Ids"},"metadata_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata Json"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"released_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Released At"},"captured_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Captured At"},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancelled At"}},"type":"object","required":["id","hold_no","wallet_id","company_id","currency","amount","held_amount","held_special_amount","business_type","business_id","hold_strategy","status","ledger_entry_ids","created_at"],"title":"HoldResponse"},"HoldStatus":{"type":"string","enum":["active","released","captured","cancelled"],"title":"HoldStatus"},"LedgerEntryListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LedgerEntryResponse"},"type":"array","title":"Items"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","title":"LedgerEntryListResponse"},"LedgerEntryResponse":{"properties":{"id":{"type":"string","title":"Id"},"wallet_id":{"type":"string","title":"Wallet Id"},"owner_type":{"type":"string","title":"Owner Type"},"owner_id":{"type":"string","title":"Owner Id"},"company_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Id"},"currency":{"type":"string","title":"Currency"},"entry_type":{"type":"string","title":"Entry Type"},"source_service":{"type":"string","title":"Source Service"},"external_ref":{"type":"string","title":"External Ref"},"idempotency_key":{"type":"string","title":"Idempotency Key"},"amount_delta":{"type":"integer","title":"Amount Delta"},"special_amount_delta":{"type":"integer","title":"Special Amount Delta"},"frozen_amount_delta":{"type":"integer","title":"Frozen Amount Delta"},"frozen_special_amount_delta":{"type":"integer","title":"Frozen Special Amount Delta"},"balance_after":{"additionalProperties":true,"type":"object","title":"Balance After"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","wallet_id","owner_type","owner_id","company_id","currency","entry_type","source_service","external_ref","idempotency_key","amount_delta","special_amount_delta","frozen_amount_delta","frozen_special_amount_delta","balance_after","created_at"],"title":"LedgerEntryResponse"},"LedgerEntryType":{"type":"string","enum":["recharge","deduct","refund","freeze","release_freeze","hold","release_hold","capture_hold","penalty","vendor_reserve","vendor_release","vendor_offline_payment_final","vendor_offline_payment_final_reversal"],"title":"LedgerEntryType"},"LedgerProjection":{"properties":{"id":{"type":"string","title":"Id"},"wallet_id":{"type":"string","title":"Wallet Id"},"owner":{"$ref":"#/components/schemas/OwnerRef"},"currency":{"type":"string","title":"Currency"},"entry_type":{"type":"string","title":"Entry Type"},"source_service":{"type":"string","title":"Source Service"},"external_ref":{"type":"string","title":"External Ref"},"idempotency_key":{"type":"string","title":"Idempotency Key"},"amount_delta":{"type":"integer","title":"Amount Delta"},"special_amount_delta":{"type":"integer","title":"Special Amount Delta"},"frozen_amount_delta":{"type":"integer","title":"Frozen Amount Delta"},"frozen_special_amount_delta":{"type":"integer","title":"Frozen Special Amount Delta"},"balance_after":{"additionalProperties":true,"type":"object","title":"Balance After"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","required":["id","wallet_id","owner","currency","entry_type","source_service","external_ref","idempotency_key","amount_delta","special_amount_delta","frozen_amount_delta","frozen_special_amount_delta","balance_after","created_at"],"title":"LedgerProjection"},"LineConsolidationFlagRequest":{"properties":{"stripe_webhook_owner":{"type":"string","enum":["wallet","legacy"],"title":"Stripe Webhook Owner"},"subscription_owner":{"type":"string","enum":["wallet","legacy"],"title":"Subscription Owner","description":"Deprecated compatibility field with no runtime consumer; retained until the 410 subscription surface is retired.","deprecated":true}},"additionalProperties":false,"type":"object","required":["stripe_webhook_owner","subscription_owner"],"title":"LineConsolidationFlagRequest"},"LineConsolidationFlagResponse":{"properties":{"business_line":{"type":"string","title":"Business Line"},"stripe_webhook_owner":{"type":"string","title":"Stripe Webhook Owner"},"subscription_owner":{"type":"string","title":"Subscription Owner","description":"Deprecated compatibility field with no runtime consumer; retained until the 410 subscription surface is retired.","deprecated":true}},"type":"object","required":["business_line","stripe_webhook_owner","subscription_owner"],"title":"LineConsolidationFlagResponse"},"OfflineBankTransferRechargeCreate":{"properties":{"company_id":{"type":"string","maxLength":128,"minLength":1,"title":"Company Id"},"user_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"User Id"},"amount":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"target_balance":{"$ref":"#/components/schemas/BalanceBucket"},"source_id":{"type":"string","maxLength":128,"minLength":1,"title":"Source Id"},"external_reference":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"External Reference"},"remark":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Remark"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":128,"minLength":8},{"type":"null"}],"title":"Idempotency Key"},"source_service":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Source Service"},"request_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Request Id"}},"type":"object","required":["company_id","amount","target_balance","source_id"],"title":"OfflineBankTransferRechargeCreate"},"OfflinePaymentFinalRegistrationRequest":{"properties":{"current_status":{"type":"string","const":"paid_offline","title":"Current Status"},"transition":{"type":"string","const":"register","title":"Transition"},"expected_version":{"type":"integer","minimum":0.0,"title":"Expected Version"},"idempotency_key":{"type":"string","maxLength":128,"minLength":8,"title":"Idempotency Key"},"correlation_id":{"type":"string","maxLength":128,"minLength":1,"title":"Correlation Id"},"offline_result":{"type":"null","title":"Offline Result"},"reason":{"type":"string","maxLength":1000,"minLength":1,"title":"Reason"},"owner":{"$ref":"#/components/schemas/OwnerRef"}},"additionalProperties":false,"type":"object","required":["current_status","transition","expected_version","idempotency_key","correlation_id","reason","owner"],"title":"OfflinePaymentFinalRegistrationRequest"},"OfflinePaymentRecordRequest":{"properties":{"current_status":{"type":"string","const":"awaiting_manual_payment","title":"Current Status"},"transition":{"type":"string","const":"record_offline","title":"Transition"},"expected_version":{"type":"integer","minimum":0.0,"title":"Expected Version"},"idempotency_key":{"type":"string","maxLength":128,"minLength":8,"title":"Idempotency Key"},"correlation_id":{"type":"string","maxLength":128,"minLength":1,"title":"Correlation Id"},"offline_result":{"$ref":"#/components/schemas/OfflinePaymentResult"},"reason":{"anyOf":[{"type":"string","maxLength":1000,"minLength":1},{"type":"null"}],"title":"Reason"},"owner":{"$ref":"#/components/schemas/OwnerRef"}},"additionalProperties":false,"type":"object","required":["current_status","transition","expected_version","idempotency_key","correlation_id","offline_result","owner"],"title":"OfflinePaymentRecordRequest"},"OfflinePaymentRegistrationExceptionRequest":{"properties":{"current_status":{"type":"string","const":"paid_offline","title":"Current Status"},"transition":{"type":"string","const":"raise_registration_exception","title":"Transition"},"expected_version":{"type":"integer","minimum":0.0,"title":"Expected Version"},"idempotency_key":{"type":"string","maxLength":128,"minLength":8,"title":"Idempotency Key"},"correlation_id":{"type":"string","maxLength":128,"minLength":1,"title":"Correlation Id"},"offline_result":{"type":"null","title":"Offline Result"},"reason":{"type":"string","maxLength":1000,"minLength":1,"title":"Reason"},"owner":{"$ref":"#/components/schemas/OwnerRef"}},"additionalProperties":false,"type":"object","required":["current_status","transition","expected_version","idempotency_key","correlation_id","reason","owner"],"title":"OfflinePaymentRegistrationExceptionRequest"},"OfflinePaymentResult":{"properties":{"amount":{"type":"integer","maximum":9.223372036854776e+18,"exclusiveMinimum":0.0,"title":"Amount"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At"},"authority_actor_ref":{"type":"string","maxLength":256,"minLength":1,"title":"Authority Actor Ref"},"evidence_ref":{"type":"string","maxLength":512,"minLength":1,"title":"Evidence Ref"},"evidence_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$","title":"Evidence Sha256"},"reason":{"type":"string","maxLength":1000,"minLength":1,"title":"Reason"}},"additionalProperties":false,"type":"object","required":["amount","currency","occurred_at","authority_actor_ref","evidence_ref","evidence_sha256","reason"],"title":"OfflinePaymentResult"},"OwnerRef":{"properties":{"owner_type":{"type":"string","maxLength":64,"minLength":1,"title":"Owner Type"},"owner_id":{"type":"string","maxLength":128,"minLength":1,"title":"Owner Id"}},"additionalProperties":false,"type":"object","required":["owner_type","owner_id"],"title":"OwnerRef"},"PayeeSnapshot":{"properties":{"payee_type":{"type":"string","maxLength":64,"minLength":1,"title":"Payee Type"},"payee_id":{"type":"string","maxLength":128,"minLength":1,"title":"Payee Id"},"display_name":{"type":"string","maxLength":256,"minLength":1,"title":"Display Name"},"payment_account_ref":{"type":"string","maxLength":256,"minLength":1,"title":"Payment Account Ref"},"snapshot_version":{"type":"integer","minimum":1.0,"title":"Snapshot Version"}},"additionalProperties":false,"type":"object","required":["payee_type","payee_id","display_name","payment_account_ref","snapshot_version"],"title":"PayeeSnapshot"},"PaymentFactCorrectionRequest":{"properties":{"owner":{"$ref":"#/components/schemas/OwnerRef"},"current_status":{"type":"string","const":"registered","title":"Current Status"},"expected_version":{"type":"integer","minimum":1.0,"title":"Expected Version"},"idempotency_key":{"type":"string","maxLength":128,"minLength":8,"title":"Idempotency Key"},"correlation_id":{"type":"string","maxLength":128,"minLength":1,"title":"Correlation Id"},"correction_ref":{"type":"string","maxLength":512,"pattern":"^[^\\x00-\\x20\\x7f]+$","title":"Correction Ref"},"reason":{"type":"string","maxLength":1000,"minLength":1,"title":"Reason"}},"additionalProperties":false,"type":"object","required":["owner","current_status","expected_version","idempotency_key","correlation_id","correction_ref","reason"],"title":"PaymentFactCorrectionRequest"},"PaymentFactCorrectionResponse":{"properties":{"payment_request_id":{"type":"string","maxLength":128,"minLength":1,"title":"Payment Request Id"},"withdrawal_id":{"type":"string","maxLength":128,"minLength":1,"title":"Withdrawal Id"},"idempotency_key":{"type":"string","maxLength":128,"minLength":8,"title":"Idempotency Key"},"status":{"type":"string","const":"registration_exception","title":"Status"},"version":{"type":"integer","minimum":1.0,"title":"Version"},"correlation_id":{"type":"string","maxLength":128,"minLength":1,"title":"Correlation Id"},"original_ledger_transaction_id":{"type":"string","maxLength":128,"minLength":1,"title":"Original Ledger Transaction Id"},"correction_ledger_transaction_id":{"type":"string","maxLength":128,"minLength":1,"title":"Correction Ledger Transaction Id"}},"additionalProperties":false,"type":"object","required":["payment_request_id","withdrawal_id","idempotency_key","status","version","correlation_id","original_ledger_transaction_id","correction_ledger_transaction_id"],"title":"PaymentFactCorrectionResponse"},"PaymentMethodRegisterRequest":{"properties":{"owner_type":{"type":"string","maxLength":64,"minLength":1,"title":"Owner Type"},"owner_id":{"type":"string","maxLength":128,"minLength":1,"title":"Owner Id"},"provider":{"type":"string","const":"stripe","title":"Provider","default":"stripe"},"provider_customer_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Provider Customer Id"},"provider_payment_method_id":{"type":"string","maxLength":128,"minLength":3,"title":"Provider Payment Method Id"},"card_brand":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Card Brand"},"card_last4":{"anyOf":[{"type":"string","maxLength":4,"minLength":4},{"type":"null"}],"title":"Card Last4"},"card_exp_month":{"anyOf":[{"type":"integer","maximum":12.0,"minimum":1.0},{"type":"null"}],"title":"Card Exp Month"},"card_exp_year":{"anyOf":[{"type":"integer","maximum":9999.0,"minimum":2000.0},{"type":"null"}],"title":"Card Exp Year"},"is_default":{"type":"boolean","title":"Is Default","default":false},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"additionalProperties":false,"type":"object","required":["owner_type","owner_id","provider_payment_method_id"],"title":"PaymentMethodRegisterRequest"},"PaymentMethodResponse":{"properties":{"id":{"type":"string","title":"Id"},"owner_type":{"type":"string","title":"Owner Type"},"owner_id":{"type":"string","title":"Owner Id"},"provider":{"type":"string","title":"Provider"},"provider_customer_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Customer Id"},"provider_payment_method_id":{"type":"string","title":"Provider Payment Method Id"},"card_brand":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Brand"},"card_last4":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Card Last4"},"card_exp_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Card Exp Month"},"card_exp_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Card Exp Year"},"status":{"type":"string","title":"Status"},"is_default":{"type":"boolean","title":"Is Default"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","owner_type","owner_id","provider","provider_customer_id","provider_payment_method_id","card_brand","card_last4","card_exp_month","card_exp_year","status","is_default","metadata"],"title":"PaymentMethodResponse"},"PaymentRequestProjection":{"properties":{"payment_request_id":{"type":"string","title":"Payment Request Id"},"withdrawal_id":{"type":"string","title":"Withdrawal Id"},"owner":{"$ref":"#/components/schemas/OwnerRef"},"amount":{"type":"integer","title":"Amount"},"currency":{"type":"string","title":"Currency"},"business_ref":{"$ref":"#/components/schemas/BusinessRef"},"source_service":{"type":"string","title":"Source Service"},"status":{"type":"string","title":"Status"},"version":{"type":"integer","title":"Version"},"correlation_id":{"type":"string","title":"Correlation Id"},"ledger_transaction_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ledger Transaction Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","required":["payment_request_id","withdrawal_id","owner","amount","currency","business_ref","source_service","status","version","correlation_id","created_at"],"title":"PaymentRequestProjection"},"PaymentRequestResponse":{"properties":{"payment_request_id":{"type":"string","maxLength":128,"minLength":1,"title":"Payment Request Id"},"withdrawal_id":{"type":"string","maxLength":128,"minLength":1,"title":"Withdrawal Id"},"idempotency_key":{"type":"string","maxLength":128,"minLength":8,"title":"Idempotency Key"},"owner":{"$ref":"#/components/schemas/OwnerRef"},"amount":{"type":"integer","maximum":9.223372036854776e+18,"exclusiveMinimum":0.0,"title":"Amount"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency"},"payee_snapshot":{"$ref":"#/components/schemas/PayeeSnapshot"},"business_ref":{"$ref":"#/components/schemas/BusinessRef"},"approval":{"anyOf":[{"$ref":"#/components/schemas/ApprovalTransitionRef"},{"type":"null"}]},"status":{"$ref":"#/components/schemas/PaymentRequestStatus"},"version":{"type":"integer","minimum":1.0,"title":"Version"},"correlation_id":{"type":"string","maxLength":128,"minLength":1,"title":"Correlation Id"},"ledger_transaction_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Ledger Transaction Id"}},"additionalProperties":false,"type":"object","required":["payment_request_id","withdrawal_id","idempotency_key","owner","amount","currency","payee_snapshot","business_ref","status","version","correlation_id"],"title":"PaymentRequestResponse"},"PaymentRequestStatus":{"type":"string","enum":["requested","pending_approval","rejected","awaiting_manual_payment","cancelled","paid_offline","registered","registration_exception","reconciliation_exception"],"title":"PaymentRequestStatus"},"RechargeChannel":{"type":"string","enum":["offline_bank_transfer","stripe","manual_adjustment","migration"],"title":"RechargeChannel"},"RechargeConfirmBySourceRequest":{"properties":{"external_reference":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"External Reference"},"confirmed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Confirmed At"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":128,"minLength":8},{"type":"null"}],"title":"Idempotency Key"},"source_service":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Source Service"},"request_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Request Id"},"channel":{"$ref":"#/components/schemas/RechargeChannel"},"source_id":{"type":"string","maxLength":128,"minLength":1,"title":"Source Id"},"paid_amount":{"type":"integer","exclusiveMinimum":0.0,"title":"Paid Amount"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"}},"type":"object","required":["channel","source_id","paid_amount","currency"],"title":"RechargeConfirmBySourceRequest"},"RechargeConfirmRequest":{"properties":{"external_reference":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"External Reference"},"confirmed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Confirmed At"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":128,"minLength":8},{"type":"null"}],"title":"Idempotency Key"},"source_service":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Source Service"},"request_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Request Id"}},"type":"object","title":"RechargeConfirmRequest"},"RechargeCreditResponse":{"properties":{"recharge_id":{"type":"string","title":"Recharge Id"},"wallet_id":{"type":"string","title":"Wallet Id"},"status":{"$ref":"#/components/schemas/RechargeStatus"},"target_balance":{"$ref":"#/components/schemas/BalanceBucket"},"amount":{"type":"integer","title":"Amount"},"currency":{"type":"string","title":"Currency"},"before_balance":{"type":"integer","title":"Before Balance"},"after_balance":{"type":"integer","title":"After Balance"},"ledger_entry_id":{"type":"string","title":"Ledger Entry Id"}},"type":"object","required":["recharge_id","wallet_id","status","target_balance","amount","currency","before_balance","after_balance","ledger_entry_id"],"title":"RechargeCreditResponse"},"RechargeRejectRequest":{"properties":{"reason":{"type":"string","maxLength":1000,"minLength":1,"title":"Reason"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":128,"minLength":8},{"type":"null"}],"title":"Idempotency Key"},"source_service":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Source Service"},"request_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Request Id"}},"type":"object","required":["reason"],"title":"RechargeRejectRequest"},"RechargeRequest":{"properties":{"account_id":{"type":"string","title":"Account Id"},"source_service":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Source Service"},"external_ref":{"type":"string","maxLength":128,"minLength":1,"title":"External Ref"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":128,"minLength":8},{"type":"null"}],"title":"Idempotency Key"},"request_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Request Id"},"reason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Reason"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"bucket":{"$ref":"#/components/schemas/BalanceBucket"},"amount":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount"}},"type":"object","required":["account_id","external_ref","bucket","amount"],"title":"RechargeRequest"},"RechargeResponse":{"properties":{"id":{"type":"string","title":"Id"},"recharge_no":{"type":"string","title":"Recharge No"},"company_id":{"type":"string","title":"Company Id"},"user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Id"},"wallet_id":{"type":"string","title":"Wallet Id"},"currency":{"type":"string","title":"Currency"},"amount":{"type":"integer","title":"Amount"},"target_balance":{"type":"string","title":"Target Balance"},"channel":{"type":"string","title":"Channel"},"status":{"type":"string","title":"Status"},"source_id":{"type":"string","title":"Source Id"},"external_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Reference"},"ledger_entry_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ledger Entry Id"},"metadata_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata Json"},"remark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remark"},"confirmed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Confirmed At"},"credited_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Credited At"},"rejected_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Rejected At"},"reject_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reject Reason"}},"type":"object","required":["id","recharge_no","company_id","user_id","wallet_id","currency","amount","target_balance","channel","status","source_id","external_reference"],"title":"RechargeResponse"},"RechargeStatsResponse":{"properties":{"company_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Id"},"currency":{"type":"string","title":"Currency"},"total_recharged":{"type":"integer","title":"Total Recharged"},"stripe_total":{"type":"integer","title":"Stripe Total"},"offline_bank_transfer_total":{"type":"integer","title":"Offline Bank Transfer Total"},"amount_total":{"type":"integer","title":"Amount Total"},"special_amount_total":{"type":"integer","title":"Special Amount Total"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["company_id","currency","total_recharged","stripe_total","offline_bank_transfer_total","amount_total","special_amount_total","count"],"title":"RechargeStatsResponse"},"RechargeStatus":{"type":"string","enum":["pending","reviewing","confirmed","credited","rejected","failed","cancelled"],"title":"RechargeStatus"},"RefundRequest":{"properties":{"account_id":{"type":"string","title":"Account Id"},"source_service":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Source Service"},"external_ref":{"type":"string","maxLength":128,"minLength":1,"title":"External Ref"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":128,"minLength":8},{"type":"null"}],"title":"Idempotency Key"},"request_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Request Id"},"reason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Reason"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"refund_to":{"$ref":"#/components/schemas/BalanceBucket"},"amount":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount"}},"type":"object","required":["account_id","external_ref","refund_to","amount"],"title":"RefundRequest"},"ReleaseFreezeRequest":{"properties":{"account_id":{"type":"string","title":"Account Id"},"source_service":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Source Service"},"external_ref":{"type":"string","maxLength":128,"minLength":1,"title":"External Ref"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":128,"minLength":8},{"type":"null"}],"title":"Idempotency Key"},"request_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Request Id"},"reason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Reason"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"bucket":{"$ref":"#/components/schemas/BalanceBucket"},"amount":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount"}},"type":"object","required":["account_id","external_ref","bucket","amount"],"title":"ReleaseFreezeRequest"},"StripeRechargeCreate":{"properties":{"company_id":{"type":"string","maxLength":128,"minLength":1,"title":"Company Id"},"user_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"User Id"},"amount":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"target_balance":{"$ref":"#/components/schemas/BalanceBucket"},"source_id":{"type":"string","maxLength":128,"minLength":1,"title":"Source Id"},"external_reference":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"External Reference"},"remark":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Remark"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":128,"minLength":8},{"type":"null"}],"title":"Idempotency Key"},"source_service":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Source Service"},"request_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Request Id"},"credit_card_fee_amount":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Credit Card Fee Amount"},"stripe_payment_amount":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Stripe Payment Amount"},"stripe_fee_amount":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Stripe Fee Amount"},"recharge_adjustment_amount":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Recharge Adjustment Amount"}},"type":"object","required":["company_id","amount","target_balance","source_id"],"title":"StripeRechargeCreate"},"StripeVerifyAndCreditRequest":{"properties":{"company_id":{"type":"string","maxLength":128,"minLength":1,"title":"Company Id"},"user_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"User Id"},"stripe_id":{"type":"string","maxLength":128,"minLength":1,"title":"Stripe Id"},"stripe_object_type":{"anyOf":[{"type":"string","enum":["payment_intent","checkout_session"]},{"type":"null"}],"title":"Stripe Object Type"},"amount":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount"},"credit_card_fee_amount":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Credit Card Fee Amount"},"stripe_payment_amount":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Stripe Payment Amount"},"stripe_fee_amount":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Stripe Fee Amount"},"recharge_adjustment_amount":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Recharge Adjustment Amount"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"target_balance":{"$ref":"#/components/schemas/BalanceBucket"},"external_reference":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"External Reference"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":128,"minLength":8},{"type":"null"}],"title":"Idempotency Key"},"source_service":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Source Service"},"request_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Request Id"}},"type":"object","required":["company_id","stripe_id","amount","target_balance"],"title":"StripeVerifyAndCreditRequest"},"StripeWebhookEventResponse":{"properties":{"id":{"type":"string","title":"Id"},"stripe_event_id":{"type":"string","title":"Stripe Event Id"},"idempotency_key":{"type":"string","title":"Idempotency Key"},"event_type":{"type":"string","title":"Event Type"},"object_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Object Id"},"object_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Object Type"},"business_line":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Business Line"},"status":{"type":"string","title":"Status"},"duplicate":{"type":"boolean","title":"Duplicate","default":false},"received_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Received At"}},"type":"object","required":["id","stripe_event_id","idempotency_key","event_type","object_id","object_type","business_line","status"],"title":"StripeWebhookEventResponse"},"TopUpProjection":{"properties":{"top_up_id":{"type":"string","title":"Top Up Id"},"wallet_id":{"type":"string","title":"Wallet Id"},"owner":{"$ref":"#/components/schemas/OwnerRef"},"amount":{"type":"integer","title":"Amount"},"currency":{"type":"string","title":"Currency"},"channel":{"type":"string","title":"Channel"},"status":{"type":"string","title":"Status"},"source_service":{"type":"string","title":"Source Service"},"source_id":{"type":"string","title":"Source Id"},"ledger_entry_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ledger Entry Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","required":["top_up_id","wallet_id","owner","amount","currency","channel","status","source_service","source_id","created_at"],"title":"TopUpProjection"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VendorWithdrawalCreate":{"properties":{"owner":{"$ref":"#/components/schemas/OwnerRef"},"amount":{"type":"integer","maximum":9.223372036854776e+18,"exclusiveMinimum":0.0,"title":"Amount"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency"},"payee_snapshot":{"$ref":"#/components/schemas/PayeeSnapshot"},"business_ref":{"$ref":"#/components/schemas/BusinessRef"},"purpose":{"type":"string","maxLength":128,"minLength":1,"title":"Purpose"},"idempotency_key":{"type":"string","maxLength":128,"minLength":8,"title":"Idempotency Key"},"correlation_id":{"type":"string","maxLength":128,"minLength":1,"title":"Correlation Id"},"expected_version":{"type":"integer","const":0,"title":"Expected Version"}},"additionalProperties":false,"type":"object","required":["owner","amount","currency","payee_snapshot","business_ref","purpose","idempotency_key","correlation_id","expected_version"],"title":"VendorWithdrawalCreate"},"VendorWithdrawalReleaseDisposition":{"type":"string","enum":["pre_payment_cancelled"],"title":"VendorWithdrawalReleaseDisposition"},"VendorWithdrawalReleaseRequest":{"properties":{"owner":{"$ref":"#/components/schemas/OwnerRef"},"disposition":{"$ref":"#/components/schemas/VendorWithdrawalReleaseDisposition"},"reason":{"type":"string","maxLength":1000,"minLength":1,"title":"Reason"},"expected_version":{"type":"integer","minimum":1.0,"title":"Expected Version"},"idempotency_key":{"type":"string","maxLength":128,"minLength":8,"title":"Idempotency Key"},"correlation_id":{"type":"string","maxLength":128,"minLength":1,"title":"Correlation Id"}},"additionalProperties":false,"type":"object","required":["owner","disposition","reason","expected_version","idempotency_key","correlation_id"],"title":"VendorWithdrawalReleaseRequest"},"VendorWithdrawalReserveRequest":{"properties":{"owner":{"$ref":"#/components/schemas/OwnerRef"},"approval":{"$ref":"#/components/schemas/ApprovalTransitionRef"},"expected_version":{"type":"integer","minimum":1.0,"title":"Expected Version"},"idempotency_key":{"type":"string","maxLength":128,"minLength":8,"title":"Idempotency Key"},"correlation_id":{"type":"string","maxLength":128,"minLength":1,"title":"Correlation Id"}},"additionalProperties":false,"type":"object","required":["owner","approval","expected_version","idempotency_key","correlation_id"],"title":"VendorWithdrawalReserveRequest"},"VendorWithdrawalResponse":{"properties":{"withdrawal_id":{"type":"string","maxLength":128,"minLength":1,"title":"Withdrawal Id"},"owner":{"$ref":"#/components/schemas/OwnerRef"},"amount":{"type":"integer","maximum":9.223372036854776e+18,"exclusiveMinimum":0.0,"title":"Amount"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","title":"Currency"},"payee_snapshot":{"$ref":"#/components/schemas/PayeeSnapshot"},"business_ref":{"$ref":"#/components/schemas/BusinessRef"},"purpose":{"type":"string","maxLength":128,"minLength":1,"title":"Purpose"},"idempotency_key":{"type":"string","maxLength":128,"minLength":8,"title":"Idempotency Key"},"correlation_id":{"type":"string","maxLength":128,"minLength":1,"title":"Correlation Id"},"status":{"type":"string","enum":["requested","reserved","released"],"title":"Status"},"version":{"type":"integer","minimum":1.0,"title":"Version"},"approval_ref":{"anyOf":[{"$ref":"#/components/schemas/ApprovalTransitionRef"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["withdrawal_id","owner","amount","currency","payee_snapshot","business_ref","purpose","idempotency_key","correlation_id","status","version"],"title":"VendorWithdrawalResponse"},"WalletAccountCreate":{"properties":{"owner_type":{"type":"string","maxLength":64,"minLength":1,"title":"Owner Type"},"owner_id":{"type":"string","maxLength":128,"minLength":1,"title":"Owner Id"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"USD"},"idempotency_key":{"anyOf":[{"type":"string","maxLength":128,"minLength":8},{"type":"null"}],"title":"Idempotency Key"},"source_service":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Source Service"},"request_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Request Id"}},"type":"object","required":["owner_type","owner_id"],"title":"WalletAccountCreate"},"WalletAccountResponse":{"properties":{"id":{"type":"string","title":"Id"},"owner_type":{"type":"string","title":"Owner Type"},"owner_id":{"type":"string","title":"Owner Id"},"currency":{"type":"string","title":"Currency"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","owner_type","owner_id","currency","status"],"title":"WalletAccountResponse"},"WalletBalanceResponse":{"properties":{"account_id":{"type":"string","title":"Account Id"},"amount":{"type":"integer","title":"Amount"},"special_amount":{"type":"integer","title":"Special Amount"},"frozen_amount":{"type":"integer","title":"Frozen Amount"},"frozen_special_amount":{"type":"integer","title":"Frozen Special Amount"},"currency":{"type":"string","title":"Currency"},"version":{"type":"integer","title":"Version"}},"type":"object","required":["account_id","amount","special_amount","frozen_amount","frozen_special_amount","currency","version"],"title":"WalletBalanceResponse"},"WalletTransactionResponse":{"properties":{"ledger_entry_id":{"type":"string","title":"Ledger Entry Id"},"account_id":{"type":"string","title":"Account Id"},"entry_type":{"type":"string","title":"Entry Type"},"amount_delta":{"type":"integer","title":"Amount Delta"},"special_amount_delta":{"type":"integer","title":"Special Amount Delta"},"frozen_amount_delta":{"type":"integer","title":"Frozen Amount Delta"},"frozen_special_amount_delta":{"type":"integer","title":"Frozen Special Amount Delta"},"balance":{"$ref":"#/components/schemas/WalletBalanceResponse"}},"type":"object","required":["ledger_entry_id","account_id","entry_type","amount_delta","special_amount_delta","frozen_amount_delta","frozen_special_amount_delta","balance"],"title":"WalletTransactionResponse"},"WithdrawalProjection":{"properties":{"withdrawal_id":{"type":"string","title":"Withdrawal Id"},"wallet_id":{"type":"string","title":"Wallet Id"},"owner":{"$ref":"#/components/schemas/OwnerRef"},"amount":{"type":"integer","title":"Amount"},"currency":{"type":"string","title":"Currency"},"business_ref":{"$ref":"#/components/schemas/BusinessRef"},"purpose":{"type":"string","title":"Purpose"},"status":{"type":"string","title":"Status"},"version":{"type":"integer","title":"Version"},"correlation_id":{"type":"string","title":"Correlation Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"additionalProperties":false,"type":"object","required":["withdrawal_id","wallet_id","owner","amount","currency","business_ref","purpose","status","version","correlation_id","created_at"],"title":"WithdrawalProjection"},"ZohoBooksAccountMappingCreateRequest":{"properties":{"entry_type":{"type":"string","maxLength":32,"minLength":1,"title":"Entry Type"},"balance_bucket":{"type":"string","enum":["amount","special_amount"],"title":"Balance Bucket"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency"},"direction":{"type":"string","enum":["debit","credit"],"title":"Direction"},"zoho_account_id":{"type":"string","maxLength":128,"minLength":1,"title":"Zoho Account Id"},"zoho_account_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Zoho Account Name"},"is_active":{"type":"boolean","title":"Is Active","default":true},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["entry_type","balance_bucket","currency","direction","zoho_account_id"],"title":"ZohoBooksAccountMappingCreateRequest"},"ZohoBooksAccountMappingResponse":{"properties":{"id":{"type":"string","title":"Id"},"entry_type":{"type":"string","title":"Entry Type"},"balance_bucket":{"type":"string","title":"Balance Bucket"},"currency":{"type":"string","title":"Currency"},"direction":{"type":"string","title":"Direction"},"zoho_account_id":{"type":"string","title":"Zoho Account Id"},"zoho_account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zoho Account Name"},"is_active":{"type":"boolean","title":"Is Active"},"metadata_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata Json"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","entry_type","balance_bucket","currency","direction","zoho_account_id","is_active","created_at","updated_at"],"title":"ZohoBooksAccountMappingResponse"},"ZohoBooksAccountMappingUpdateRequest":{"properties":{"entry_type":{"anyOf":[{"type":"string","maxLength":32,"minLength":1},{"type":"null"}],"title":"Entry Type"},"balance_bucket":{"anyOf":[{"type":"string","enum":["amount","special_amount"]},{"type":"null"}],"title":"Balance Bucket"},"currency":{"anyOf":[{"type":"string","maxLength":3,"minLength":3},{"type":"null"}],"title":"Currency"},"direction":{"anyOf":[{"type":"string","enum":["debit","credit"]},{"type":"null"}],"title":"Direction"},"zoho_account_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Zoho Account Id"},"zoho_account_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Zoho Account Name"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","title":"ZohoBooksAccountMappingUpdateRequest"},"ZohoBooksLedgerLinkResponse":{"properties":{"id":{"type":"string","title":"Id"},"ledger_entry_id":{"type":"string","title":"Ledger Entry Id"},"job_id":{"type":"string","title":"Job Id"},"zoho_journal_id":{"type":"string","title":"Zoho Journal Id"},"zoho_entry_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zoho Entry Number"},"status":{"type":"string","title":"Status"},"synced_at":{"type":"string","format":"date-time","title":"Synced At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","ledger_entry_id","job_id","zoho_journal_id","status","synced_at","created_at"],"title":"ZohoBooksLedgerLinkResponse"},"ZohoBooksLedgerSyncRequest":{"properties":{"source_service":{"type":"string","maxLength":128,"minLength":1,"title":"Source Service"},"external_ref":{"type":"string","maxLength":128,"minLength":1,"title":"External Ref"},"idempotency_key":{"type":"string","maxLength":128,"minLength":8,"title":"Idempotency Key"},"ledger_entry_ids":{"items":{"type":"string"},"type":"array","title":"Ledger Entry Ids"},"account_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Id"},"start_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"End Date"},"mode":{"type":"string","enum":["ledger_entries","account_range"],"title":"Mode","default":"ledger_entries"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["source_service","external_ref","idempotency_key"],"title":"ZohoBooksLedgerSyncRequest"},"ZohoBooksSyncJobResponse":{"properties":{"id":{"type":"string","title":"Id"},"job_type":{"type":"string","title":"Job Type"},"source_service":{"type":"string","title":"Source Service"},"external_ref":{"type":"string","title":"External Ref"},"idempotency_key":{"type":"string","title":"Idempotency Key"},"status":{"type":"string","title":"Status"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"retry_count":{"type":"integer","title":"Retry Count","default":0},"available_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Available At"},"locked_until":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Locked Until"}},"type":"object","required":["id","job_type","source_service","external_ref","idempotency_key","status","payload"],"title":"ZohoBooksSyncJobResponse"}}}}