{"openapi":"3.0.3","info":{"title":"Turbofy Gateway API","version":"2.0.0","description":"\n## Turbofy Gateway de Pagamentos & Marketplace\n\nAPI completa para:\n- **Gateway de Pagamentos**: Cobranças Pix, Boleto e Cartão\n- **Split de Pagamentos**: Divisão automática entre produtores, afiliados e coprodutores\n- **Marketplace de Infoprodutos**: Cursos, matrículas, progresso e certificados\n- **Checkout White-label**: Páginas de pagamento personalizadas\n- **Sellers**: Integrações públicas de cobrança, saque e webhook para sellers\n\n### Autenticação\n\nA API suporta dois métodos de autenticação:\n\n1. **Bearer Token (JWT)**: Para usuários autenticados\n   - Header: `Authorization: Bearer <token>`\n   \n2. **Client Credentials**: Para integradores server-to-server (`/sellers`, com alias legado temporário `/rifeiro`)\n   - Headers: `x-client-id` e `x-client-secret`\n\n### Idempotência\n\nOperações financeiras suportam idempotência via header:\n- `x-idempotency-key: <uuid>`\n\n### Rate Limiting\n\n- 100 requests/minuto por IP em produção\n- 1000 requests/minuto em desenvolvimento\n        ","contact":{"name":"Turbofy Team","email":"suporte@turbofy.com","url":"https://turbofy.com"},"license":{"name":"Proprietary","url":"https://turbofy.com/terms"}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT token obtido via /auth/login"},"clientCredentials":{"type":"apiKey","in":"header","name":"x-client-id","description":"Client ID para autenticação de integradores"},"clientSecret":{"type":"apiKey","in":"header","name":"x-client-secret","description":"Client Secret para autenticação de integradores"}},"schemas":{"Pagination":{"type":"object","properties":{"total":{"type":"integer","description":"Total de registros"},"limit":{"type":"integer","description":"Registros por página"},"offset":{"type":"integer","description":"Offset atual"},"hasMore":{"type":"boolean","description":"Há mais registros?"}}},"LoginRequest":{"type":"object","properties":{"email":{"type":"string","format":"email","example":"user@example.com"},"password":{"type":"string","minLength":8,"example":"securepassword123"}},"required":["email","password"]},"LoginResponse":{"type":"object","properties":{"message":{"type":"string"},"accessToken":{"type":"string","description":"JWT access token (15min)"},"refreshToken":{"type":"string","description":"Refresh token (7 days)"}}},"RegisterRequest":{"type":"object","properties":{"email":{"type":"string","format":"email"},"password":{"type":"string","minLength":8},"name":{"type":"string","minLength":2},"phone":{"type":"string","nullable":true},"document":{"type":"string","nullable":true},"documentType":{"type":"string","enum":["CPF","CNPJ"],"nullable":true}},"required":["email","password","name"]},"User":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"email":{"type":"string","format":"email"},"name":{"type":"string"},"roles":{"type":"array","items":{"type":"string"}},"merchantId":{"type":"string","format":"uuid","nullable":true},"kycStatus":{"type":"string","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"CreateChargeRequest":{"type":"object","properties":{"merchantId":{"type":"string","format":"uuid"},"amountCents":{"type":"integer","minimum":1,"example":10000},"currency":{"type":"string","enum":["BRL"],"default":"BRL"},"description":{"type":"string","maxLength":255},"method":{"type":"string","enum":["PIX","BOLETO"]},"expiresAt":{"type":"string","format":"date-time"},"externalRef":{"type":"string","maxLength":128},"metadata":{"type":"object","additionalProperties":true},"payer":{"type":"object","properties":{"name":{"type":"string"},"taxId":{"type":"string"},"email":{"type":"string","format":"email"}}}},"required":["merchantId","amountCents"]},"Charge":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"merchantId":{"type":"string","format":"uuid"},"amountCents":{"type":"integer"},"currency":{"type":"string","enum":["BRL"]},"description":{"type":"string","nullable":true},"status":{"type":"string","enum":["PENDING","PAID","EXPIRED","CANCELED"]},"method":{"type":"string","enum":["PIX","BOLETO"],"nullable":true},"expiresAt":{"type":"string","format":"date-time","nullable":true},"idempotencyKey":{"type":"string"},"externalRef":{"type":"string","nullable":true},"metadata":{"type":"object","nullable":true},"pix":{"type":"object","nullable":true,"properties":{"qrCode":{"type":"string","description":"Base64 PNG QR Code"},"copyPaste":{"type":"string","description":"Pix copia e cola"},"expiresAt":{"type":"string","format":"date-time"}}},"boleto":{"type":"object","nullable":true,"properties":{"barcode":{"type":"string"},"digitableLine":{"type":"string"},"pdfUrl":{"type":"string","format":"uri"},"expiresAt":{"type":"string","format":"date-time"}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","merchantId","amountCents","currency","status","idempotencyKey","createdAt","updatedAt"]},"CreateCheckoutSessionRequest":{"type":"object","properties":{"merchantId":{"type":"string","format":"uuid"},"amountCents":{"type":"integer","minimum":1},"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"quantity":{"type":"integer"},"unitAmountCents":{"type":"integer"}}}},"successUrl":{"type":"string","format":"uri"},"cancelUrl":{"type":"string","format":"uri"},"externalRef":{"type":"string"},"metadata":{"type":"object"}},"required":["merchantId","amountCents"]},"CheckoutSession":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"merchantId":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["CREATED","OPENED","COMPLETED","EXPIRED"]},"amountCents":{"type":"integer"},"url":{"type":"string","description":"Checkout page URL"},"expiresAt":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"}}},"Course":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"merchantId":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string"},"thumbnailUrl":{"type":"string","nullable":true},"status":{"type":"string","enum":["DRAFT","PUBLISHED","ARCHIVED"]},"accessType":{"type":"string","enum":["LIFETIME","SUBSCRIPTION"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Webhook":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"merchantId":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string"}},"secret":{"type":"string","description":"HMAC secret for signature verification"},"active":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time"}}},"def-0":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","description":"Error code"},"message":{"type":"string","description":"Human-readable error message"},"details":{"type":"object","nullable":true}},"required":["code","message"]}},"required":["error"],"title":"ErrorResponse"},"def-1":{"type":"object","properties":{"message":{"type":"string","description":"Success message"}},"required":["message"],"title":"SuccessResponse"}}},"paths":{"/healthz":{"get":{"summary":"Health check endpoint","tags":["Health"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"timestamp":{"type":"string","format":"date-time"},"buildInfo":{"type":"object","properties":{"gitSha":{"type":["null","string"]},"buildId":{"type":["null","string"]},"builtAt":{"type":["null","string"]},"version":{"type":"string"},"source":{"type":"string"}}}}}}}}}}},"/metrics":{"get":{"summary":"Prometheus metrics endpoint","tags":["Health"],"responses":{"200":{"description":"Default Response"}}}},"/webhooks/pix-gateway/health":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/metrics/perf-db":{"get":{"summary":"Database saturation metrics for performance tests","tags":["Health"],"responses":{"200":{"description":"Default Response"}}}},"/ready":{"get":{"summary":"Readiness check with database verification","tags":["Health"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"database":{"type":"boolean"},"smtp":{"type":"boolean"},"smtpError":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"buildInfo":{"type":"object","properties":{"gitSha":{"type":["null","string"]},"buildId":{"type":["null","string"]},"builtAt":{"type":["null","string"]},"version":{"type":"string"},"source":{"type":"string"}}}}}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"database":{"type":"boolean"},"smtp":{"type":"boolean"},"smtpError":{"type":"string"},"error":{"type":"string"},"buildInfo":{"type":"object","properties":{"gitSha":{"type":["null","string"]},"buildId":{"type":["null","string"]},"builtAt":{"type":["null","string"]},"version":{"type":"string"},"source":{"type":"string"}}}}}}}}}}},"/auth/me":{"get":{"tags":["Auth"],"description":"Get current authenticated user info","responses":{"200":{"description":"Default Response"}}}},"/auth/avatar/presign":{"post":{"tags":["Auth"],"description":"Gera URL presign para upload de avatar","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["contentType"],"properties":{"contentType":{"type":"string"}}}}},"required":true},"responses":{"200":{"description":"Default Response"}}}},"/auth/avatar/confirm":{"post":{"tags":["Auth"],"description":"Confirma upload do avatar e atualiza perfil do usuário","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["key"],"properties":{"key":{"type":"string"},"url":{"type":"string"}}}}},"required":true},"responses":{"200":{"description":"Default Response"}}}},"/auth/csrf":{"get":{"tags":["Auth"],"description":"Generate CSRF token for form protection","responses":{"200":{"description":"Default Response"}}}},"/auth/register":{"post":{"tags":["Auth"],"description":"Register a new user","responses":{"200":{"description":"Default Response"}}}},"/auth/login":{"post":{"tags":["Auth"],"description":"Authenticate user and return token","responses":{"200":{"description":"Default Response"}}}},"/auth/logout":{"post":{"tags":["Auth"],"description":"Logout user and invalidate session","responses":{"200":{"description":"Default Response"}}}},"/auth/refresh":{"post":{"tags":["Auth"],"description":"Refresh access token using cookie","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"accessToken":{"type":"string"},"expiresIn":{"type":"number"}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"/auth/change-password":{"post":{"tags":["Auth"],"description":"Change user password","responses":{"200":{"description":"Default Response"}}}},"/auth/update-profile":{"put":{"tags":["Auth"],"description":"Update user profile","responses":{"200":{"description":"Default Response"}}}},"/auth/delete-account":{"delete":{"tags":["Auth"],"description":"Delete user account","responses":{"200":{"description":"Default Response"}}}},"/auth/request-mfa":{"post":{"tags":["Auth"],"description":"Request MFA OTP via email","responses":{"200":{"description":"Default Response"}}}},"/auth/verify-mfa":{"post":{"tags":["Auth"],"description":"Verify MFA OTP","responses":{"200":{"description":"Default Response"}}}},"/charges/":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"responses":{"200":{"description":"Default Response"}}}},"/charges/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/charges/{id}/receipt":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/charges/{id}/boleto/pdf":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/charges/{id}/cancel":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/charges/{id}/refund":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/receipts/verify":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/boletos/consult":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/boletos/":{"post":{"responses":{"200":{"description":"Default Response"}}},"get":{"responses":{"200":{"description":"Default Response"}}}},"/boletos/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/boletos/batches/{batchId}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"batchId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/boletos/batches/{batchId}/{id}":{"delete":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"batchId","required":true},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/checkout/sessions":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/checkout/sessions/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/checkout/sessions/{id}/status":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/settlements/":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"responses":{"200":{"description":"Default Response"}}}},"/settlements/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/reconciliations/":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"responses":{"200":{"description":"Default Response"}}}},"/reconciliations/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/med/infractions/":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/med/infractions/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/med/infractions/sync":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/med/infractions/{id}/analysis":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/med/infractions/analysis":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/dashboard/merchant/me":{"get":{"summary":"Get current user merchant info","tags":["Dashboard"],"description":"Returns merchant information for the authenticated user","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"document":{"type":"string"},"type":{"type":"string","enum":["PRODUCER","RIFEIRO"]},"active":{"type":"boolean"}}}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"/dashboard/merchant/ensure":{"post":{"summary":"Ensure merchant exists","tags":["Dashboard"],"description":"Creates a merchant for the user if one does not exist","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"document":{"type":"string"},"type":{"type":"string","enum":["PRODUCER","RIFEIRO"]}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"document":{"type":"string"},"type":{"type":"string","enum":["PRODUCER","RIFEIRO"]},"active":{"type":"boolean"},"created":{"type":"boolean"}}}}}}}}},"/dashboard/summary":{"get":{"summary":"Get dashboard summary","tags":["Dashboard"],"description":"Returns aggregated dashboard data for a single request","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"merchantId","required":false},{"schema":{"type":"string","enum":["7d","30d","90d","365d"],"default":"30d"},"in":"query","name":"period","required":false},{"schema":{"type":"number","default":5},"in":"query","name":"topLimit","required":false},{"schema":{"type":"number","default":20},"in":"query","name":"interactionsLimit","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/dashboard/metrics":{"get":{"summary":"Get dashboard metrics","tags":["Dashboard"],"description":"Returns key metrics for the authenticated merchant","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"merchantId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"totalSales":{"type":"number"},"totalTransactions":{"type":"number"},"averageTicket":{"type":"number"},"pixSales":{"type":"number"},"cardSales":{"type":"number"},"boletoSales":{"type":"number"},"approvedPayments":{"type":"number"},"refundedPayments":{"type":"number"},"failedPayments":{"type":"number"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"/dashboard/stats":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/dashboard/interactions":{"get":{"summary":"Get payment interactions","tags":["Dashboard"],"description":"Returns recent payment interactions for the merchant","responses":{"200":{"description":"Default Response"}}}},"/dashboard/revenue":{"get":{"summary":"Get revenue chart data","tags":["Dashboard"],"description":"Returns daily revenue data for the last 30 days","responses":{"200":{"description":"Default Response"}}}},"/dashboard/revenue-history":{"get":{"summary":"Get revenue history","tags":["Dashboard"],"description":"Returns revenue history for the specified period","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"merchantId","required":false},{"schema":{"type":"string","enum":["7d","30d","90d","365d"],"default":"30d"},"in":"query","name":"period","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/dashboard/transactions":{"get":{"summary":"Get recent transactions","tags":["Dashboard"],"description":"Returns recent transactions for the merchant","responses":{"200":{"description":"Default Response"}}}},"/dashboard/health":{"get":{"summary":"Get payment health metrics","tags":["Dashboard"],"description":"Returns health metrics including approved, refunded, failed payments and chargeback rate","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"merchantId","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"approvedPayments":{"type":"number"},"refundedPayments":{"type":"number"},"failedPayments":{"type":"number"},"chargebackRate":{"type":"number"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"/dashboard/top-products":{"get":{"summary":"Get top selling products","tags":["Dashboard"],"description":"Returns the top selling products/courses for the merchant","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"merchantId","required":false},{"schema":{"type":"number","default":5},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"},"revenue":{"type":"number"}}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"/studio/courses":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"responses":{"200":{"description":"Default Response"}}}},"/studio/courses/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"put":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/studio/courses/{id}/publish":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/studio/courses/{courseId}/modules":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"courseId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/studio/modules/{moduleId}/lessons":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"moduleId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/studio/lessons/{id}":{"put":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/studio/courses/{courseId}/price":{"put":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"courseId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/products/":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"responses":{"200":{"description":"Default Response"}}}},"/products/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"put":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/webhooks/":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"responses":{"200":{"description":"Default Response"}}}},"/webhooks/{id}":{"delete":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/webhooks/transfeera/":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"responses":{"200":{"description":"Default Response"}}}},"/webhooks/transfeera/health":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/webhooks/transfeera/status":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/webhooks/shark-banking/":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"responses":{"200":{"description":"Default Response"}}}},"/webhooks/shark-banking/transfers/":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"responses":{"200":{"description":"Default Response"}}}},"/webhooks/treeal/pix/":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/webhooks/treeal/pix/pix":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/webhooks/treeal/charges/":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/webhooks/treeal/charges/pix":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/webhooks/treeal/transfers/":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/webhooks/treeal/receive/":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/webhooks/treeal/cashout/":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/webhooks/treeal/refund/":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/webhooks/treeal/infraction/":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/webhooks/witetec/":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/creator/":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/creator/stats":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/creator/request":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/creator/{id}/status":{"patch":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/creator/commissions/summary":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/creator/commissions":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/creator/commission-rules":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"responses":{"200":{"description":"Default Response"}}}},"/domain-config/":{"get":{"responses":{"200":{"description":"Default Response"}}},"put":{"responses":{"200":{"description":"Default Response"}}}},"/api-keys/":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"responses":{"200":{"description":"Default Response"}}}},"/api-keys/{id}":{"patch":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/api-keys/{id}/allowed-ips":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/api-keys/{id}/allowed-ips/{ipId}":{"delete":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"ipId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/api-keys/{id}/ip-whitelist":{"patch":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/api-keys/{id}/blocked-logs":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/api-keys/blocked-logs":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/upload/":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/upload/image":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/videos/":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/videos/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/videos/upload-url":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/onboarding/status":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/onboarding/merchant":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/onboarding/step":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/kyc/status":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/kyc/submit":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/kyc/{userId}/approve":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/kyc/{userId}/reject":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/balance/":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/balance/transactions":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/wallet/":{"get":{"summary":"Get wallet balances","tags":["Wallet"],"description":"Retorna snapshot contábil da wallet e saldo saqueável calculado com a mesma regra dos endpoints Rifeiro.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"merchantId":{"type":"string"},"availableBalanceCents":{"type":"number","description":"Snapshot contábil da tabela wallet (legado)"},"walletSnapshotAvailableBalanceCents":{"type":"number","description":"Snapshot contábil da tabela wallet"},"calculatedAvailableCents":{"type":"number","description":"Saldo bruto maduro calculado pelo settlement ledger"},"withdrawableCents":{"type":"number","description":"Saldo saqueável final após overlay operacional de freeze/MED"},"availableAfterExposureCents":{"type":"number"},"operationalHoldActive":{"type":"boolean"},"operationalHoldReason":{"type":["null","string"]},"operationalHoldBlockedCents":{"type":"number"},"medExposureReservedCents":{"type":"number"},"medExposureBackedReservedCents":{"type":"number"},"medExposureUnbackedReservedCents":{"type":"number"},"medExposureActiveCount":{"type":"number"},"medExposureBackedCount":{"type":"number"},"medExposureUnbackedCount":{"type":"number"},"medExposureBackedIds":{"type":"array","items":{"type":"string"}},"medExposureUnbackedIds":{"type":"array","items":{"type":"string"}},"medBlockingApplied":{"type":"boolean"},"medBlockingSource":{"type":"string","enum":["NONE","MANUAL_FREEZE","OPEN_MED_CASE","BACKED_EXPOSURE","OPEN_MED_CASE_AND_BACKED_EXPOSURE"]},"pendingBalanceCents":{"type":"number"},"reservedBalanceCents":{"type":"number"},"medBlockedBalanceCents":{"type":"number"},"medLostBalanceCents":{"type":"number"},"totalEarnedCents":{"type":"number"},"withdrawalFrozen":{"type":"boolean"},"withdrawalFrozenReason":{"type":["null","string"]},"openMedCasesCount":{"type":"number"},"openMedCases":{"type":"array","items":{"type":"object"}},"currency":{"type":"string"},"currentPolicy":{"type":"string"},"nextReleaseAt":{"type":["null","string"]},"sourceOfTruth":{"type":"string"},"balanceModelVersion":{"type":"string"},"asOf":{"type":"string"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":["null","object"]}},"required":["code","message"]}},"required":["error"]}}}}}}},"/wallet/internal/reconciliation":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/wallet/topups/pix":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/withdrawals/":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"responses":{"200":{"description":"Default Response"}}}},"/withdrawals/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/pix-key/":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"responses":{"200":{"description":"Default Response"}}}},"/pix-key/{id}":{"delete":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/coupons/":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"responses":{"200":{"description":"Default Response"}}}},"/coupons/validate":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/coupons/{id}/toggle":{"patch":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/coupons/{id}":{"delete":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/bulk-payouts/":{"post":{"responses":{"200":{"description":"Default Response"}}},"get":{"responses":{"200":{"description":"Default Response"}}}},"/bulk-payouts/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/bulk-payouts/{id}/preview":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/bulk-payouts/{id}/fund":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/bulk-payouts/{id}/confirm":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/bulk-payouts/{id}/retry":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/bulk-payouts/{id}/withdraw":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/bulk-payouts/{id}/export/errors":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/payouts/batches":{"post":{"responses":{"200":{"description":"Default Response"}}},"get":{"responses":{"200":{"description":"Default Response"}}}},"/v1/payouts/batches/{batchId}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"batchId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/payouts/batches/{batchId}/items":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"batchId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/v1/payouts/batches/{batchId}/cancel":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"batchId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/sellers/dashboard":{"get":{"summary":"Get seller dashboard data","tags":["Sellers"],"description":"Returns dashboard metrics for sellers. Legacy alias: /rifeiro.","parameters":[{"schema":{"type":"string"},"in":"query","name":"limit","required":false,"description":"Número máximo de cobranças recentes (padrão: 10, máximo: 1000)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"splits":{"type":"object","properties":{"today":{"type":"number"},"week":{"type":"number"},"month":{"type":"number"}}},"settlements":{"type":"object","properties":{"today":{"type":"number"},"week":{"type":"number"},"month":{"type":"number"}}},"wallet":{"type":"object","properties":{"availableCents":{"type":"number","description":"DEPRECATED: use withdrawableCents"},"withdrawableCents":{"type":"number","description":"Saldo saqueável (settlement ledger canonical + operational risk overlay)"},"pendingCents":{"type":"number"},"reservedCents":{"type":"number"},"settlementAvailableAmountCents":{"type":"number"},"availableAfterExposureCents":{"type":"number"},"medExposureReservedCents":{"type":"number"},"medExposureBackedReservedCents":{"type":"number"},"medExposureUnbackedReservedCents":{"type":"number"},"medExposureActiveCount":{"type":"number"},"medExposureBackedCount":{"type":"number"},"medExposureUnbackedCount":{"type":"number"},"medExposureBackedIds":{"type":"array","items":{"type":"string"}},"medExposureUnbackedIds":{"type":"array","items":{"type":"string"}},"medBlockingApplied":{"type":"boolean"},"medBlockingSource":{"type":"string","enum":["NONE","MANUAL_FREEZE","OPEN_MED_CASE","BACKED_EXPOSURE","OPEN_MED_CASE_AND_BACKED_EXPOSURE"]},"activePixMedExposureCount":{"type":"number"},"activePixMedExposureIds":{"type":"array","items":{"type":"string"}},"walletSnapshotAvailableBalanceCents":{"type":"number"},"sourceOfTruth":{"type":"string"},"balanceModelVersion":{"type":"string"},"asOf":{"type":"string"},"settlementPolicy":{"type":"string","enum":["D0","D1","D2","D3","D7"]},"nextReleaseAt":{"type":["null","string"]},"medBlockedBalanceCents":{"type":"number"},"medLostBalanceCents":{"type":"number"},"withdrawalFrozen":{"type":"boolean"},"withdrawalFrozenReason":{"type":["null","string"]},"operationalHoldActive":{"type":"boolean"},"operationalHoldReason":{"type":["null","string"]},"operationalHoldBlockedCents":{"type":"number"},"openMedCases":{"type":"array","items":{"type":"object","properties":{"caseReference":{"type":"string"},"blockedAmountCents":{"type":["null","number"]},"totalExposureCents":{"type":["null","number"]},"riskExposure":{"type":"string","enum":["FULL","PARTIAL"]},"status":{"type":"string","enum":["OPEN","ANALYZING"]},"statusLabel":{"type":"string"},"reasonLabel":{"type":["null","string"]},"relatedChargeLabel":{"type":"string"},"openedAt":{"type":["null","string"]},"updatedAt":{"type":["null","string"]},"analysisDueDate":{"type":["null","string"]}}}}}},"recentCharges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"amountCents":{"type":"number"},"netAmountCents":{"type":"number"},"createdAt":{"type":"string"},"affiliateSplits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"affiliateId":{"type":"string"},"affiliateName":{"type":"string"},"affiliateEmail":{"type":"string"},"amountCents":{"type":"number"},"percentage":{"type":"number","nullable":true}}}}}}},"receivedSplits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"amountCents":{"type":"number"},"fromMerchant":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}}},"chargeId":{"type":"string"},"chargeDescription":{"type":"string","nullable":true},"createdAt":{"type":"string"}}}}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"/sellers/dashboard/credentials":{"get":{"summary":"Get seller API credentials","tags":["Sellers"],"description":"Returns API key credentials for sellers. Legacy alias: /rifeiro.","responses":{"200":{"description":"Default Response"}}}},"/sellers/dashboard/webhooks":{"get":{"summary":"List webhooks","tags":["Sellers"],"description":"Returns webhooks for the authenticated merchant","responses":{"200":{"description":"Default Response"}}},"post":{"summary":"Create webhook","tags":["Sellers"],"description":"Creates a new webhook for the authenticated merchant","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["url","objectTypes"],"properties":{"url":{"type":"string","format":"uri"},"objectTypes":{"type":"array","items":{"type":"string"},"minItems":1}}}}},"required":true},"responses":{"200":{"description":"Default Response"}}}},"/sellers/dashboard/webhooks/{id}":{"delete":{"summary":"Delete webhook","tags":["Sellers"],"description":"Deletes a webhook for the authenticated merchant","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/sellers/dashboard/webhooks/{id}/test":{"post":{"summary":"Test webhook","tags":["Sellers"],"description":"Tests a webhook by sending a test payload","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/sellers/affiliates":{"get":{"summary":"Lista afiliados do seller com comissões","tags":["Sellers"],"description":"Retorna lista de afiliados cadastrados com totais de comissão recebidos","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"affiliates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"document":{"type":"string"},"commissionRate":{"type":"number"},"active":{"type":"boolean"},"totalCommissionsCents":{"type":"number"},"totalCharges":{"type":"number"},"lastCommissionAt":{"type":"string","nullable":true}}}}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"/sellers/splits/report":{"get":{"summary":"Relatório de splits por período e afiliado","tags":["Sellers"],"description":"Retorna relatório detalhado de splits pagos aos afiliados","parameters":[{"schema":{"type":"string","format":"date-time"},"in":"query","name":"startDate","required":false,"description":"Data inicial (ISO 8601)"},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"endDate","required":false,"description":"Data final (ISO 8601)"},{"schema":{"type":"string"},"in":"query","name":"affiliateId","required":false,"description":"Filtrar por ID do afiliado"},{"schema":{"type":"string"},"in":"query","name":"limit","required":false,"description":"Limite de resultados (padrão: 50, máximo: 500)"},{"schema":{"type":"string"},"in":"query","name":"offset","required":false,"description":"Offset para paginação (padrão: 0)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"splits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"chargeId":{"type":"string"},"affiliateId":{"type":"string"},"affiliateName":{"type":"string"},"affiliateEmail":{"type":"string"},"amountCents":{"type":"number"},"percentage":{"type":"number","nullable":true},"chargeAmountCents":{"type":"number"},"chargeDescription":{"type":"string","nullable":true},"createdAt":{"type":"string"},"paidAt":{"type":"string","nullable":true}}}},"total":{"type":"number"},"totalAmountCents":{"type":"number"},"summary":{"type":"object","properties":{"byAffiliate":{"type":"array","items":{"type":"object","properties":{"affiliateId":{"type":"string"},"affiliateName":{"type":"string"},"totalCents":{"type":"number"},"totalSplits":{"type":"number"}}}}}}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"/sellers/pix":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/sellers/pix/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/sellers/saques/dashboard":{"get":{"summary":"Get seller withdrawals dashboard data","tags":["Sellers"],"description":"Returns wallet, settlements, summary and pix key for seller dashboard. Legacy alias: /rifeiro.","parameters":[{"schema":{"type":"string"},"in":"query","name":"limit","required":false,"description":"Número máximo de saques a retornar (padrão: 20, máximo: 1000)"}],"responses":{"200":{"description":"Default Response"}}}},"/sellers/saques/dashboard/{id}/receipt":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/sellers/saques/dashboard/request":{"post":{"summary":"Request withdrawal via dashboard","tags":["Sellers"],"description":"Creates a withdrawal request for a seller merchant. Legacy alias: /rifeiro.","responses":{"200":{"description":"Default Response"}}}},"/sellers/saques/":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"responses":{"200":{"description":"Default Response"}}}},"/sellers/saques/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/sellers/pix-key/":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"responses":{"200":{"description":"Default Response"}}}},"/sellers/webhooks/":{"post":{"responses":{"200":{"description":"Default Response"}}},"get":{"responses":{"200":{"description":"Default Response"}}}},"/rifeiro/dashboard":{"get":{"summary":"Get seller dashboard data","tags":["Sellers"],"description":"Returns dashboard metrics for sellers. Legacy alias: /rifeiro.","parameters":[{"schema":{"type":"string"},"in":"query","name":"limit","required":false,"description":"Número máximo de cobranças recentes (padrão: 10, máximo: 1000)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"splits":{"type":"object","properties":{"today":{"type":"number"},"week":{"type":"number"},"month":{"type":"number"}}},"settlements":{"type":"object","properties":{"today":{"type":"number"},"week":{"type":"number"},"month":{"type":"number"}}},"wallet":{"type":"object","properties":{"availableCents":{"type":"number","description":"DEPRECATED: use withdrawableCents"},"withdrawableCents":{"type":"number","description":"Saldo saqueável (settlement ledger canonical + operational risk overlay)"},"pendingCents":{"type":"number"},"reservedCents":{"type":"number"},"settlementAvailableAmountCents":{"type":"number"},"availableAfterExposureCents":{"type":"number"},"medExposureReservedCents":{"type":"number"},"medExposureBackedReservedCents":{"type":"number"},"medExposureUnbackedReservedCents":{"type":"number"},"medExposureActiveCount":{"type":"number"},"medExposureBackedCount":{"type":"number"},"medExposureUnbackedCount":{"type":"number"},"medExposureBackedIds":{"type":"array","items":{"type":"string"}},"medExposureUnbackedIds":{"type":"array","items":{"type":"string"}},"medBlockingApplied":{"type":"boolean"},"medBlockingSource":{"type":"string","enum":["NONE","MANUAL_FREEZE","OPEN_MED_CASE","BACKED_EXPOSURE","OPEN_MED_CASE_AND_BACKED_EXPOSURE"]},"activePixMedExposureCount":{"type":"number"},"activePixMedExposureIds":{"type":"array","items":{"type":"string"}},"walletSnapshotAvailableBalanceCents":{"type":"number"},"sourceOfTruth":{"type":"string"},"balanceModelVersion":{"type":"string"},"asOf":{"type":"string"},"settlementPolicy":{"type":"string","enum":["D0","D1","D2","D3","D7"]},"nextReleaseAt":{"type":["null","string"]},"medBlockedBalanceCents":{"type":"number"},"medLostBalanceCents":{"type":"number"},"withdrawalFrozen":{"type":"boolean"},"withdrawalFrozenReason":{"type":["null","string"]},"operationalHoldActive":{"type":"boolean"},"operationalHoldReason":{"type":["null","string"]},"operationalHoldBlockedCents":{"type":"number"},"openMedCases":{"type":"array","items":{"type":"object","properties":{"caseReference":{"type":"string"},"blockedAmountCents":{"type":["null","number"]},"totalExposureCents":{"type":["null","number"]},"riskExposure":{"type":"string","enum":["FULL","PARTIAL"]},"status":{"type":"string","enum":["OPEN","ANALYZING"]},"statusLabel":{"type":"string"},"reasonLabel":{"type":["null","string"]},"relatedChargeLabel":{"type":"string"},"openedAt":{"type":["null","string"]},"updatedAt":{"type":["null","string"]},"analysisDueDate":{"type":["null","string"]}}}}}},"recentCharges":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"amountCents":{"type":"number"},"netAmountCents":{"type":"number"},"createdAt":{"type":"string"},"affiliateSplits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"affiliateId":{"type":"string"},"affiliateName":{"type":"string"},"affiliateEmail":{"type":"string"},"amountCents":{"type":"number"},"percentage":{"type":"number","nullable":true}}}}}}},"receivedSplits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"status":{"type":"string"},"amountCents":{"type":"number"},"fromMerchant":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"}}},"chargeId":{"type":"string"},"chargeDescription":{"type":"string","nullable":true},"createdAt":{"type":"string"}}}}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"/rifeiro/dashboard/credentials":{"get":{"summary":"Get seller API credentials","tags":["Sellers"],"description":"Returns API key credentials for sellers. Legacy alias: /rifeiro.","responses":{"200":{"description":"Default Response"}}}},"/rifeiro/dashboard/webhooks":{"get":{"summary":"List webhooks","tags":["Sellers"],"description":"Returns webhooks for the authenticated merchant","responses":{"200":{"description":"Default Response"}}},"post":{"summary":"Create webhook","tags":["Sellers"],"description":"Creates a new webhook for the authenticated merchant","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["url","objectTypes"],"properties":{"url":{"type":"string","format":"uri"},"objectTypes":{"type":"array","items":{"type":"string"},"minItems":1}}}}},"required":true},"responses":{"200":{"description":"Default Response"}}}},"/rifeiro/dashboard/webhooks/{id}":{"delete":{"summary":"Delete webhook","tags":["Sellers"],"description":"Deletes a webhook for the authenticated merchant","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/rifeiro/dashboard/webhooks/{id}/test":{"post":{"summary":"Test webhook","tags":["Sellers"],"description":"Tests a webhook by sending a test payload","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/rifeiro/affiliates":{"get":{"summary":"Lista afiliados do seller com comissões","tags":["Sellers"],"description":"Retorna lista de afiliados cadastrados com totais de comissão recebidos","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"affiliates":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"document":{"type":"string"},"commissionRate":{"type":"number"},"active":{"type":"boolean"},"totalCommissionsCents":{"type":"number"},"totalCharges":{"type":"number"},"lastCommissionAt":{"type":"string","nullable":true}}}}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"/rifeiro/splits/report":{"get":{"summary":"Relatório de splits por período e afiliado","tags":["Sellers"],"description":"Retorna relatório detalhado de splits pagos aos afiliados","parameters":[{"schema":{"type":"string","format":"date-time"},"in":"query","name":"startDate","required":false,"description":"Data inicial (ISO 8601)"},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"endDate","required":false,"description":"Data final (ISO 8601)"},{"schema":{"type":"string"},"in":"query","name":"affiliateId","required":false,"description":"Filtrar por ID do afiliado"},{"schema":{"type":"string"},"in":"query","name":"limit","required":false,"description":"Limite de resultados (padrão: 50, máximo: 500)"},{"schema":{"type":"string"},"in":"query","name":"offset","required":false,"description":"Offset para paginação (padrão: 0)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"splits":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"chargeId":{"type":"string"},"affiliateId":{"type":"string"},"affiliateName":{"type":"string"},"affiliateEmail":{"type":"string"},"amountCents":{"type":"number"},"percentage":{"type":"number","nullable":true},"chargeAmountCents":{"type":"number"},"chargeDescription":{"type":"string","nullable":true},"createdAt":{"type":"string"},"paidAt":{"type":"string","nullable":true}}}},"total":{"type":"number"},"totalAmountCents":{"type":"number"},"summary":{"type":"object","properties":{"byAffiliate":{"type":"array","items":{"type":"object","properties":{"affiliateId":{"type":"string"},"affiliateName":{"type":"string"},"totalCents":{"type":"number"},"totalSplits":{"type":"number"}}}}}}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"/rifeiro/pix":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/rifeiro/pix/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/rifeiro/saques/dashboard":{"get":{"summary":"Get seller withdrawals dashboard data","tags":["Sellers"],"description":"Returns wallet, settlements, summary and pix key for seller dashboard. Legacy alias: /rifeiro.","parameters":[{"schema":{"type":"string"},"in":"query","name":"limit","required":false,"description":"Número máximo de saques a retornar (padrão: 20, máximo: 1000)"}],"responses":{"200":{"description":"Default Response"}}}},"/rifeiro/saques/dashboard/{id}/receipt":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/rifeiro/saques/dashboard/request":{"post":{"summary":"Request withdrawal via dashboard","tags":["Sellers"],"description":"Creates a withdrawal request for a seller merchant. Legacy alias: /rifeiro.","responses":{"200":{"description":"Default Response"}}}},"/rifeiro/saques/":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"responses":{"200":{"description":"Default Response"}}}},"/rifeiro/saques/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/rifeiro/pix-key/":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"responses":{"200":{"description":"Default Response"}}}},"/rifeiro/webhooks/":{"post":{"responses":{"200":{"description":"Default Response"}}},"get":{"responses":{"200":{"description":"Default Response"}}}},"/producer/splits/rifeiro/search":{"get":{"summary":"Search affiliate by document","tags":["Producer Splits"],"description":"PRODUCER busca Rifeiro ou RIFEIRO busca Producer pelo CPF/CNPJ para associar","parameters":[{"schema":{"type":"string","minLength":11,"maxLength":18},"in":"query","name":"document","required":true,"description":"CPF/CNPJ (apenas números)"}],"responses":{"200":{"description":"Default Response"}}}},"/producer/splits/rifeiro/link":{"post":{"summary":"Link affiliate","tags":["Producer Splits"],"description":"PRODUCER vincula RIFEIRO ou RIFEIRO se vincula a PRODUCER com porcentagem de split","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["document","splitPercentage"],"properties":{"document":{"type":"string","minLength":11,"maxLength":18,"description":"CPF/CNPJ (apenas números)"},"splitPercentage":{"type":"number","minimum":0.01,"maximum":100,"description":"Porcentagem de split (0.01% a 100%)"},"confirm":{"type":"boolean","description":"Confirmação do vínculo"},"name":{"type":"string","description":"Nome (opcional, usado se criar novo usuário)"},"email":{"type":"string","format":"email","description":"Email (opcional, usado se criar novo usuário)"},"phone":{"type":"string","description":"Telefone (opcional)"}}}}},"required":true},"responses":{"200":{"description":"Default Response"}}}},"/producer/splits/associados":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/producer/splits/{productId}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"productId","required":true}],"responses":{"200":{"description":"Default Response"}}},"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"productId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/producer/splits/{productId}/{splitId}":{"delete":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"productId","required":true},{"schema":{"type":"string"},"in":"path","name":"splitId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/product-checkouts/":{"post":{"responses":{"200":{"description":"Default Response"}}},"get":{"responses":{"200":{"description":"Default Response"}}}},"/product-checkouts/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"put":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/product-checkouts/{id}/publish":{"patch":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/product-checkouts/{id}/unpublish":{"patch":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/product-checkouts/{id}/order-bumps":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/product-checkouts/order-bumps/{bumpId}":{"put":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"bumpId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/product-checkouts/{id}/upsells":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/product-checkouts/upsells/{upsellId}":{"put":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"upsellId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/product-checkouts/{id}/duplicate":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/product-checkouts/public/{slug}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/product-checkouts/public/{slug}/pay":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/product-checkouts/public/{slug}/card-tokenize":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/courses/{courseId}/checkouts":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"courseId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/partners/":{"post":{"responses":{"200":{"description":"Default Response"}}},"get":{"responses":{"200":{"description":"Default Response"}}}},"/partners/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/partners/{id}/suspend":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/partners/{id}/activate":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/partners/{id}/close":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/gateway/me":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/gateway/dashboard":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/admin/users":{"get":{"summary":"List all users","tags":["Admin"],"parameters":[{"schema":{"type":"number","default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"number","default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"string"},"in":"query","name":"role","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"boolean"},"in":"query","name":"banned","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/admin/users/{id}":{"get":{"summary":"Get user details","tags":["Admin"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/users/{id}/settlement-policy":{"get":{"summary":"Get user settlement policy","tags":["Admin"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"put":{"summary":"Update user settlement policy","tags":["Admin"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["policy","reason"],"properties":{"policy":{"type":"string","enum":["D0","D1","D2","D3","D7"]},"reason":{"type":"string","minLength":3,"maxLength":500}}}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/users/{id}/settlement-balance":{"get":{"summary":"Get user settlement balance","tags":["Admin"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/users/{id}/settlement-entries":{"get":{"summary":"Get user settlement entries","tags":["Admin"],"parameters":[{"schema":{"type":"number","default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"number","default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/users/{id}/role":{"patch":{"summary":"Update user role","tags":["Admin"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["role"],"properties":{"role":{"type":"string"}}}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/users/{id}/gateway-profile":{"patch":{"summary":"Assign gateway profile to user","tags":["Admin"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["partnerGatewayId","gatewayRole"],"properties":{"partnerGatewayId":{"type":"string"},"gatewayRole":{"type":"string","enum":["ADMIN","OPERATOR","VIEWER","COMPLIANCE"]},"clearMerchantLink":{"type":"boolean","default":false}}}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/users/{id}/kyc":{"patch":{"summary":"Update user KYC status","tags":["Admin"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["kycStatus"],"properties":{"kycStatus":{"type":"string","enum":["APPROVED","REJECTED"]}}}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/users/{id}/contact":{"patch":{"summary":"Update user contact info","tags":["Admin"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["phone"],"properties":{"phone":{"type":["string","null"],"maxLength":32}}}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/users/{id}/withdrawal-freeze":{"patch":{"summary":"Block or unblock withdrawals for a user wallet","tags":["Admin"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["frozen"],"properties":{"frozen":{"type":"boolean"},"reason":{"type":["string","null"],"maxLength":500}}}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/users/{id}/ban":{"post":{"summary":"Ban user","tags":["Admin"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/users/{id}/unban":{"post":{"summary":"Unban user","tags":["Admin"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/users/{id}/impersonate":{"post":{"summary":"Impersonate user","tags":["Admin"],"description":"Creates a temporary JWT token as if it were the target user","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/sessions":{"get":{"summary":"List all active sessions","tags":["Admin"],"parameters":[{"schema":{"type":"number","default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"number","default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"string"},"in":"query","name":"userId","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/admin/sessions/{id}":{"delete":{"summary":"Revoke session","tags":["Admin"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/users/{id}/sessions":{"delete":{"summary":"Revoke all user sessions","tags":["Admin"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/merchants":{"get":{"summary":"List all merchants","tags":["Admin"],"parameters":[{"schema":{"type":"number","default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"number","default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"number","default":1},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string"},"in":"query","name":"type","required":false},{"schema":{"type":"string","enum":["all","not_approved","approved","unverified","rejected"]},"in":"query","name":"kycFilter","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/admin/merchants/{id}":{"get":{"summary":"Get merchant details","tags":["Admin"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/merchants/{id}/provider-config":{"get":{"summary":"Get merchant provider configuration","tags":["Admin"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"patch":{"summary":"Update merchant provider configuration","tags":["Admin"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"pixInProvider":{"type":"string","enum":["TRANSFEERA","SHARK_BANKING","SHARK_BLACK","TREEAL","WITETEC"]},"pixOutProvider":{"type":"string","enum":["TRANSFEERA","SHARK_BANKING","SHARK_BLACK","TREEAL","WITETEC"]},"reason":{"type":"string"},"witetecRouteMode":{"type":"string","enum":["WHITE","BLACK"]},"allowWithoutCredentials":{"type":"boolean","default":false}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/merchants/create-for-user/{userId}":{"post":{"summary":"Create merchant for a user","tags":["Admin"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["PRODUCER","RIFEIRO"],"default":"PRODUCER"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"userId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/merchants/{id}/credentials/rifeiro":{"post":{"summary":"Generate Rifeiro API credentials for merchant","tags":["Admin"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"summary":"Revoke active Rifeiro API credentials for merchant","tags":["Admin"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/merchants/{id}/type":{"patch":{"summary":"Update merchant type","tags":["Admin"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["PRODUCER","RIFEIRO"]}}}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/merchants/{id}/fee":{"patch":{"summary":"Update merchant platform fee percentage","tags":["Admin"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["feePercentage"],"properties":{"feePercentage":{"type":"number","minimum":0,"maximum":100}}}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/merchants/{id}/credentials/black":{"post":{"summary":"Generate Black API credentials for merchant","tags":["Admin"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"summary":"Revoke active Black API credentials for merchant","tags":["Admin"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/merchants/{id}/black-fee":{"patch":{"summary":"Update Black merchant platform fee percentage","tags":["Admin"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["blackFeePercentage"],"properties":{"blackFeePercentage":{"type":"number","minimum":0,"maximum":100}}}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/merchants/{id}/allowed-ips":{"get":{"summary":"List all allowed IPs for a merchant","tags":["Admin"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"post":{"summary":"Add IP to all active API keys of merchant","tags":["Admin"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["ip"],"properties":{"ip":{"type":"string"},"description":{"type":"string"}}}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/merchants/{id}/allowed-ips/{ipId}":{"delete":{"summary":"Remove IP from all API keys of merchant","tags":["Admin"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true},{"schema":{"type":"string"},"in":"path","name":"ipId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/merchants/{id}/ip-whitelist":{"patch":{"summary":"Enable/disable IP whitelist for all active API keys of merchant","tags":["Admin"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean"}}}}},"required":true},"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/documents":{"get":{"summary":"List KYC documents","tags":["Admin"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"status","required":false},{"schema":{"type":"number","default":1},"in":"query","name":"page","required":false},{"schema":{"type":"number","default":20},"in":"query","name":"pageSize","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/admin/notifications":{"get":{"summary":"Get admin notifications summary","tags":["Admin"],"responses":{"200":{"description":"Default Response"}}}},"/admin/charges":{"get":{"summary":"List all charges","tags":["Admin"],"parameters":[{"schema":{"type":"number","default":50},"in":"query","name":"limit","required":false},{"schema":{"type":"number","default":0},"in":"query","name":"offset","required":false},{"schema":{"type":"string"},"in":"query","name":"status","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/admin/stats":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/admin/stats/overview":{"get":{"summary":"Get platform overview stats","tags":["Admin"],"responses":{"200":{"description":"Default Response"}}}},"/admin/stats/med":{"get":{"summary":"Get MED infractions overview","tags":["Admin"],"parameters":[{"schema":{"type":"number","default":10},"in":"query","name":"limit","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/admin/med/cases":{"get":{"summary":"List MED cases","tags":["Admin"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string"},"in":"query","name":"merchantId","required":false},{"schema":{"type":"string","enum":["ALL","TRANSFEERA","TREEAL","WITETEC"],"default":"ALL"},"in":"query","name":"provider","required":false},{"schema":{"type":"string","enum":["ALL","OPEN","ANALYZING","RESOLVED_LOSS","RESOLVED_RELEASED","CLOSED"],"default":"ALL"},"in":"query","name":"status","required":false},{"schema":{"type":"number","default":25},"in":"query","name":"limit","required":false},{"schema":{"type":"number","default":0},"in":"query","name":"offset","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/admin/med/cases/{id}":{"get":{"summary":"Get MED case detail","tags":["Admin"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/stats/users":{"get":{"summary":"Get user statistics","tags":["Admin"],"parameters":[{"schema":{"type":"string","enum":["7d","30d","90d"],"default":"30d"},"in":"query","name":"period","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/admin/stats/revenue":{"get":{"summary":"Get revenue statistics","tags":["Admin"],"parameters":[{"schema":{"type":"string","enum":["7d","30d","90d"],"default":"30d"},"in":"query","name":"period","required":false}],"responses":{"200":{"description":"Default Response"}}}},"/admin/stats/turbofy-revenue":{"get":{"summary":"Get comprehensive Turbofy platform revenue","tags":["Admin"],"description":"Returns transaction fees, withdrawal fees, merchant breakdowns, and top merchants by revenue","parameters":[{"schema":{"type":"string","enum":["today","week","month","all"],"default":"month"},"in":"query","name":"period","required":false,"description":"Time period for revenue calculation"},{"schema":{"type":"boolean","default":true},"in":"query","name":"includeTopMerchants","required":false,"description":"Include ranking of top revenue-generating merchants"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":10},"in":"query","name":"topMerchantsLimit","required":false,"description":"Number of top merchants to include (when includeTopMerchants is true)"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"transactionFeesCents":{"type":"number","description":"Total fees from transactions"},"withdrawalFeesCents":{"type":"number","description":"Total fees from withdrawals"},"totalRevenueCents":{"type":"number","description":"Total platform revenue"},"todayCents":{"type":"number","description":"Revenue for today"},"weekCents":{"type":"number","description":"Revenue for current week"},"monthCents":{"type":"number","description":"Revenue for current month"},"allTimeCents":{"type":"number","description":"Revenue for all time"},"producerFeesCents":{"type":"number","description":"Fees from PRODUCER merchants"},"rifeiroFeesCents":{"type":"number","description":"Fees from RIFEIRO merchants"},"byFeeType":{"type":"object","properties":{"PLATFORM_FEE":{"type":"number"},"TURBOFY_SERVICE_FEE":{"type":"number"},"WITHDRAWAL_FEE":{"type":"number"}}},"topMerchants":{"type":"array","items":{"type":"object","properties":{"merchantId":{"type":"string"},"merchantName":{"type":"string"},"merchantType":{"type":"string"},"totalFeesCents":{"type":"number"}}}}}}}}}}}},"/admin/stats/gateways":{"get":{"summary":"Get partner gateway stats overview","tags":["Admin"],"responses":{"200":{"description":"Default Response"}}}},"/admin/merchants/{id}/payout-settings":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"patch":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/payouts/batches":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/admin/payouts/stats":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/admin/providers/witetec/health":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/admin/providers/witetec/balance":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/admin/providers/witetec/fees":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/admin/providers/witetec/disputes":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/admin/providers/witetec/disputes/{disputeId}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"disputeId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/providers/witetec/disputes/{disputeId}/appeal":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"disputeId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/providers/witetec/webhooks/events":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/admin/providers/witetec/webhooks/events/{eventId}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"eventId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/providers/witetec/webhooks/events/{eventId}/replay":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"eventId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/admin/providers/witetec/reconciliation/drifts":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/api/health":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/api/version":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/integrations/webhooks/":{"get":{"responses":{"200":{"description":"Default Response"}}},"post":{"responses":{"200":{"description":"Default Response"}}}},"/integrations/webhooks/events":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/integrations/webhooks/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"put":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}},"delete":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/integrations/webhooks/{id}/test":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/integrations/webhooks/{id}/rotate-secret":{"post":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/security/alerts/":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/security/alerts/{id}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/security/alerts/{id}/acknowledge":{"patch":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/security/alerts/stats":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/compliance/terms/accept":{"post":{"responses":{"200":{"description":"Default Response"}}}},"/compliance/risk-profile":{"get":{"responses":{"200":{"description":"Default Response"}}}},"/c/{sessionId}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"sessionId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/c/session/{sessionId}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"sessionId","required":true}],"responses":{"200":{"description":"Default Response"}}}},"/p/{slug}":{"get":{"parameters":[{"schema":{"type":"string"},"in":"path","name":"slug","required":true}],"responses":{"200":{"description":"Default Response"}}}}},"servers":[{"url":"http://localhost:3030","description":"Development Server"},{"url":"https://api.turbofypay.com","description":"Production Server"}],"tags":[{"name":"Health","description":"Health check endpoints"},{"name":"Auth","description":"Authentication and authorization"},{"name":"Charges","description":"Payment charges (Pix, Boleto)"},{"name":"Checkout","description":"Checkout sessions management"},{"name":"Settlements","description":"Settlement/payout management"},{"name":"Reconciliations","description":"Bank reconciliation"},{"name":"Studio","description":"Course and product management"},{"name":"Dashboard","description":"Dashboard analytics and metrics"},{"name":"Webhooks","description":"Webhook management"},{"name":"Sellers","description":"Seller integration endpoints (`/sellers`) with temporary legacy alias `/rifeiro`"},{"name":"Admin","description":"Administrative operations"},{"name":"KYC","description":"Know Your Customer verification"},{"name":"Balance","description":"Balance and withdrawals"}],"externalDocs":{"description":"Documentação completa","url":"https://docs.turbofy.com"}}