{"openapi":"3.0.0","paths":{"/api/health":{"get":{"operationId":"HealthController_getOverallHealth","parameters":[],"responses":{"200":{"description":"System is healthy or degraded"},"503":{"description":"System is unhealthy"}},"summary":"Overall system health check","tags":["health"]}},"/api/health/db":{"get":{"operationId":"HealthController_checkDatabase","parameters":[],"responses":{"200":{"description":"Database is accessible"},"503":{"description":"Database is not accessible"}},"summary":"Database connectivity check","tags":["health"]}},"/api/health/cron":{"get":{"operationId":"HealthController_checkCronJobs","parameters":[],"responses":{"200":{"description":"Cron jobs are running normally"},"503":{"description":"Cron jobs have issues"}},"summary":"Cron job execution status check","tags":["health"]}},"/api/health/gateway":{"get":{"operationId":"HealthController_checkGateway","parameters":[],"responses":{"200":{"description":"Payment gateway is accessible"},"503":{"description":"Payment gateway is not accessible"}},"summary":"Payment gateway connectivity check","tags":["health"]}},"/api/transactions":{"post":{"operationId":"TransactionsController_Create","parameters":[{"name":"X-Idempotency-Key","in":"header","description":"Optional. Pass a unique key per logical charge to safely retry this request without creating duplicate transactions. The same key returns the original transaction for 24h, scoped to the seller that owns the product.","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTransactionRequest"}}}},"responses":{"201":{"description":"The Transaction has been successfully created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"500":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"summary":"Create a new Transaction","tags":["transactions"]},"get":{"operationId":"TransactionsController_List","parameters":[{"name":"page","required":true,"in":"query","schema":{"type":"number"}},{"name":"limit","required":true,"in":"query","schema":{"type":"number"}},{"name":"status","required":true,"in":"query","schema":{"type":"string"}},{"name":"search","required":true,"in":"query","schema":{"type":"string"}},{"name":"paymentMethod","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated list of transactions"}},"security":[{"garu-gateway":[]}],"summary":"List transactions for the current seller","tags":["transactions"]}},"/api/transactions/handle-webhook":{"post":{"operationId":"TransactionsController_handleWebhook","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebHookRequest"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"tags":["transactions"]}},"/api/transactions/status/{galaxPayId}":{"get":{"operationId":"TransactionsController_getStatusByGalaxPayId","parameters":[{"name":"galaxPayId","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"string"}}}}},"summary":"Get Transaction Status by GalaxPay ID (Public)","tags":["transactions"]}},"/api/transactions/{id}":{"get":{"operationId":"TransactionsController_Get","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}}},"security":[{"garu-gateway":[]}],"summary":"Get Transaction by ID","tags":["transactions"]},"delete":{"operationId":"TransactionsController_Cancel","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"boolean"}}}}},"security":[{"garu-gateway":[]}],"summary":"Cancel Charge","tags":["transactions"]}},"/api/transactions/{id}/refund":{"post":{"operationId":"TransactionsController_Refund","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundTransactionRequest"}}}},"responses":{"200":{"description":"The Transaction has been successfully refunded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}}},"security":[{"garu-gateway":[]}],"summary":"Refund a Transaction","tags":["transactions"]}},"/api/products/uuid/{uuid}":{"get":{"operationId":"ProductsController_getProductByUuid","parameters":[{"name":"uuid","required":true,"in":"path","schema":{"type":"string"}},{"name":"includeArchived","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Get Product by uuId","tags":["products"]}},"/api/products/seller":{"get":{"operationId":"ProductsController_getProductsBySeller","parameters":[{"name":"page","required":true,"in":"query","schema":{"type":"number"}},{"name":"limit","required":true,"in":"query","schema":{"type":"number"}},{"name":"search","required":true,"in":"query","schema":{"type":"string"}},{"name":"tab","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Get all Products to Seller","tags":["products"]}},"/api/products/{id}":{"get":{"operationId":"ProductsController_getProduct","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"includeArchived","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponse"}}}}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Get Product by ID","tags":["products"]},"patch":{"operationId":"ProductsController_updateProduct","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Product"}}}},"201":{"description":"The Product has been successfully updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponse"}}}},"500":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Update a Product","tags":["products"]},"delete":{"operationId":"ProductsController_deactivateProduct","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":""}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Deactivate a Product","tags":["products"]}},"/api/products":{"post":{"operationId":"ProductsController_Create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductRequest"}}}},"responses":{"201":{"description":"The Product has been successfully created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponse"}}}},"500":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseDto"}}}}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Create a new Product","tags":["products"]}},"/api/api-keys":{"post":{"operationId":"ApiKeysController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateApiKeyRequest"}}}},"responses":{"201":{"description":"Chave criada com sucesso. A chave completa é mostrada apenas uma vez.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreatedResponse"}}}},"409":{"description":"Nome duplicado para o mesmo ambiente"}},"security":[{"bearer":[]}],"summary":"Criar nova chave API","tags":["api-keys"]},"get":{"operationId":"ApiKeysController_list","parameters":[{"name":"environment","required":false,"in":"query","description":"Filtrar por ambiente","schema":{"enum":["test","live"],"type":"string"}}],"responses":{"200":{"description":"Lista de chaves API","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyResponse"}}}}}},"security":[{"bearer":[]}],"summary":"Listar chaves API","tags":["api-keys"]}},"/api/api-keys/{id}":{"get":{"operationId":"ApiKeysController_findOne","parameters":[{"name":"id","required":true,"in":"path","description":"ID da chave API","schema":{"type":"string"}}],"responses":{"200":{"description":"Detalhes da chave API","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyResponse"}}}},"404":{"description":"Chave não encontrada"}},"security":[{"bearer":[]}],"summary":"Obter detalhes de uma chave API","tags":["api-keys"]},"delete":{"operationId":"ApiKeysController_revoke","parameters":[{"name":"id","required":true,"in":"path","description":"ID da chave API","schema":{"type":"string"}}],"responses":{"200":{"description":"Chave revogada com sucesso"},"404":{"description":"Chave não encontrada"},"409":{"description":"Chave já foi revogada"}},"security":[{"bearer":[]}],"summary":"Revogar chave API","tags":["api-keys"]}},"/api/checkout/sessions":{"post":{"operationId":"CheckoutSessionsController_create","parameters":[{"name":"X-Idempotency-Key","required":false,"in":"header","description":"Idempotency key for request deduplication (24h window)","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCheckoutSessionDto"}}}},"responses":{"201":{"description":"Checkout session created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionResponseDto"}}}},"400":{"description":"Validation error"},"401":{"description":"Invalid API key"},"404":{"description":"Product not found"}},"security":[{"api-key":[]}],"summary":"Create a checkout session","tags":["checkout/sessions"]},"get":{"operationId":"CheckoutSessionsController_list","parameters":[{"name":"page","required":false,"in":"query","description":"Page number (default: 1)","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page (default: 10)","schema":{"type":"number"}},{"name":"status","required":false,"in":"query","description":"Filter by status","schema":{"enum":["open","complete","expired"],"type":"string"}}],"responses":{"200":{"description":"Checkout sessions list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionListResponseDto"}}}},"401":{"description":"Invalid API key"}},"security":[{"api-key":[]}],"summary":"List checkout sessions","tags":["checkout/sessions"]}},"/api/checkout/sessions/{id}":{"get":{"operationId":"CheckoutSessionsController_getById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Checkout session details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionResponseDto"}}}},"401":{"description":"Invalid API key"},"404":{"description":"Checkout session not found"}},"security":[{"api-key":[]}],"summary":"Get a checkout session by ID","tags":["checkout/sessions"]}},"/api/checkout/sessions/{id}/expire":{"post":{"operationId":"CheckoutSessionsController_expire","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Checkout session expired successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionResponseDto"}}}},"201":{"description":""},"401":{"description":"Invalid API key"},"404":{"description":"Checkout session not found"},"409":{"description":"Checkout session cannot be expired"}},"security":[{"api-key":[]}],"summary":"Manually expire a checkout session","tags":["checkout/sessions"]}},"/api/checkout/session/{token}":{"get":{"operationId":"CheckoutPublicController_getByToken","parameters":[{"name":"token","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Checkout session details for payment page"},"404":{"description":"Checkout session not found or expired"}},"summary":"Get checkout session by token (public)","tags":["checkout"]}},"/api/customers":{"post":{"operationId":"CustomersController_Create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomerRequest"}}}},"responses":{"201":{"description":"Customer created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}}},"security":[{"garu-gateway":[]}],"summary":"Create a new customer","tags":["customers"]},"get":{"operationId":"CustomersController_List","parameters":[{"name":"page","required":true,"in":"query","schema":{"type":"number"}},{"name":"limit","required":true,"in":"query","schema":{"type":"number"}},{"name":"search","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated list of customers"}},"security":[{"garu-gateway":[]}],"summary":"List customers for the current seller","tags":["customers"]}},"/api/customers/{id}":{"get":{"operationId":"CustomersController_GetOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"Customer details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}}},"security":[{"garu-gateway":[]}],"summary":"Get a customer by ID","tags":["customers"]},"put":{"operationId":"CustomersController_Update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerRequest"}}}},"responses":{"200":{"description":"Customer updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}}},"security":[{"garu-gateway":[]}],"summary":"Update a customer","tags":["customers"]},"delete":{"operationId":"CustomersController_Remove","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"Customer unlinked from seller"}},"security":[{"garu-gateway":[]}],"summary":"Remove customer from seller","tags":["customers"]}},"/api/meta":{"get":{"description":"Returns version, supported payment methods, webhook event catalog, and feature flags. Unauthenticated. Used by the Garu CLI `doctor` command and MCP server to introspect the API.","operationId":"MetaController_getMeta","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaResponse"}}}}},"summary":"Get API capability metadata","tags":["meta"]}},"/api/subscribe":{"post":{"operationId":"SubscribeController_subscribe","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionRequest"}}}},"responses":{"201":{"description":"Subscription created successfully"}},"summary":"Subscribe to a product (public endpoint for checkout)","tags":["subscribe"]}},"/api/subscription-prices":{"post":{"operationId":"SubscriptionPricesController_createSubscriptionPrice","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionPriceRequest"}}}},"responses":{"201":{"description":"Subscription price created successfully"}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Create a new subscription price/plan","tags":["subscription-prices"]},"get":{"operationId":"SubscriptionPricesController_getPricesBySeller","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionPrice"}}}}}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Get all subscription prices for seller","tags":["subscription-prices"]}},"/api/subscription-prices/product/{productId}/active":{"get":{"operationId":"SubscriptionPricesController_getActivePricesByProduct","parameters":[{"name":"productId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionPrice"}}}}}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Get active subscription prices for a product","tags":["subscription-prices"]}},"/api/subscription-prices/product/{productId}":{"get":{"operationId":"SubscriptionPricesController_getPricesByProduct","parameters":[{"name":"productId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionPrice"}}}}}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Get all subscription prices for a product","tags":["subscription-prices"]}},"/api/subscription-prices/{id}":{"get":{"operationId":"SubscriptionPricesController_getPriceById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPrice"}}}}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Get subscription price by ID","tags":["subscription-prices"]},"patch":{"operationId":"SubscriptionPricesController_updateSubscriptionPrice","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionPriceRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPrice"}}}}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Update subscription price","tags":["subscription-prices"]},"delete":{"operationId":"SubscriptionPricesController_deactivatePrice","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Deactivate subscription price","tags":["subscription-prices"]}},"/api/subscriptions":{"post":{"operationId":"SubscriptionsController_createSubscription","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionRequest"}}}},"responses":{"201":{"description":"Subscription created successfully"}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Create a new subscription (authenticated - for admin panel)","tags":["subscriptions"]},"get":{"operationId":"SubscriptionsController_getSubscriptionsBySeller","parameters":[{"name":"status","required":true,"in":"query","schema":{"type":"string"}},{"name":"search","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Get all subscriptions for authenticated seller with pagination","tags":["subscriptions"]}},"/api/subscriptions/{id}":{"get":{"operationId":"SubscriptionsController_getSubscriptionById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}}}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Get subscription by ID","tags":["subscriptions"]}},"/api/subscriptions/{id}/cancel":{"post":{"operationId":"SubscriptionsController_cancelSubscription","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Cancel a subscription","tags":["subscriptions"]}},"/api/subscriptions/{id}/pause":{"post":{"operationId":"SubscriptionsController_pauseSubscription","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Pause a subscription","tags":["subscriptions"]}},"/api/subscriptions/{id}/resume":{"post":{"operationId":"SubscriptionsController_resumeSubscription","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Resume a paused subscription","tags":["subscriptions"]}},"/api/subscriptions/{id}/events":{"get":{"operationId":"SubscriptionsController_getSubscriptionEvents","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionEvent"}}}}}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Get subscription events/history","tags":["subscriptions"]}},"/api/subscriptions/{id}/return-url-config":{"get":{"operationId":"SubscriptionsController_getReturnUrlConfig","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Get return URL configuration for subscription","tags":["subscriptions"]}},"/api/portal/sessions":{"post":{"operationId":"PortalController_createPortalSession","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePortalSessionRequest"}}}},"responses":{"201":{"description":"Portal session created successfully"}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Create a portal session for a customer","tags":["portal"]}},"/api/portal/configuration":{"get":{"operationId":"PortalController_getSellerConfiguration","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalConfiguration"}}}}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Get seller portal configuration","tags":["portal"]},"put":{"operationId":"PortalController_updateSellerConfiguration","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalConfigurationRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalConfiguration"}}}}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Update seller portal configuration","tags":["portal"]}},"/api/portal/configuration/product/{productId}":{"get":{"operationId":"PortalController_getProductConfiguration","parameters":[{"name":"productId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Get product portal configuration","tags":["portal"]},"put":{"operationId":"PortalController_updateProductConfiguration","parameters":[{"name":"productId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalConfigurationRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductPortalConfiguration"}}}}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Update product portal configuration","tags":["portal"]}},"/api/portal":{"get":{"operationId":"PortalController_getPortalData","parameters":[{"name":"token","required":true,"in":"query","description":"Portal session token","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"api-key":[]}],"summary":"Get portal data for customer (public with token)","tags":["portal"]}},"/api/portal/subscriptions/{id}/cancel":{"post":{"operationId":"PortalController_cancelSubscription","parameters":[{"name":"token","required":true,"in":"query","description":"Portal session token","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"security":[{"api-key":[]}],"summary":"Cancel subscription via portal","tags":["portal"]}},"/api/portal/subscriptions/{id}/pause":{"post":{"operationId":"PortalController_pauseSubscription","parameters":[{"name":"token","required":true,"in":"query","description":"Portal session token","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"security":[{"api-key":[]}],"summary":"Pause subscription via portal","tags":["portal"]}},"/api/portal/subscriptions/{id}/resume":{"post":{"operationId":"PortalController_resumeSubscription","parameters":[{"name":"token","required":true,"in":"query","description":"Portal session token","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"security":[{"api-key":[]}],"summary":"Resume subscription via portal","tags":["portal"]}},"/api/portal/subscriptions/{id}/reactivate":{"post":{"operationId":"PortalController_reactivateSubscription","parameters":[{"name":"token","required":true,"in":"query","description":"Portal session token","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"security":[{"api-key":[]}],"summary":"Reactivate cancelled subscription via portal","tags":["portal"]}},"/api/portal/subscriptions/{id}/update-payment-method":{"post":{"operationId":"PortalController_updateSubscriptionPaymentMethod","parameters":[{"name":"token","required":true,"in":"query","description":"Portal session token","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePaymentMethodRequest"}}}},"responses":{"201":{"description":""}},"security":[{"api-key":[]}],"summary":"Update subscription payment method via portal","tags":["portal"]}},"/api/portal/subscriptions/{id}/add-card-and-update":{"post":{"operationId":"PortalController_addCardAndUpdateSubscription","parameters":[{"name":"token","required":true,"in":"query","description":"Portal session token","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddCardAndUpdateSubscriptionRequest"}}}},"responses":{"201":{"description":""}},"security":[{"api-key":[]}],"summary":"Add new credit card and update subscription payment method","tags":["portal"]}},"/api/portal/subscriptions/{id}/events":{"get":{"operationId":"PortalController_getSubscriptionEvents","parameters":[{"name":"token","required":true,"in":"query","description":"Portal session token","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"api-key":[]}],"summary":"Get subscription events/billing history via portal","tags":["portal"]}},"/api/portal/payment-methods":{"post":{"operationId":"PortalController_addPaymentMethod","parameters":[{"name":"token","required":true,"in":"query","description":"Portal session token","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"security":[{"api-key":[]}],"summary":"Add payment method via portal","tags":["portal"]}},"/api/portal/payment-methods/{id}":{"delete":{"operationId":"PortalController_deletePaymentMethod","parameters":[{"name":"token","required":true,"in":"query","description":"Portal session token","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"api-key":[]}],"summary":"Delete payment method via portal","tags":["portal"]}},"/api/portal/payment-methods/{id}/default":{"post":{"operationId":"PortalController_setDefaultPaymentMethod","parameters":[{"name":"token","required":true,"in":"query","description":"Portal session token","schema":{"type":"string"}},{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"201":{"description":""}},"security":[{"api-key":[]}],"summary":"Set payment method as default via portal","tags":["portal"]}},"/api/portal/customer-info":{"put":{"operationId":"PortalController_updateCustomerInfo","parameters":[{"name":"token","required":true,"in":"query","description":"Portal session token","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerInfoRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"api-key":[]}],"summary":"Update customer billing information via portal","tags":["portal"]}},"/api/v1/products":{"post":{"operationId":"V1ProductsController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductDto"}}}},"responses":{"201":{"description":"Product created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponseDto"}}}},"400":{"description":"Validation error"},"401":{"description":"Invalid API key"}},"security":[{"api-key":[]}],"summary":"Create a new product","tags":["v1/products"]},"get":{"operationId":"V1ProductsController_list","parameters":[{"name":"page","required":false,"in":"query","description":"Page number (default: 1)","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Items per page (default: 10)","schema":{"type":"number"}}],"responses":{"200":{"description":"Products list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductListResponseDto"}}}},"401":{"description":"Invalid API key"}},"security":[{"api-key":[]}],"summary":"List all products","tags":["v1/products"]}},"/api/v1/products/{id}":{"get":{"operationId":"V1ProductsController_getById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"Product details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponseDto"}}}},"401":{"description":"Invalid API key"},"404":{"description":"Product not found"}},"security":[{"api-key":[]}],"summary":"Get a product by ID","tags":["v1/products"]},"patch":{"operationId":"V1ProductsController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductDto"}}}},"responses":{"200":{"description":"Product updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponseDto"}}}},"401":{"description":"Invalid API key"},"404":{"description":"Product not found"}},"security":[{"api-key":[]}],"summary":"Update a product","tags":["v1/products"]},"delete":{"operationId":"V1ProductsController_deactivate","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"Product deactivated successfully"},"401":{"description":"Invalid API key"},"404":{"description":"Product not found"}},"security":[{"api-key":[]}],"summary":"Deactivate a product","tags":["v1/products"]}},"/api/v1/subscription-prices":{"post":{"operationId":"V1SubscriptionPricesController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionPriceDto"}}}},"responses":{"201":{"description":"Subscription price created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPriceResponseDto"}}}},"400":{"description":"Validation error"},"401":{"description":"Invalid API key"},"404":{"description":"Product not found"}},"security":[{"api-key":[]}],"summary":"Create a new subscription price","tags":["v1/subscription-prices"]},"get":{"operationId":"V1SubscriptionPricesController_list","parameters":[],"responses":{"200":{"description":"Subscription prices list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPriceListResponseDto"}}}},"401":{"description":"Invalid API key"}},"security":[{"api-key":[]}],"summary":"List all subscription prices for seller","tags":["v1/subscription-prices"]}},"/api/v1/subscription-prices/{id}":{"get":{"operationId":"V1SubscriptionPricesController_getById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Subscription price details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPriceResponseDto"}}}},"401":{"description":"Invalid API key"},"404":{"description":"Subscription price not found"}},"security":[{"api-key":[]}],"summary":"Get a subscription price by ID","tags":["v1/subscription-prices"]},"patch":{"operationId":"V1SubscriptionPricesController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionPriceDto"}}}},"responses":{"200":{"description":"Subscription price updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPriceResponseDto"}}}},"401":{"description":"Invalid API key"},"404":{"description":"Subscription price not found"}},"security":[{"api-key":[]}],"summary":"Update a subscription price","tags":["v1/subscription-prices"]},"delete":{"operationId":"V1SubscriptionPricesController_deactivate","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Subscription price deactivated successfully"},"401":{"description":"Invalid API key"},"404":{"description":"Subscription price not found"}},"security":[{"api-key":[]}],"summary":"Deactivate a subscription price","tags":["v1/subscription-prices"]}},"/api/webhook-endpoints":{"post":{"operationId":"WebhookEndpointsController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookEndpointRequest"}}}},"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Create a new webhook endpoint","tags":["webhook-endpoints"]},"get":{"operationId":"WebhookEndpointsController_list","parameters":[],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"List all webhook endpoints","tags":["webhook-endpoints"]}},"/api/webhook-endpoints/{id}":{"get":{"operationId":"WebhookEndpointsController_getById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Get webhook endpoint details","tags":["webhook-endpoints"]},"patch":{"operationId":"WebhookEndpointsController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookEndpointRequest"}}}},"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Update webhook endpoint","tags":["webhook-endpoints"]},"delete":{"operationId":"WebhookEndpointsController_delete","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":""}},"security":[{"bearer":[]}],"summary":"Delete webhook endpoint","tags":["webhook-endpoints"]}},"/api/webhook-endpoints/{id}/rotate-secret":{"post":{"operationId":"WebhookEndpointsController_rotateSecret","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"201":{"description":""}},"security":[{"bearer":[]}],"summary":"Regenerate webhook endpoint secret","tags":["webhook-endpoints"]}},"/api/webhook-endpoints/{id}/test":{"post":{"operationId":"WebhookEndpointsController_test","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"bearer":[]}],"summary":"Send a test webhook event","tags":["webhook-endpoints"]}},"/api/webhook-events":{"get":{"operationId":"WebhookEventsController_list","parameters":[{"name":"endpoint_id","required":false,"in":"query","schema":{"type":"number"}},{"name":"status","required":false,"in":"query","schema":{"enum":["pending","success","failed"],"type":"string"}},{"name":"event_type","required":false,"in":"query","schema":{"type":"string"}},{"name":"page","required":false,"in":"query","schema":{"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"example":50,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"bearer":[]}],"summary":"List webhook events with filters","tags":["webhook-events"]}},"/api/webhook-events/{id}":{"get":{"operationId":"WebhookEventsController_getById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutgoingWebhookEvent"}}}}},"security":[{"bearer":[]}],"summary":"Get webhook event details","tags":["webhook-events"]}},"/api/webhook-events/{id}/retry":{"post":{"operationId":"WebhookEventsController_retry","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutgoingWebhookEvent"}}}}},"security":[{"bearer":[]}],"summary":"Manually retry a failed webhook event","tags":["webhook-events"]}}},"info":{"title":"Garu API","description":"## Visão Geral\n\nA **Garu API** é o gateway de pagamentos que simplifica a gestão de pagamentos e apoia empreendedores em seu crescimento.\nNossa API permite integrar processamento de pagamentos PIX, cartão de crédito e boleto diretamente em sua aplicação.\n\n### Funcionalidades Principais\n\n- **Transações**: Processar pagamentos únicos via PIX, cartão de crédito ou boleto\n- **Assinaturas**: Gerenciar cobranças recorrentes com planos flexíveis\n- **Produtos**: Criar e gerenciar produtos físicos e digitais\n- **Webhooks**: Receber notificações em tempo real sobre eventos de pagamento\n- **Relatórios**: Acessar dados financeiros e métricas de vendas\n\n### Autenticação\n\nA API suporta dois métodos de autenticação:\n\n1. **JWT Bearer Token**: Para acesso ao painel administrativo (usuários logados)\n2. **API Key**: Para integrações server-to-server (formato: `sk_live_xxx` ou `sk_test_xxx`)\n\n### Ambientes\n\n- **Produção**: Chaves com prefixo `sk_live_` processam pagamentos reais\n- **Teste**: Chaves com prefixo `sk_test_` para desenvolvimento e testes\n\n### Suporte\n\nPara dúvidas ou suporte técnico, entre em contato através do painel Garu ou consulte nossa documentação.\n","version":"1.0.0","contact":{"name":"Garu","url":"https://garu.com.br","email":"contato@garu.com.br"},"license":{"name":"Proprietary","url":"https://garu.com.br/termos"}},"tags":[{"name":"products","description":"Criação e gerenciamento de produtos"},{"name":"transactions","description":"Processamento de pagamentos e transações"},{"name":"subscriptions","description":"Gerenciamento de assinaturas recorrentes"},{"name":"subscription-prices","description":"Preços e planos de assinatura"},{"name":"checkout/sessions","description":"Sessões de checkout para pagamento"},{"name":"checkout","description":"Checkout público"},{"name":"customers","description":"Gerenciamento de clientes"},{"name":"meta","description":"Metadados e capabilities da API"},{"name":"webhook-endpoints","description":"Configuração de endpoints de webhook"},{"name":"webhook-events","description":"Histórico de eventos de webhook"},{"name":"api-keys","description":"Gerenciamento de chaves de API"},{"name":"portal","description":"Portal do cliente e checkout"},{"name":"health","description":"Status e saúde da API"},{"name":"subscribe","description":"Checkout público de assinaturas"},{"name":"v1/products","description":"API v1 - Produtos (para integrações externas)"},{"name":"v1/subscription-prices","description":"API v1 - Preços de assinatura (para integrações externas)"}],"servers":[{"url":"http://localhost:3000","description":"API Server"}],"components":{"securitySchemes":{"garu-gateway":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"Autenticação via JWT. Token obtido através do endpoint de login (/api/auth/login). Usado principalmente pelo painel administrativo."},"api-key":{"type":"apiKey","in":"header","name":"Authorization","description":"Autenticação via chave de API (API Key). Insira sua chave no formato: Bearer sk_live_xxx (produção) ou Bearer sk_test_xxx (teste). Obtenha sua chave no Dashboard da Garu em Configurações > Desenvolvedores."}},"schemas":{"CreateIncidentDto":{"type":"object","properties":{"name":{"type":"string","description":"Nome do incidente","example":"API Server - Indisponível"},"status":{"type":"string","description":"Status do incidente","enum":["investigating","identified","monitoring","resolved"],"example":"investigating"},"body":{"type":"string","description":"Descrição do incidente","example":"O servidor API está enfrentando problemas de conectividade."},"componentIds":{"description":"IDs dos componentes afetados (obter do Statuspage dashboard)","example":["component_id_1","component_id_2"],"type":"array","items":{"type":"string"}},"impact":{"type":"string","description":"Impacto do incidente","enum":["none","minor","major","critical"],"example":"major"}},"required":["name","status","body","componentIds"]},"UpdateIncidentDto":{"type":"object","properties":{"status":{"type":"string","description":"Novo status do incidente","enum":["investigating","identified","monitoring","resolved"],"example":"identified"},"body":{"type":"string","description":"Atualização do incidente","example":"Identificamos a causa raiz e estamos trabalhando na correção."}}},"FacebookCapiEventDto":{"type":"object","properties":{"eventName":{"type":"string","description":"Event name","example":"PageView"},"eventID":{"type":"string","description":"Event ID","example":"123e4567-e89b-12d3-a456-426614174000"},"external_id":{"type":"string","description":"External ID (anonymous user identifier)","example":"abc123"},"first_name":{"type":"string","description":"First name","example":"John"},"last_name":{"type":"string","description":"Last name","example":"Doe"},"email":{"type":"string","description":"Email","example":"john@example.com"},"country":{"type":"string","description":"Country code","example":"BR"},"city":{"type":"string","description":"City","example":"São Paulo"},"region":{"type":"string","description":"Region/State","example":"SP"},"ip_address":{"type":"string","description":"IP Address","example":"192.168.1.1"},"browser":{"type":"string","description":"Browser name","example":"Chrome"},"browser_version":{"type":"string","description":"Browser version","example":"96.0.4664.110"},"device_brand":{"type":"string","description":"Device brand","example":"Apple"},"device_model":{"type":"string","description":"Device model","example":"iPhone 13"},"os":{"type":"string","description":"Operating system","example":"iOS"},"os_version":{"type":"string","description":"OS version","example":"15.2"},"fbclid":{"type":"string","description":"Facebook click ID","example":"abc123"},"gclid":{"type":"string","description":"Google click ID","example":"xyz789"},"utm_source":{"type":"string","description":"UTM source","example":"facebook"},"utm_medium":{"type":"string","description":"UTM medium","example":"cpc"},"utm_campaign":{"type":"string","description":"UTM campaign","example":"summer_sale"},"utm_term":{"type":"string","description":"UTM term","example":"shoes"},"utm_content":{"type":"string","description":"UTM content","example":"ad1"},"courseId":{"type":"number","description":"Product/Course ID","example":123},"sellerId":{"type":"number","description":"Seller ID","example":1},"value":{"type":"number","description":"Transaction value","example":99.99},"currency":{"type":"string","description":"Currency","example":"BRL"},"fbp":{"type":"string","description":"Facebook browser ID (_fbp cookie)","example":"fb.1.123456789.987654321"},"fbc":{"type":"string","description":"Facebook click ID (_fbc cookie)","example":"fb.1.123456789.abc"}},"required":["eventName","eventID"]},"PixelDomainInfo":{"type":"object","properties":{"id":{"type":"number","description":"Domain ID"},"fullSubdomain":{"type":"string","description":"Full subdomain (e.g., pixels.example.com)"},"verificationStatus":{"type":"string","description":"Domain verification status"}},"required":["id","fullSubdomain","verificationStatus"]},"PixelResponse":{"type":"object","properties":{"id":{"type":"number","description":"Pixel ID"},"name":{"type":"string","description":"Pixel name"},"pixelId":{"type":"string","description":"Facebook Pixel ID"},"hasAccessToken":{"type":"boolean","description":"Whether the pixel has an access token configured"},"isActive":{"type":"boolean","description":"Whether the pixel is active"},"domain":{"nullable":true,"description":"Custom domain configuration","allOf":[{"$ref":"#/components/schemas/PixelDomainInfo"}]},"createdAt":{"format":"date-time","type":"string","description":"Creation date"},"updatedAt":{"format":"date-time","type":"string","description":"Last update date"}},"required":["id","name","pixelId","isActive","createdAt","updatedAt"]},"CreatePixelRequest":{"type":"object","properties":{"name":{"type":"string","description":"Optional name for the pixel"},"pixelId":{"type":"string","description":"Facebook Pixel ID"},"accessToken":{"type":"string","description":"Access token for Conversion API"},"domainId":{"type":"number","description":"Domain ID for first-party pixel tracking"}},"required":["pixelId"]},"UpdatePixelRequest":{"type":"object","properties":{"name":{"type":"string","description":"Name for the pixel"},"pixelId":{"type":"string","description":"Facebook Pixel ID"},"accessToken":{"type":"string","description":"Access token for Conversion API"},"isActive":{"type":"boolean","description":"Whether the pixel is active"},"domainId":{"type":"number","description":"Domain ID for first-party pixel tracking"}}},"ValidatePixelRequest":{"type":"object","properties":{"pixelId":{"type":"string","description":"Facebook Pixel ID"},"accessToken":{"type":"string","description":"Access token for Conversion API"}},"required":["pixelId"]},"ValidationResponse":{"type":"object","properties":{"valid":{"type":"boolean","description":"Whether the pixel/token is valid"},"message":{"type":"string","description":"Error message if validation failed"}},"required":["valid"]},"EventSettingsResponse":{"type":"object","properties":{"id":{"type":"number","description":"Event settings ID"},"sellerId":{"type":"number","description":"Seller ID if this is a seller-level setting"},"productId":{"type":"number","description":"Product ID if this is a product-level setting"},"pageViewEnabled":{"type":"boolean","description":"Enable PageView event"},"initiateCheckoutEnabled":{"type":"boolean","description":"Enable InitiateCheckout event"},"addPaymentInfoEnabled":{"type":"boolean","description":"Enable AddPaymentInfo event"},"leadEnabled":{"type":"boolean","description":"Enable Lead event"},"purchaseEnabled":{"type":"boolean","description":"Enable Purchase event"},"createdAt":{"format":"date-time","type":"string","description":"Creation date"},"updatedAt":{"format":"date-time","type":"string","description":"Last update date"}},"required":["id","pageViewEnabled","initiateCheckoutEnabled","addPaymentInfoEnabled","leadEnabled","purchaseEnabled","createdAt","updatedAt"]},"EventSettingsRequest":{"type":"object","properties":{"pageViewEnabled":{"type":"boolean","description":"Enable PageView event"},"initiateCheckoutEnabled":{"type":"boolean","description":"Enable InitiateCheckout event"},"addPaymentInfoEnabled":{"type":"boolean","description":"Enable AddPaymentInfo event"},"leadEnabled":{"type":"boolean","description":"Enable Lead event"},"purchaseEnabled":{"type":"boolean","description":"Enable Purchase event"}},"required":["pageViewEnabled","initiateCheckoutEnabled","addPaymentInfoEnabled","leadEnabled","purchaseEnabled"]},"SendMagicLinkRequest":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Admin email address"}},"required":["email"]},"VerifyMagicLinkRequest":{"type":"object","properties":{"token":{"type":"string","description":"Magic link JWT token"}},"required":["token"]},"CreateFeeScheduleRequest":{"type":"object","properties":{"processor":{"type":"string","example":"celcoin"},"effectiveFrom":{"type":"string","example":"2025-07-01"},"pixReceiveDynamicQr":{"type":"number","minimum":0,"example":1.5},"pixReceiveStaticQr":{"type":"number","minimum":0,"example":0},"pixSend":{"type":"number","minimum":0,"example":0.3},"boletoCompensated":{"type":"number","minimum":0,"example":1.45},"cardVisaSpot":{"type":"number","minimum":0},"cardVisa2_6":{"type":"number","minimum":0},"cardVisa7_12":{"type":"number","minimum":0},"cardMastercardSpot":{"type":"number","minimum":0},"cardMastercard2_6":{"type":"number","minimum":0},"cardMastercard7_12":{"type":"number","minimum":0},"cardAmexSpot":{"type":"number","minimum":0},"cardAmex2_6":{"type":"number","minimum":0},"cardAmex7_12":{"type":"number","minimum":0},"cardHipercardSpot":{"type":"number","minimum":0},"cardHipercard2_6":{"type":"number","minimum":0},"cardHipercard7_12":{"type":"number","minimum":0},"cardEloSpot":{"type":"number","minimum":0},"cardElo2_6":{"type":"number","minimum":0},"cardElo7_12":{"type":"number","minimum":0},"cardDiscoverSpot":{"type":"number","minimum":0},"cardDiscover2_6":{"type":"number","minimum":0},"cardDiscover7_12":{"type":"number","minimum":0},"cardDinersSpot":{"type":"number","minimum":0},"cardDiners2_6":{"type":"number","minimum":0},"cardDiners7_12":{"type":"number","minimum":0},"cardJcbSpot":{"type":"number","minimum":0},"cardJcb2_6":{"type":"number","minimum":0},"cardJcb7_12":{"type":"number","minimum":0},"cardFixedFee":{"type":"number","minimum":0,"example":0.39},"cardFixedFeeRule":{"type":"string","example":"first_installment_only"},"anticipationEnabled":{"type":"boolean","example":true},"anticipationRateMonthly":{"type":"number","minimum":0,"example":2.49},"anticipationSettlementDelay":{"type":"string","example":"D+1"},"anticipationCushionPct":{"type":"number","minimum":0,"example":20},"withdrawalTed":{"type":"number","minimum":0,"example":5.99},"withdrawalPix":{"type":"number","minimum":0,"example":0.3},"notes":{"type":"string"}},"required":["processor","effectiveFrom"]},"UpdateAlertConfigRequest":{"type":"object","properties":{"warningThresholdBrl":{"type":"number","minimum":0,"description":"Warning threshold in BRL"},"criticalThresholdBrl":{"type":"number","minimum":0,"description":"Critical threshold in BRL"},"recipients":{"description":"Email recipients for alerts","type":"array","items":{"type":"string","format":"email"}},"isActive":{"type":"boolean","description":"Whether alerts are active"}}},"UpdateSellerConfigRequest":{"type":"object","properties":{"pixFeePercent":{"type":"number","nullable":true,"minimum":0,"maximum":1,"description":"PIX fee percentage (e.g., 0.0899 = 8.99%)"},"pixFeeFixed":{"type":"number","nullable":true,"minimum":0,"description":"PIX fixed fee in BRL (e.g., 2.49)"},"pixDplusX":{"type":"number","nullable":true,"minimum":0,"maximum":60,"description":"PIX settlement days (D+X)"},"pixReservePercent":{"type":"number","nullable":true,"minimum":0,"maximum":1,"description":"PIX reserve percentage (e.g., 0.04 = 4%)"},"pixReserveDays":{"type":"number","nullable":true,"minimum":0,"maximum":365,"description":"PIX reserve days"},"creditFeePercent":{"type":"number","nullable":true,"minimum":0,"maximum":1,"description":"Credit card fee percentage"},"creditFeeFixed":{"type":"number","nullable":true,"minimum":0,"description":"Credit card fixed fee in BRL"},"creditDplusX":{"type":"number","nullable":true,"minimum":0,"maximum":60,"description":"Credit card settlement days (D+X)"},"creditReservePercent":{"type":"number","nullable":true,"minimum":0,"maximum":1,"description":"Credit card reserve percentage"},"creditReserveDays":{"type":"number","nullable":true,"minimum":0,"maximum":365,"description":"Credit card reserve days"},"boletoFeePercent":{"type":"number","nullable":true,"minimum":0,"maximum":1,"description":"Boleto fee percentage"},"boletoFeeFixed":{"type":"number","nullable":true,"minimum":0,"description":"Boleto fixed fee in BRL"},"boletoDplusX":{"type":"number","nullable":true,"minimum":0,"maximum":60,"description":"Boleto settlement days (D+X)"},"boletoReservePercent":{"type":"number","nullable":true,"minimum":0,"maximum":1,"description":"Boleto reserve percentage"},"boletoReserveDays":{"type":"number","nullable":true,"minimum":0,"maximum":365,"description":"Boleto reserve days"},"intlCreditFeePercent":{"type":"number","nullable":true,"minimum":0,"maximum":1,"description":"International credit card fee percentage"},"intlCreditFeeFixed":{"type":"number","nullable":true,"minimum":0,"description":"International credit card fixed fee in USD"},"intlCreditDplusX":{"type":"number","nullable":true,"minimum":0,"maximum":60,"description":"International credit card settlement days (D+X)"},"intlCreditReservePercent":{"type":"number","nullable":true,"minimum":0,"maximum":1,"description":"International credit card reserve percentage"},"intlCreditReserveDays":{"type":"number","nullable":true,"minimum":0,"maximum":365,"description":"International credit card reserve days"},"chargebackFee":{"type":"number","nullable":true,"minimum":0,"description":"Chargeback fee in BRL"},"withdrawalFee":{"type":"number","nullable":true,"minimum":0,"description":"Withdrawal fee in BRL"},"reason":{"type":"string","description":"Reason for the configuration change"}}},"SetAffiliatePermissionRequest":{"type":"object","properties":{"canAffiliate":{"type":"boolean","description":"Whether the seller can participate as an affiliate","example":false},"reason":{"type":"string","minLength":5,"description":"Reason for the change (required when blocking)","example":"Violação dos termos de uso"}},"required":["canAffiliate"]},"SetAffiliatePermissionResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Success status","example":true},"canAffiliate":{"type":"boolean","description":"New permission status","example":false},"deactivatedCount":{"type":"number","description":"Number of affiliations deactivated (when blocking)","example":5},"message":{"type":"string","description":"Human-readable message","example":"Seller blocked successfully"}},"required":["success","canAffiliate","deactivatedCount","message"]},"SendTestNotificationRequest":{"type":"object","properties":{"userId":{"type":"number","description":"ID do usuario destinatario"},"title":{"type":"string","maxLength":100,"description":"Titulo da notificacao"},"body":{"type":"string","maxLength":500,"description":"Corpo da notificacao"}},"required":["userId","title","body"]},"ApproveWithdrawalRequest":{"type":"object","properties":{"notes":{"type":"string","maxLength":500,"description":"Optional notes about approval"}}},"RejectWithdrawalRequest":{"type":"object","properties":{"reason":{"type":"string","minLength":10,"maxLength":500,"description":"Reason for rejection"}},"required":["reason"]},"MarkPaidRequest":{"type":"object","properties":{"paymentReference":{"type":"string","maxLength":100,"description":"Payment reference/confirmation ID from bank transfer"}},"required":["paymentReference"]},"AffiliateBalanceResponse":{"type":"object","properties":{"availableBalance":{"type":"number","description":"Available balance for withdrawal"},"pendingBalance":{"type":"number","description":"Pending balance (within D+X period)"},"totalBalance":{"type":"number","description":"Total balance (available + pending)"},"hasPendingWithdrawal":{"type":"boolean","description":"Whether there is a pending withdrawal request"},"withdrawableBalance":{"type":"number","description":"Withdrawable amount (available - reserved)"}},"required":["availableBalance","pendingBalance","totalBalance","hasPendingWithdrawal","withdrawableBalance"]},"AffiliateStatsResponse":{"type":"object","properties":{"totalEarnings":{"type":"number","description":"Total earnings from all affiliations"},"totalSales":{"type":"number","description":"Total number of sales"},"totalClicks":{"type":"number","description":"Total number of clicks"},"conversionRate":{"type":"number","description":"Conversion rate (sales/clicks)"},"earningsThisMonth":{"type":"number","description":"Earnings this month"},"salesThisMonth":{"type":"number","description":"Sales this month"}},"required":["totalEarnings","totalSales","totalClicks","conversionRate","earningsThisMonth","salesThisMonth"]},"AffiliateProductSummary":{"type":"object","properties":{"affiliationId":{"type":"number","description":"Affiliation ID"},"productId":{"type":"number","description":"Product ID"},"productUuid":{"type":"string","description":"Product UUID"},"productName":{"type":"string","description":"Product name"},"productValue":{"type":"number","description":"Product value"},"productImage":{"type":"string","nullable":true,"description":"Product image URL"},"commissionPercent":{"type":"number","description":"Commission percentage"},"commissionAmount":{"type":"number","description":"Commission amount per sale"},"affiliateLink":{"type":"string","description":"Affiliate link"},"totalSales":{"type":"number","description":"Total sales count"},"totalEarnings":{"type":"number","description":"Total earnings from this product"},"status":{"type":"object","description":"Affiliation status"},"sellerName":{"type":"string","description":"Producer/Seller name"},"createdAt":{"format":"date-time","type":"string","description":"Affiliation created date"}},"required":["affiliationId","productId","productUuid","productName","productValue","productImage","commissionPercent","commissionAmount","affiliateLink","totalSales","totalEarnings","status","sellerName","createdAt"]},"AffiliateSaleResponse":{"type":"object","properties":{"transactionId":{"type":"number","description":"Transaction ID"},"productName":{"type":"string","description":"Product name"},"value":{"type":"number","description":"Transaction value"},"commission":{"type":"number","description":"Affiliate commission earned"},"date":{"format":"date-time","type":"string","description":"Transaction date"},"status":{"type":"string","description":"Transaction status"},"customerEmail":{"type":"string","description":"Customer email (masked)"}},"required":["transactionId","productName","value","commission","date","status","customerEmail"]},"AffiliateDashboardResponse":{"type":"object","properties":{"balance":{"description":"Affiliate balance information","allOf":[{"$ref":"#/components/schemas/AffiliateBalanceResponse"}]},"stats":{"description":"Affiliate statistics","allOf":[{"$ref":"#/components/schemas/AffiliateStatsResponse"}]},"activeProducts":{"description":"Active affiliate products","type":"array","items":{"$ref":"#/components/schemas/AffiliateProductSummary"}},"pendingProducts":{"description":"Pending affiliate products","type":"array","items":{"$ref":"#/components/schemas/AffiliateProductSummary"}},"recentSales":{"description":"Recent sales","type":"array","items":{"$ref":"#/components/schemas/AffiliateSaleResponse"}}},"required":["balance","stats","activeProducts","pendingProducts","recentSales"]},"AffiliateProductAnalyticsResponse":{"type":"object","properties":{"affiliationId":{"type":"number","description":"Affiliation ID"},"productName":{"type":"string","description":"Product name"},"totalClicks":{"type":"number","description":"Total clicks"},"totalSales":{"type":"number","description":"Total sales"},"totalEarnings":{"type":"number","description":"Total earnings"},"conversionRate":{"type":"number","description":"Conversion rate"},"dailyEarnings":{"type":"array","description":"Daily earnings breakdown"},"recentSales":{"description":"Recent sales","type":"array","items":{"$ref":"#/components/schemas/AffiliateSaleResponse"}}},"required":["affiliationId","productName","totalClicks","totalSales","totalEarnings","conversionRate","dailyEarnings","recentSales"]},"CustomerDto":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":255,"description":"Nome completo do cliente","example":"Maria Silva"},"email":{"type":"string","format":"email","description":"Email do cliente","example":"maria@exemplo.com.br"},"document":{"type":"string","pattern":"/^\\d{11}$|^\\d{14}$/","description":"CPF (11 dígitos) ou CNPJ (14 dígitos) sem pontuação","example":"12345678909"},"phone":{"type":"string","pattern":"/^\\d{10,11}$/","description":"Telefone com DDD, 10 ou 11 dígitos, sem formatação","example":"11987654321"},"zipCode":{"type":"string","pattern":"/^\\d{8}$/","description":"CEP com 8 dígitos, sem hífen","example":"01310100"},"street":{"type":"string","minLength":1,"maxLength":255,"description":"Logradouro (rua/avenida)","example":"Av. Paulista"},"number":{"type":"string","minLength":1,"maxLength":20,"description":"Número do endereço","example":"1578"},"complement":{"type":"string","minLength":0,"maxLength":255,"description":"Complemento do endereço","example":"Apto 101"},"neighborhood":{"type":"string","minLength":1,"maxLength":100,"description":"Bairro","example":"Bela Vista"},"city":{"type":"string","minLength":1,"maxLength":100,"description":"Cidade","example":"São Paulo"},"state":{"type":"string","pattern":"/^[A-Z]{2}$/","description":"Sigla do estado (UF) com 2 letras maiúsculas","example":"SP"}},"required":["name","email","document","phone"]},"CardInfoDto":{"type":"object","properties":{"cardNumber":{"type":"string","pattern":"/^\\d{13,19}$/","description":"Número do cartão sem espaços ou traços (13 a 19 dígitos)","example":"4111111111111111"},"cvv":{"type":"string","pattern":"/^\\d{3,4}$/","description":"Código de segurança (3 ou 4 dígitos)","example":"123"},"expirationDate":{"type":"string","pattern":"^\\d{4}-\\d{2}$","description":"Validade do cartão no formato YYYY-MM","example":"2030-12"},"holderName":{"type":"string","minLength":3,"maxLength":255,"description":"Nome do titular exatamente como impresso no cartão","example":"MARIA SILVA"},"installments":{"type":"number","minimum":1,"maximum":12,"description":"Número de parcelas (1 a 12)","example":1}},"required":["cardNumber","cvv","expirationDate","holderName","installments"]},"TrackingContextDto":{"type":"object","properties":{"eventId":{"type":"string","maxLength":100,"description":"Event ID for deduplication"},"fbp":{"type":"string","maxLength":255,"description":"Facebook browser ID (_fbp cookie)"},"fbc":{"type":"string","maxLength":255,"description":"Facebook click ID (_fbc cookie)"},"fbclid":{"type":"string","maxLength":255,"description":"Facebook click ID from URL (fbclid)"},"gclid":{"type":"string","maxLength":255,"description":"Google click ID (gclid)"},"externalId":{"type":"string","maxLength":255,"description":"External ID for cross-platform identity"},"userAgent":{"type":"string","maxLength":500,"description":"User agent string"},"browser":{"type":"string","maxLength":100,"description":"Browser name"},"browserVersion":{"type":"string","maxLength":50,"description":"Browser version"},"deviceBrand":{"type":"string","maxLength":100,"description":"Device brand"},"deviceModel":{"type":"string","maxLength":100,"description":"Device model"},"os":{"type":"string","maxLength":50,"description":"Operating system"},"osVersion":{"type":"string","maxLength":50,"description":"Operating system version"},"utmSource":{"type":"string","maxLength":255,"description":"UTM source"},"utmMedium":{"type":"string","maxLength":255,"description":"UTM medium"},"utmCampaign":{"type":"string","maxLength":255,"description":"UTM campaign"},"utmTerm":{"type":"string","maxLength":255,"description":"UTM term"},"utmContent":{"type":"string","maxLength":255,"description":"UTM content"}}},"CreateTransactionRequest":{"type":"object","properties":{"customer":{"description":"Dados do cliente que está efetuando a compra","allOf":[{"$ref":"#/components/schemas/CustomerDto"}]},"link":{"type":"string","nullable":true,"description":"Link original de checkout (caso a cobrança venha de um link público)","example":null},"affiliateId":{"type":"number","nullable":true,"description":"ID do afiliado associado a esta venda","example":null},"additionalInfo":{"type":"string","description":"Informações adicionais livres (metadata) anexadas à transação","example":"pedido #4472"},"productId":{"type":"string","description":"UUID do produto que está sendo cobrado","example":"b3f2c1e8-6e4a-4b9f-9d1c-2a1f6c3d4e5f"},"priceId":{"type":"string","nullable":true,"description":"ID do preço de assinatura (apenas para transações de subscription; formato price_*)","example":"price_01HXYZABC"},"paymentMethodId":{"enum":["creditcard","boleto","pix"],"type":"string","description":"Método de pagamento: 1=Cartão, 2=Boleto, 3=PIX","example":"pix"},"CardInfo":{"description":"Dados do cartão. Obrigatório apenas quando paymentMethodId = creditcard. ATENÇÃO: este endpoint recebe PAN + CVV em texto claro — use apenas do lado servidor em ambiente PCI-compliant.","allOf":[{"$ref":"#/components/schemas/CardInfoDto"}]},"trackingContext":{"description":"Contexto de rastreamento (UTM, referer, fbclid, etc.)","allOf":[{"$ref":"#/components/schemas/TrackingContextDto"}]},"checkoutSessionToken":{"type":"string","description":"Token opcional de uma Checkout Session previamente criada via API","example":"cs_01HXYZABCDEF1234567890"}},"required":["customer","productId","paymentMethodId"]},"BankAccount":{"type":"object","properties":{"id":{"type":"number"},"sellerId":{"type":"number"},"Seller":{"$ref":"#/components/schemas/Seller"},"bank":{"type":"string"},"agency":{"type":"string"},"account":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","sellerId","Seller","bank","agency","account","createdAt","updatedAt"]},"Customer":{"type":"object","properties":{"id":{"type":"number"},"galaxPayId":{"type":"number"},"name":{"type":"string"},"email":{"type":"string"},"phone":{"type":"string"},"document":{"type":"string"},"personType":{"enum":["fisica","juridica"],"type":"string"},"zipCode":{"type":"string","nullable":true},"street":{"type":"string","nullable":true},"number":{"type":"string","nullable":true},"complement":{"type":"string","nullable":true},"neighborhood":{"type":"string","nullable":true},"city":{"type":"string","nullable":true},"state":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}}},"required":["id","galaxPayId","name","email","phone","document","personType","zipCode","street","number","complement","neighborhood","city","state","createdAt","updatedAt","transactions"]},"SubscriptionPrice":{"type":"object","properties":{"id":{"type":"object"},"productId":{"type":"number"},"product":{"$ref":"#/components/schemas/Product"},"gatewayProvider":{"type":"string"},"gatewayPlanId":{"type":"string"},"name":{"type":"string"},"pricingModel":{"type":"string"},"unitAmount":{"type":"number"},"currency":{"type":"string"},"billingInterval":{"type":"string"},"billingIntervalCount":{"type":"number"},"trialPeriodDays":{"type":"number"},"description":{"type":"string","nullable":true},"metadata":{"type":"object","nullable":true},"isActive":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"subscriptions":{"type":"array","items":{"$ref":"#/components/schemas/Subscription"}}},"required":["id","productId","product","gatewayProvider","gatewayPlanId","name","pricingModel","unitAmount","currency","billingInterval","billingIntervalCount","trialPeriodDays","description","metadata","isActive","createdAt","updatedAt","subscriptions"]},"PaymentMethod":{"type":"object","properties":{"id":{"type":"number"},"customerId":{"type":"number"},"customer":{"$ref":"#/components/schemas/Customer"},"gatewayProvider":{"type":"string"},"gatewayCardId":{"type":"string"},"cardBrand":{"type":"string"},"cardLast4":{"type":"string"},"cardExpMonth":{"type":"number"},"cardExpYear":{"type":"number"},"cardholderName":{"type":"string"},"isDefault":{"type":"boolean"},"isBackup":{"type":"boolean"},"status":{"type":"string"},"lastUsedAt":{"format":"date-time","type":"string","nullable":true},"failedAttempts":{"type":"number"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"subscriptions":{"type":"array","items":{"$ref":"#/components/schemas/Subscription"}}},"required":["id","customerId","customer","gatewayProvider","gatewayCardId","cardBrand","cardLast4","cardExpMonth","cardExpYear","cardholderName","isDefault","isBackup","status","lastUsedAt","failedAttempts","createdAt","updatedAt","subscriptions"]},"SubscriptionEvent":{"type":"object","properties":{"id":{"type":"number"},"subscriptionId":{"type":"number"},"subscription":{"$ref":"#/components/schemas/Subscription"},"eventType":{"type":"string"},"gatewayProvider":{"type":"string"},"gatewayEventId":{"type":"string","nullable":true},"eventData":{"type":"object","nullable":true},"createdAt":{"format":"date-time","type":"string"}},"required":["id","subscriptionId","subscription","eventType","gatewayProvider","gatewayEventId","eventData","createdAt"]},"Subscription":{"type":"object","properties":{"id":{"type":"number"},"uuid":{"type":"string"},"gatewayProvider":{"type":"string"},"gatewaySubscriptionId":{"type":"string"},"customerId":{"type":"number"},"customer":{"$ref":"#/components/schemas/Customer"},"subscriptionPriceId":{"type":"object"},"subscriptionPrice":{"$ref":"#/components/schemas/SubscriptionPrice"},"paymentMethodId":{"type":"number","nullable":true},"paymentMethod":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/PaymentMethod"}]},"sellerId":{"type":"number"},"seller":{"$ref":"#/components/schemas/Seller"},"status":{"type":"string"},"currentPeriodStart":{"format":"date-time","type":"string","nullable":true},"currentPeriodEnd":{"format":"date-time","type":"string","nullable":true},"trialStart":{"format":"date-time","type":"string","nullable":true},"trialEnd":{"format":"date-time","type":"string","nullable":true},"cancelledAt":{"format":"date-time","type":"string","nullable":true},"endedAt":{"format":"date-time","type":"string","nullable":true},"amount":{"type":"number"},"currency":{"type":"string"},"cancelAtPeriodEnd":{"type":"boolean"},"cancellationReason":{"type":"string","nullable":true},"metadata":{"type":"object","nullable":true},"retryCount":{"type":"number"},"nextRetryDate":{"format":"date-time","type":"string","nullable":true},"lastBillingError":{"type":"string","nullable":true},"missedWebhookCount":{"type":"number"},"pausedAt":{"format":"date-time","type":"string","nullable":true},"pauseResumeAt":{"format":"date-time","type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"events":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionEvent"}},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}}},"required":["id","uuid","gatewayProvider","gatewaySubscriptionId","customerId","customer","subscriptionPriceId","subscriptionPrice","paymentMethodId","paymentMethod","sellerId","seller","status","currentPeriodStart","currentPeriodEnd","trialStart","trialEnd","cancelledAt","endedAt","amount","currency","cancelAtPeriodEnd","cancellationReason","metadata","retryCount","nextRetryDate","lastBillingError","missedWebhookCount","pausedAt","pauseResumeAt","createdAt","updatedAt","events","transactions"]},"Role":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"isSystemRole":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","name","description","isSystemRole","createdAt","updatedAt"]},"TeamInvitation":{"type":"object","properties":{"id":{"type":"number"},"sellerId":{"type":"number"},"seller":{"$ref":"#/components/schemas/Seller"},"roleId":{"type":"number"},"role":{"$ref":"#/components/schemas/Role"},"email":{"type":"string"},"token":{"type":"string"},"invitedBy":{"type":"number","nullable":true},"inviter":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/TeamMember"}]},"expiresAt":{"format":"date-time","type":"string"},"acceptedAt":{"format":"date-time","type":"string","nullable":true},"declinedAt":{"format":"date-time","type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","sellerId","seller","roleId","role","email","token","invitedBy","inviter","expiresAt","acceptedAt","declinedAt","createdAt","updatedAt"]},"TeamMember":{"type":"object","properties":{"id":{"type":"number"},"userId":{"type":"number"},"user":{"$ref":"#/components/schemas/User"},"sellerId":{"type":"number"},"seller":{"$ref":"#/components/schemas/Seller"},"roleId":{"type":"number"},"role":{"$ref":"#/components/schemas/Role"},"isOwner":{"type":"boolean"},"active":{"type":"boolean"},"invitationId":{"type":"number","nullable":true},"invitation":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/TeamInvitation"}]},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"lastAccessedAt":{"format":"date-time","type":"string","nullable":true}},"required":["id","userId","user","sellerId","seller","roleId","role","isOwner","active","invitationId","invitation","createdAt","updatedAt","lastAccessedAt"]},"UserSession":{"type":"object","properties":{"id":{"type":"number"},"userId":{"type":"number"},"user":{"$ref":"#/components/schemas/User"},"currentSellerId":{"type":"number","nullable":true},"currentSeller":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Seller"}]},"sessionToken":{"type":"string"},"ipAddress":{"type":"string","nullable":true},"userAgent":{"type":"string","nullable":true},"deviceName":{"type":"string","nullable":true},"location":{"type":"string","nullable":true},"isCurrent":{"type":"boolean"},"lastActivityAt":{"format":"date-time","type":"string"},"expiresAt":{"format":"date-time","type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","userId","user","currentSellerId","currentSeller","sessionToken","ipAddress","userAgent","deviceName","location","isCurrent","lastActivityAt","expiresAt","createdAt","updatedAt"]},"Mfa":{"type":"object","properties":{"id":{"type":"number"},"userId":{"type":"number"},"user":{"$ref":"#/components/schemas/User"},"code":{"type":"string"},"createdAt":{"format":"date-time","type":"string"}},"required":["id","userId","user","code","createdAt"]},"TwoFactorMethod":{"type":"object","properties":{"id":{"type":"number"},"userId":{"type":"number"},"user":{"$ref":"#/components/schemas/User"},"method":{"type":"string"},"totpSecret":{"type":"string","nullable":true},"phoneNumber":{"type":"string","nullable":true},"isPrimary":{"type":"boolean"},"verifiedAt":{"format":"date-time","type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"}},"required":["id","userId","user","method","totpSecret","phoneNumber","isPrimary","verifiedAt","createdAt"]},"BackupCode":{"type":"object","properties":{"id":{"type":"number"},"userId":{"type":"number"},"user":{"$ref":"#/components/schemas/User"},"codeHash":{"type":"string"},"usedAt":{"format":"date-time","type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"}},"required":["id","userId","user","codeHash","usedAt","createdAt"]},"User":{"type":"object","properties":{"id":{"type":"number"},"email":{"type":"string"},"password":{"type":"string"},"passwordAlgorithm":{"type":"object"},"name":{"type":"string"},"phone":{"type":"string","nullable":true},"avatarUrl":{"type":"string","nullable":true},"validatedEmail":{"type":"boolean"},"tokenRecoveryEmail":{"type":"string","nullable":true},"tokenRecoveryExpiresAt":{"format":"date-time","type":"string","nullable":true},"lastLoginAt":{"format":"date-time","type":"string","nullable":true},"twoFactorEnabled":{"type":"boolean"},"twoFactorPromptDismissed":{"type":"boolean"},"twoFactorEnabledAt":{"format":"date-time","type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"teamMembers":{"type":"array","items":{"$ref":"#/components/schemas/TeamMember"}},"sessions":{"type":"array","items":{"$ref":"#/components/schemas/UserSession"}},"mfaCodes":{"type":"array","items":{"$ref":"#/components/schemas/Mfa"}},"twoFactorMethods":{"type":"array","items":{"$ref":"#/components/schemas/TwoFactorMethod"}},"backupCodes":{"type":"array","items":{"$ref":"#/components/schemas/BackupCode"}}},"required":["id","email","password","passwordAlgorithm","name","phone","avatarUrl","validatedEmail","tokenRecoveryEmail","tokenRecoveryExpiresAt","lastLoginAt","twoFactorEnabled","twoFactorPromptDismissed","twoFactorEnabledAt","createdAt","updatedAt","teamMembers","sessions","mfaCodes","twoFactorMethods","backupCodes"]},"Transaction":{"type":"object","properties":{"id":{"type":"number"},"galaxPayId":{"type":"number"},"product":{"$ref":"#/components/schemas/Product"},"customer":{"$ref":"#/components/schemas/Customer"},"affiliation":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Affiliations"}]},"value":{"type":"number"},"valueSeller":{"type":"number"},"valueAffiliate":{"type":"number","nullable":true},"date":{"format":"date-time","type":"string"},"paymentMethod":{"type":"string"},"installments":{"type":"number"},"fator":{"type":"number","nullable":true},"code":{"type":"string","nullable":true},"deadline":{"format":"date-time","type":"string"},"status":{"type":"string"},"subscriptionId":{"type":"number","nullable":true},"subscription":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Subscription"}]},"isRecurring":{"type":"boolean"},"billingReason":{"type":"string","nullable":true},"billingCycle":{"type":"number","nullable":true},"refundedAt":{"format":"date-time","type":"string","nullable":true},"refundAmount":{"type":"number","nullable":true},"refundReason":{"type":"string","nullable":true},"refundedByUserId":{"type":"number","nullable":true},"refundedByUser":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/User"}]},"feePercent":{"type":"number","nullable":true},"feeFixed":{"type":"number","nullable":true},"feeTotalAmount":{"type":"number","nullable":true},"netAmount":{"type":"number","nullable":true},"valueCoProducers":{"type":"number","nullable":true}},"required":["id","galaxPayId","product","customer","affiliation","value","valueSeller","valueAffiliate","date","paymentMethod","installments","fator","code","deadline","status","subscriptionId","subscription","isRecurring","billingReason","billingCycle","refundedAt","refundAmount","refundReason","refundedByUserId","refundedByUser","feePercent","feeFixed","feeTotalAmount","netAmount","valueCoProducers"]},"Affiliations":{"type":"object","properties":{"id":{"type":"number"},"affiliate":{"$ref":"#/components/schemas/Seller"},"product":{"$ref":"#/components/schemas/Product"},"affiliateId":{"type":"number"},"productId":{"type":"number"},"commission":{"type":"number","description":"Commission percentage for this affiliation (can override product default).\nStored as a percentage value (e.g., 10 = 10%)."},"active":{"type":"boolean","description":"Whether the affiliation is currently active.\nSet to false when canceled via cancelAffiliation()."},"approved":{"type":"boolean","description":"Whether the product owner (seller) has approved this affiliation.\nSet to true via approveAffiliation() after reviewing the affiliate request."},"accepted":{"type":"boolean","description":"Whether the affiliate has accepted the affiliation terms.\nSet during affiliation creation based on invite acceptance.\nNote: Different from AffiliationInvite.accept which tracks invite acceptance."},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}},"link":{"type":"string"},"canceledAt":{"format":"date-time","type":"string","description":"Timestamp when the affiliation was canceled.\nNull if affiliation is still active.\nSet by cancelAffiliation() along with active=false."}},"required":["id","affiliate","product","affiliateId","productId","commission","active","approved","accepted","createdAt","updatedAt","transactions","link","canceledAt"]},"Withdrawals":{"type":"object","properties":{"id":{"type":"number"},"seller":{"$ref":"#/components/schemas/Seller"},"sellerId":{"type":"number"},"value":{"type":"number"},"fee":{"type":"number"},"netValue":{"type":"number"},"status":{"enum":["aguardando","aprovado","recusado","pago"],"type":"string"},"paymentMethod":{"type":"string"},"bankAccountId":{"type":"number"},"bankAccount":{"$ref":"#/components/schemas/BankAccount"},"requestedAt":{"format":"date-time","type":"string"},"reviewedAt":{"format":"date-time","type":"string"},"reviewedBy":{"type":"number"},"reviewer":{"$ref":"#/components/schemas/User"},"rejectionReason":{"type":"string"},"paidAt":{"format":"date-time","type":"string"},"paymentReference":{"type":"string"},"ledgerGroupId":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","seller","sellerId","value","fee","netValue","status","paymentMethod","bankAccountId","bankAccount","requestedAt","reviewedAt","reviewedBy","reviewer","rejectionReason","paidAt","paymentReference","ledgerGroupId","createdAt","updatedAt"]},"SellerDomain":{"type":"object","properties":{"id":{"type":"number"},"sellerId":{"type":"number"},"seller":{"$ref":"#/components/schemas/Seller"},"domain":{"type":"string"},"subdomain":{"type":"string"},"verificationStatus":{"type":"object"},"verifiedAt":{"format":"date-time","type":"string","nullable":true},"lastCheckAt":{"format":"date-time","type":"string","nullable":true},"failureCount":{"type":"number"},"isActive":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"pixels":{"type":"array","items":{"$ref":"#/components/schemas/FacebookPixel"}}},"required":["id","sellerId","seller","domain","subdomain","verificationStatus","verifiedAt","lastCheckAt","failureCount","isActive","createdAt","updatedAt","pixels"]},"FacebookPixel":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"seller":{"$ref":"#/components/schemas/Seller"},"product":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Product"}]},"pixelId":{"type":"string"},"accessToken":{"type":"string","nullable":true},"isActive":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"domainId":{"type":"number","nullable":true},"domain":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/SellerDomain"}]}},"required":["id","name","seller","product","pixelId","accessToken","isActive","createdAt","updatedAt","domainId","domain"]},"PortalConfiguration":{"type":"object","properties":{"id":{"type":"number"},"sellerId":{"type":"number"},"seller":{"$ref":"#/components/schemas/Seller"},"businessName":{"type":"string","nullable":true},"logoUrl":{"type":"string","nullable":true},"primaryColor":{"type":"string"},"allowCancelSubscription":{"type":"boolean"},"allowUpdatePaymentMethod":{"type":"boolean"},"allowUpdateBillingInfo":{"type":"boolean"},"allowViewInvoices":{"type":"boolean"},"allowApplyCoupons":{"type":"boolean"},"requireCancelReason":{"type":"boolean"},"cancelAtPeriodEndOnly":{"type":"boolean"},"sendCancellationEmail":{"type":"boolean"},"sendPaymentMethodUpdatedEmail":{"type":"boolean"},"customWelcomeText":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","sellerId","seller","businessName","logoUrl","primaryColor","allowCancelSubscription","allowUpdatePaymentMethod","allowUpdateBillingInfo","allowViewInvoices","allowApplyCoupons","requireCancelReason","cancelAtPeriodEndOnly","sendCancellationEmail","sendPaymentMethodUpdatedEmail","customWelcomeText","createdAt","updatedAt"]},"Seller":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"document":{"type":"string"},"phone":{"type":"string"},"validatedEmail":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"anonymized":{"type":"boolean"},"logoUrl":{"type":"string","nullable":true},"ownerUserId":{"type":"number","nullable":true},"settlementDays":{"type":"number"},"publicId":{"type":"string"},"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}},"bankaccount":{"$ref":"#/components/schemas/BankAccount"},"affiliations":{"type":"array","items":{"$ref":"#/components/schemas/Affiliations"}},"withdrawal":{"type":"array","items":{"$ref":"#/components/schemas/Withdrawals"}},"facebookPixels":{"type":"array","items":{"$ref":"#/components/schemas/FacebookPixel"}},"portalConfiguration":{"$ref":"#/components/schemas/PortalConfiguration"}},"required":["id","name","document","phone","validatedEmail","createdAt","updatedAt","anonymized","logoUrl","ownerUserId","settlementDays","publicId","products","bankaccount","affiliations","withdrawal","facebookPixels","portalConfiguration"]},"Tag":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"products":{"type":"array","items":{"$ref":"#/components/schemas/Product"}}},"required":["id","name","products"]},"CoProducer":{"type":"object","properties":{"id":{"type":"number"},"productId":{"type":"number"},"product":{"$ref":"#/components/schemas/Product"},"sellerId":{"type":"number"},"seller":{"$ref":"#/components/schemas/Seller"},"shareType":{"type":"object"},"shareValue":{"type":"number"},"status":{"type":"object"},"invitedBySellerId":{"type":"number"},"invitedBySeller":{"$ref":"#/components/schemas/Seller"},"acceptedAt":{"format":"date-time","type":"string","nullable":true},"removedAt":{"format":"date-time","type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","productId","product","sellerId","seller","shareType","shareValue","status","invitedBySellerId","invitedBySeller","acceptedAt","removedAt","createdAt","updatedAt"]},"Product":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"description":{"type":"string"},"image":{"type":"string"},"value":{"type":"number"},"boleto":{"type":"boolean"},"creditCard":{"type":"boolean"},"pix":{"type":"boolean"},"installments":{"type":"number"},"affiliation":{"type":"boolean"},"affiliationOrderAccept":{"type":"boolean"},"leadBond":{"type":"boolean"},"leadBondDirectVisit":{"type":"boolean"},"displayOnAll":{"type":"boolean"},"commissionDefault":{"type":"number"},"seller":{"$ref":"#/components/schemas/Seller"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/Transaction"}},"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"pixelFB":{"type":"string"},"uuid":{"type":"string"},"isActive":{"type":"boolean"},"affiliations":{"type":"array","items":{"$ref":"#/components/schemas/Affiliations"}},"isSubscription":{"type":"boolean"},"subscriptionType":{"type":"string","nullable":true},"unitLabel":{"type":"string","nullable":true},"subscriptionPrices":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionPrice"}},"facebookPixels":{"type":"array","items":{"$ref":"#/components/schemas/FacebookPixel"}},"returnUrl":{"type":"string","nullable":true},"returnUrlButtonText":{"type":"string","nullable":true},"affiliateRecurringMode":{"type":"string"},"affiliateAutoApprove":{"type":"boolean"},"coProducers":{"type":"array","items":{"$ref":"#/components/schemas/CoProducer"}}},"required":["id","name","description","image","value","boleto","creditCard","pix","installments","affiliation","affiliationOrderAccept","leadBond","leadBondDirectVisit","displayOnAll","commissionDefault","seller","transactions","createdAt","updatedAt","pixelFB","uuid","isActive","affiliations","isSubscription","subscriptionType","unitLabel","subscriptionPrices","facebookPixels","returnUrl","returnUrlButtonText","affiliateRecurringMode","affiliateAutoApprove","coProducers"]},"ErrorResponseDto":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"path":{"type":"string"},"timestamp":{"type":"string"}},"required":["statusCode","message","path","timestamp"]},"AbecsReasonDeniedDto":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}},"BoletoDto":{"type":"object","properties":{"pdf":{"type":"string"},"bankLine":{"type":"string"},"bankNumber":{"type":"string"},"barCode":{"type":"string"},"bankEmissor":{"type":"string"},"bankAgency":{"type":"string"},"bankAccount":{"type":"string"}}},"PixDto":{"type":"object","properties":{"qrCode":{"type":"string"},"reference":{"type":"string"},"image":{"type":"string"},"page":{"type":"string"},"endToEndId":{"type":"string"}}},"CardDto":{"type":"object","properties":{"myId":{"type":"string"},"galaxPayId":{"type":"number"},"number":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"expiresAt":{"type":"string"},"status":{"type":"string"},"isBackup":{"type":"boolean"},"Brand":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"maxInstallment":{"type":"number","nullable":true},"operatorIds":{"type":"string","nullable":true}},"required":[]}}},"CreditCardTransactionDto":{"type":"object","properties":{"Card":{"$ref":"#/components/schemas/CardDto"}}},"TransactionDto":{"type":"object","properties":{"myId":{"type":"string"},"galaxPayId":{"type":"number"},"chargeMyId":{"type":"string"},"chargeGalaxPayId":{"type":"number"},"subscriptionGalaxPayId":{"type":"number"},"subscriptionMyId":{"type":"string"},"value":{"type":"number"},"payday":{"type":"string"},"payedOutsideGalaxPay":{"type":"boolean"},"fee":{"type":"number","description":"Actual gateway fee charged by GalaxPay, in centavos (integer). PIX only."},"additionalInfo":{"type":"string"},"installment":{"type":"number"},"paydayDate":{"type":"string"},"AbecsReasonDenied":{"$ref":"#/components/schemas/AbecsReasonDeniedDto"},"datetimeLastSentToOperator":{"type":"string"},"status":{"type":"string"},"reasonDenied":{"type":"string"},"tid":{"type":"string"},"authorizationCode":{"type":"string"},"createdAt":{"type":"string"},"statusDescription":{"type":"string"},"statusDate":{"type":"string"},"cardOperatorId":{"type":"string"},"ConciliationOccurrences":{"type":"array","items":{"type":"object"}},"Boleto":{"$ref":"#/components/schemas/BoletoDto"},"Pix":{"$ref":"#/components/schemas/PixDto"},"CreditCard":{"$ref":"#/components/schemas/CreditCardTransactionDto"}},"required":["status"]},"PaymentMethodCreditCardDto":{"type":"object","properties":{"Card":{"$ref":"#/components/schemas/CardDto"},"cardOperatorId":{"type":"string"},"preAuthorize":{"type":"boolean"},"qtdInstallments":{"type":"number"}}},"PaymentMethodBoletoDto":{"type":"object","properties":{"fine":{"type":"number"},"interest":{"type":"number"},"instructions":{"type":"string"}}},"DeadlineDto":{"type":"object","properties":{"type":{"type":"string"},"value":{"type":"number"}}},"PaymentMethodPixDto":{"type":"object","properties":{"fine":{"type":"number"},"interest":{"type":"number"},"instructions":{"type":"string"},"Deadline":{"$ref":"#/components/schemas/DeadlineDto"}}},"ChargeDto":{"type":"object","properties":{"galaxPayId":{"type":"number"},"myId":{"type":"string"},"mainPaymentMethodId":{"type":"string"},"value":{"type":"number"},"additionalInfo":{"type":"string"},"status":{"type":"string"},"paymentLink":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"payedOutsideGalaxPay":{"type":"boolean"},"Customer":{"$ref":"#/components/schemas/CustomerDto"},"ExtraFields":{"type":"array","items":{"type":"object"}},"PaymentMethodCreditCard":{"$ref":"#/components/schemas/PaymentMethodCreditCardDto"},"PaymentMethodBoleto":{"$ref":"#/components/schemas/PaymentMethodBoletoDto"},"PaymentMethodPix":{"$ref":"#/components/schemas/PaymentMethodPixDto"}},"required":["galaxPayId"]},"SubscriptionDto":{"type":"object","properties":{"myId":{"type":"string"},"galaxPayId":{"type":"number"},"planMyId":{"type":"string"},"planGalaxPayId":{"type":"number"},"value":{"type":"number"},"quantity":{"type":"number"},"periodicity":{"type":"string"},"firstPayDayDate":{"type":"string"},"paymentLink":{"type":"string"},"additionalInfo":{"type":"string"},"status":{"type":"string"},"mainPaymentMethodId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"Customer":{"$ref":"#/components/schemas/CustomerDto"},"ExtraFields":{"type":"array","items":{"type":"object"}},"PaymentMethodCreditCard":{"$ref":"#/components/schemas/PaymentMethodCreditCardDto"}}},"WebHookRequest":{"type":"object","properties":{"event":{"type":"string"},"webhookId":{"type":"number"},"confirmHash":{"type":"string"},"Transaction":{"$ref":"#/components/schemas/TransactionDto"},"Charge":{"$ref":"#/components/schemas/ChargeDto"},"Subscription":{"$ref":"#/components/schemas/SubscriptionDto"}},"required":["event","webhookId","confirmHash","Transaction"]},"RefundTransactionRequest":{"type":"object","properties":{"amount":{"type":"number","minimum":0.01,"description":"Refund amount in BRL (optional, full refund if not provided)","example":50},"reason":{"type":"string","maxLength":500,"description":"Reason for the refund","example":"Customer requested cancellation"}}},"PreferenceItemDto":{"type":"object","properties":{"eventType":{"type":"string","enum":["sale_pix_created","sale_boleto_created","sale_approved","sale_renewal","sale_renewal_failed"],"description":"Event type identifier","example":"sale_approved"},"enabled":{"type":"boolean","description":"Whether this notification type is enabled"}},"required":["eventType","enabled"]},"UpdateGlobalPreferencesRequest":{"type":"object","properties":{"preferences":{"type":"array","items":{"$ref":"#/components/schemas/PreferenceItemDto"}}},"required":["preferences"]},"SetMasterEnabledRequest":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Whether all notifications are enabled"}},"required":["enabled"]},"OverrideItemDto":{"type":"object","properties":{"eventType":{"type":"string","enum":["sale_pix_created","sale_boleto_created","sale_approved","sale_renewal","sale_renewal_failed"],"description":"Event type identifier","example":"sale_approved"},"enabled":{"type":"boolean","description":"Whether this notification type is enabled for this product"}},"required":["eventType","enabled"]},"UpdateProductOverridesRequest":{"type":"object","properties":{"overrides":{"type":"array","items":{"$ref":"#/components/schemas/OverrideItemDto"}}},"required":["overrides"]},"GetReportSynthetic":{"type":"object","properties":{}},"ProductResponse":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"value":{"type":"number"},"description":{"type":"string"},"image":{"type":"string"},"sellerId":{"type":"number"},"boleto":{"type":"boolean"},"creditCard":{"type":"boolean"},"pix":{"type":"boolean"},"installments":{"type":"array","items":{"type":"object"}},"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}},"pixelFB":{"type":"string"},"hasFacebookPixel":{"type":"boolean"},"uuid":{"type":"string"},"comission":{"type":"string"},"valueWithComission":{"type":"number"},"sellerName":{"type":"string"},"affiliateLink":{"type":"string"},"affiliateId":{"type":"number"},"affiliationId":{"type":"number"},"affiliationOrderAccept":{"type":"boolean"},"leadBond":{"type":"boolean"},"displayOnAll":{"type":"boolean"},"isSubscription":{"type":"boolean"},"subscriptionType":{"type":"string","nullable":true},"unitLabel":{"type":"string","nullable":true},"returnUrl":{"type":"string","nullable":true},"returnUrlButtonText":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"portalConfig":{"type":"object","properties":{"primaryColor":{"type":"string"},"logoUrl":{"type":"string","nullable":true},"businessName":{"type":"string","nullable":true}},"required":["primaryColor","logoUrl","businessName"]},"pixelIds":{"type":"array","items":{"type":"string"}},"eventSettings":{"type":"object","properties":{"pageViewEnabled":{"type":"boolean"},"initiateCheckoutEnabled":{"type":"boolean"},"addPaymentInfoEnabled":{"type":"boolean"},"leadEnabled":{"type":"boolean"},"purchaseEnabled":{"type":"boolean"}},"required":["pageViewEnabled","initiateCheckoutEnabled","addPaymentInfoEnabled","leadEnabled","purchaseEnabled"]}},"required":["id","name","value","description","image","sellerId","boleto","creditCard","pix","installments","uuid","createdAt","updatedAt"]},"CreateProductRequest":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"number","minimum":0},"description":{"type":"string"},"image":{"type":"string"},"boleto":{"type":"boolean"},"creditCard":{"type":"boolean"},"pix":{"type":"boolean"},"installments":{"type":"number","minimum":1},"tags":{"type":"array","items":{"type":"string"}},"pixelFB":{"type":"string"},"affiliationOrderAccept":{"type":"boolean"},"leadBond":{"type":"boolean"},"displayOnAll":{"type":"boolean"},"comission":{"type":"string"},"isSubscription":{"type":"boolean"},"subscriptionType":{"type":"string"},"unitLabel":{"type":"string"},"statementDescriptor":{"type":"string"},"returnUrl":{"type":"string"},"returnUrlButtonText":{"type":"string"}},"required":["name","image","tags","pixelFB"]},"CreateSellerRequest":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"password":{"type":"string"},"document":{"type":"string"},"phone":{"type":"string"},"isOwner":{"type":"boolean"}},"required":["name","email","password","document","phone"]},"SellerResponse":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"phone":{"type":"string"}},"required":["id","name","phone"]},"AddSellerToUserRequest":{"type":"object","properties":{"name":{"type":"string","description":"Nome da organização"},"document":{"type":"string","description":"Documento (CNPJ/CPF)"},"phone":{"type":"string","description":"Telefone"},"logoUrl":{"type":"string","description":"URL do logo (opcional)"}},"required":["name","document","phone"]},"BankAccountReq":{"type":"object","properties":{"bankName":{"type":"string"},"agency":{"type":"string"},"account":{"type":"string"},"bankCode":{"type":"string"}},"required":["bankName","agency","account","bankCode"]},"MarketingRegister":{"type":"object","properties":{"email":{"type":"string"}},"required":["email"]},"SendInvitedAffiliationRequest":{"type":"object","properties":{"affiliateEmail":{"type":"string","format":"email"},"productId":{"type":"string"}},"required":["affiliateEmail","productId"]},"Function":{"type":"object","properties":{}},"AffiliationInvite":{"type":"object","properties":{"id":{"type":"number"},"email":{"type":"string"},"productId":{"type":"string"},"linkInvite":{"type":"string"},"accept":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","email","productId","linkInvite","accept","createdAt","updatedAt"]},"CreateAffiliationRequest":{"type":"object","properties":{"productId":{"type":"string","description":"UUID of the product"},"affiliateId":{"type":"number","description":"ID of the affiliate seller"},"comission":{"type":"number","minimum":1,"maximum":90,"description":"Commission percentage (1-90)"},"accepted":{"type":"boolean","description":"Whether the affiliation is accepted","default":false},"approved":{"type":"boolean","description":"Whether the affiliation is approved","default":false}},"required":["productId","affiliateId","comission"]},"AffiliationResponse":{"type":"object","properties":{"id":{"type":"number"},"affiliate":{"$ref":"#/components/schemas/Seller"},"product":{"$ref":"#/components/schemas/Product"},"comission":{"type":"number"},"active":{"type":"boolean"},"approved":{"type":"boolean"},"accepted":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"}},"required":["id","affiliate","product","comission","active","approved","accepted","createdAt"]},"CancelAffiliationRequest":{"type":"object","properties":{"affiliationId":{"type":"number","description":"ID of the affiliation to cancel"}},"required":["affiliationId"]},"UpdateAffiliationRequest":{"type":"object","properties":{"commission":{"type":"number","minimum":1,"maximum":90,"description":"New commission percentage (1-90)"}},"required":["commission"]},"BatchUpdateAffiliationsRequest":{"type":"object","properties":{"affiliationIds":{"minItems":1,"description":"Array of affiliation IDs to update","example":[1,2,3],"type":"array","items":{"type":"number"}},"commission":{"type":"number","minimum":1,"maximum":90,"description":"New commission percentage for all affiliations (1-90)"}},"required":["affiliationIds"]},"BatchUpdateAffiliationsResponse":{"type":"object","properties":{"updated":{"type":"number","description":"Number of affiliations successfully updated"},"failed":{"description":"Array of affiliation IDs that failed to update","type":"array","items":{"type":"number"}}},"required":["updated","failed"]},"ProductInfoResponse":{"type":"object","properties":{"id":{"type":"number","description":"ID do produto","example":123},"name":{"type":"string","description":"Nome do produto","example":"Curso de Marketing Digital"},"value":{"type":"number","description":"Valor do produto em BRL","example":197},"commission":{"type":"number","description":"Percentual de comissão padrão","example":30},"requiresApproval":{"type":"boolean","description":"Se requer aprovação manual do produtor","example":false},"sellerName":{"type":"string","description":"Nome do vendedor/produtor","example":"João Silva"}},"required":["id","name","value","commission","requiresApproval","sellerName"]},"AffiliateSelfServiceJoinRequest":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Email do interessado em se afiliar","example":"affiliate@example.com"},"productUuid":{"type":"string","format":"uuid","description":"UUID do produto","example":"550e8400-e29b-41d4-a716-446655440000"}},"required":["email","productUuid"]},"SelfServiceJoinResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"Se a operação foi bem sucedida","example":true},"requiresRegistration":{"type":"boolean","description":"Se o usuário precisa criar uma conta primeiro","example":false},"affiliationId":{"type":"number","description":"ID da afiliação criada (se aplicável)","example":456},"status":{"type":"string","description":"Status da afiliação: approved ou pending","example":"approved","enum":["approved","pending"]},"message":{"type":"string","description":"Mensagem para o usuário","example":"Afiliação criada com sucesso!"}},"required":["success","requiresRegistration","message"]},"CreateApiKeyRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"description":"Nome descritivo para a chave","example":"Integração E-commerce"},"environment":{"type":"string","description":"Ambiente da chave","enum":["test","live"],"example":"test"}},"required":["name","environment"]},"ApiKeyCreatedResponse":{"type":"object","properties":{"id":{"type":"string","description":"ID único da chave","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","description":"Nome descritivo da chave","example":"Integração E-commerce"},"last4":{"type":"string","description":"Últimos 4 caracteres da chave","example":"a1b2"},"environment":{"type":"string","description":"Ambiente da chave","enum":["test","live"],"example":"test"},"is_active":{"type":"boolean","description":"Status da chave","example":true},"last_used_at":{"format":"date-time","type":"string","description":"Data do último uso","example":"2024-01-06T10:30:00Z"},"created_at":{"format":"date-time","type":"string","description":"Data de criação","example":"2024-01-06T10:00:00Z"},"key":{"type":"string","description":"Chave completa (mostrada apenas na criação)","example":"sk_test_1234567890abcdefghijklmnopqrstuvwxyz"},"warning":{"type":"string","description":"Mensagem de aviso","example":"Guarde esta chave com segurança. Você não poderá vê-la novamente."}},"required":["id","name","last4","environment","is_active","created_at","key","warning"]},"ApiKeyResponse":{"type":"object","properties":{"id":{"type":"string","description":"ID único da chave","example":"123e4567-e89b-12d3-a456-426614174000"},"name":{"type":"string","description":"Nome descritivo da chave","example":"Integração E-commerce"},"last4":{"type":"string","description":"Últimos 4 caracteres da chave","example":"a1b2"},"environment":{"type":"string","description":"Ambiente da chave","enum":["test","live"],"example":"test"},"is_active":{"type":"boolean","description":"Status da chave","example":true},"last_used_at":{"format":"date-time","type":"string","description":"Data do último uso","example":"2024-01-06T10:30:00Z"},"created_at":{"format":"date-time","type":"string","description":"Data de criação","example":"2024-01-06T10:00:00Z"}},"required":["id","name","last4","environment","is_active","created_at"]},"AccountDeletionRequest":{"type":"object","properties":{"name":{"type":"string","maxLength":200,"description":"Nome completo do solicitante","example":"João Silva"},"email":{"type":"string","maxLength":254,"format":"email","description":"E-mail do solicitante","example":"joao@example.com"},"cpf":{"type":"string","maxLength":14,"description":"CPF do solicitante","example":"123.456.789-00"},"reason":{"enum":["NAO_USO_MAIS","ENCONTREI_ALTERNATIVA","PREOCUPACAO_PRIVACIDADE","EXPERIENCIA_INSATISFATORIA","OUTRO"],"type":"string","description":"Motivo da exclusão","example":"NAO_USO_MAIS"},"details":{"type":"string","maxLength":1000,"description":"Detalhes adicionais sobre o motivo"}},"required":["name","email","reason"]},"UpdateProfileRequest":{"type":"object","properties":{"name":{"type":"string","description":"User full name","example":"João Silva"},"phone":{"type":"string","description":"User phone number","example":"11999999999"}}},"ChangePasswordRequest":{"type":"object","properties":{"currentPassword":{"type":"string","description":"Current password","example":"OldPassword123!"},"newPassword":{"type":"string","minLength":8,"description":"New password (minimum 8 characters)","example":"NewPassword123!"}},"required":["currentPassword","newPassword"]},"EnableTotpRequest":{"type":"object","properties":{"secret":{"type":"string","description":"TOTP secret generated during setup","example":"JBSWY3DPEHPK3PXP"},"code":{"type":"string","minLength":6,"maxLength":6,"description":"6-digit verification code from authenticator app","example":"123456"}},"required":["secret","code"]},"AuthRequest":{"type":"object","properties":{"email":{"type":"string","format":"email"},"password":{"type":"string","minLength":6}},"required":["email","password"]},"VerificationRequest":{"type":"object","properties":{"twoFaCode":{"type":"string","pattern":"/^(\\d{6}|[A-Za-z0-9]{8})$/"}},"required":["twoFaCode"]},"CustomerDataDto":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"description":"Customer name","example":"João Silva"},"email":{"type":"string","maxLength":255,"format":"email","description":"Customer email","example":"joao@email.com"},"document":{"type":"string","maxLength":14,"description":"Customer document (CPF/CNPJ)","example":"12345678900"},"phone":{"type":"string","maxLength":11,"description":"Customer phone","example":"11999999999"},"zip_code":{"type":"string","maxLength":8,"description":"Customer ZIP code","example":"01310100"},"street":{"type":"string","maxLength":255,"description":"Customer street","example":"Av. Paulista"},"number":{"type":"string","maxLength":20,"description":"Customer address number","example":"1000"},"complement":{"type":"string","maxLength":255,"description":"Customer address complement","example":"Apt 123"},"neighborhood":{"type":"string","maxLength":100,"description":"Customer neighborhood","example":"Bela Vista"},"city":{"type":"string","maxLength":100,"description":"Customer city","example":"São Paulo"},"state":{"type":"string","maxLength":2,"description":"Customer state (2 letters)","example":"SP"}}},"CreateCheckoutSessionDto":{"type":"object","properties":{"product_id":{"type":"string","format":"uuid","description":"Product UUID","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"price_id":{"type":"string","description":"Subscription price ID","example":"price_xxx"},"customer":{"description":"Customer data for pre-filling checkout","allOf":[{"$ref":"#/components/schemas/CustomerDataDto"}]},"payment_methods":{"type":"string","enum":["pix","creditCard","boleto"],"description":"Allowed payment methods (restricts to these methods)","example":["pix","creditCard"]},"metadata":{"type":"object","description":"Metadata key-value pairs (max 50 keys, 500 chars per value)","example":{"order_id":"12345","campaign":"launch"}},"success_url":{"type":"string","maxLength":500,"description":"URL to redirect after successful payment","example":"https://example.com/success"},"cancel_url":{"type":"string","maxLength":500,"description":"URL to redirect if customer cancels","example":"https://example.com/cancel"},"client_reference_id":{"type":"string","maxLength":200,"description":"Client reference ID for correlation","example":"order_abc123"},"affiliate_id":{"type":"number","description":"Affiliate ID for attribution","example":456},"expires_at":{"type":"string","description":"Session expiration time (ISO 8601)","example":"2025-01-20T12:00:00Z"}},"required":["product_id"]},"CheckoutSessionResponseDto":{"type":"object","properties":{"id":{"type":"string","description":"Session ID","example":"cs_ABC123xyz"},"status":{"type":"string","description":"Session status","enum":["open","complete","expired"]},"url":{"type":"string","description":"Checkout URL","example":"https://pay.garu.com.br/pay/session/abc123..."},"product_id":{"type":"string","description":"Product UUID","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"price_id":{"type":"string","nullable":true,"description":"Subscription price ID"},"customer_email":{"type":"string","nullable":true,"description":"Customer email"},"customer_name":{"type":"string","nullable":true,"description":"Customer name"},"metadata":{"type":"object","description":"Metadata key-value pairs"},"success_url":{"type":"string","nullable":true,"description":"Success redirect URL"},"cancel_url":{"type":"string","nullable":true,"description":"Cancel redirect URL"},"client_reference_id":{"type":"string","nullable":true,"description":"Client reference ID"},"affiliate_id":{"type":"number","nullable":true,"description":"Affiliate ID"},"transaction_id":{"type":"number","nullable":true,"description":"Transaction ID (when completed)"},"expires_at":{"type":"string","description":"Session expiration time (ISO 8601)"},"completed_at":{"type":"string","nullable":true,"description":"Completion time (ISO 8601)"},"created_at":{"type":"string","description":"Session creation time (ISO 8601)"}},"required":["id","status","url","product_id","expires_at","created_at"]},"CheckoutSessionListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CheckoutSessionResponseDto"}},"count":{"type":"number","description":"Number of items in current page"},"total_count":{"type":"number","description":"Total number of items"},"total_pages":{"type":"number","description":"Total number of pages"}},"required":["data","count","total_count","total_pages"]},"CreateCoProducerRequest":{"type":"object","properties":{"productId":{"type":"number","description":"ID of the product"},"sellerPublicId":{"type":"string","minLength":12,"maxLength":12,"description":"Public ID of the co-producer seller (12-char NanoID)"},"shareType":{"type":"string","enum":["percent","fixed"],"description":"Share type: percent or fixed"},"shareValue":{"type":"number","minimum":0.01,"description":"Share value (percentage or fixed amount)"}},"required":["productId","sellerPublicId","shareType","shareValue"]},"UpdateCoProducerRequest":{"type":"object","properties":{"shareType":{"type":"string","enum":["percent","fixed"],"description":"Share type: percent or fixed"},"shareValue":{"type":"number","minimum":0.01,"description":"Share value (percentage or fixed amount)"}},"required":["shareType","shareValue"]},"CreateCustomerRequest":{"type":"object","properties":{"name":{"type":"string","description":"Customer name"},"email":{"type":"string","format":"email","description":"Customer email"},"document":{"type":"string","pattern":"/^\\d{11}$|^\\d{14}$/","description":"CPF (11 digits) or CNPJ (14 digits)"},"phone":{"type":"string","pattern":"/^\\d{10,11}$/","description":"Phone number (10-11 digits)"},"personType":{"enum":["fisica","juridica"],"type":"string","description":"Person type: fisica or juridica"},"zipCode":{"type":"string","pattern":"/^\\d{8}$/","description":"ZIP code (8 digits)"},"street":{"type":"string","maxLength":255},"number":{"type":"string","maxLength":20},"complement":{"type":"string","maxLength":255},"neighborhood":{"type":"string","maxLength":255},"city":{"type":"string","maxLength":255},"state":{"type":"string","pattern":"/^[A-Z]{2}$/","description":"2-letter state code (e.g. SP)"}},"required":["name","email","document","phone","personType"]},"UpdateCustomerRequest":{"type":"object","properties":{"name":{"type":"string","description":"Customer name"},"email":{"type":"string","format":"email","description":"Customer email"},"phone":{"type":"string","pattern":"/^\\d{10,11}$/","description":"Phone number (10-11 digits)"},"document":{"type":"string","pattern":"/^\\d{11}$|^\\d{14}$/","description":"CPF (11 digits) or CNPJ (14 digits)"},"personType":{"enum":["fisica","juridica"],"type":"string"},"zipCode":{"type":"string","pattern":"/^\\d{8}$/","description":"ZIP code (8 digits)"},"street":{"type":"string","maxLength":255},"number":{"type":"string","maxLength":20},"complement":{"type":"string","maxLength":255},"neighborhood":{"type":"string","maxLength":255},"city":{"type":"string","maxLength":255},"state":{"type":"string","pattern":"/^[A-Z]{2}$/","description":"2-letter state code (e.g. SP)"}}},"WithdrawReq":{"type":"object","properties":{"value":{"type":"number","minimum":0.01,"description":"Withdrawal amount in BRL","example":100},"paymentMethod":{"type":"string","enum":["PIX","TED"],"description":"Payment method","default":"PIX"},"bankAccountId":{"type":"number","description":"Bank account ID to receive the withdrawal"}},"required":["value"]},"BankAccountResponse":{"type":"object","properties":{"bank":{"type":"string"},"agency":{"type":"string"},"account":{"type":"string"}},"required":["bank","agency","account"]},"BalanceFullResponse":{"type":"object","properties":{"balance":{"type":"number"},"penddingBalance":{"type":"number"},"bankAccount":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/BankAccountResponse"}]},"document":{"type":"string"}},"required":["balance","penddingBalance","bankAccount","document"]},"CreateScheduledReportRequest":{"type":"object","properties":{"reportType":{"type":"string","enum":["ledger","statements","transactions"],"description":"Type of report to generate"},"format":{"type":"string","enum":["csv","json"],"description":"Export format"},"frequency":{"type":"string","enum":["daily","weekly","monthly"],"description":"How often to generate the report"}},"required":["reportType","format","frequency"]},"UpdateScheduledReportRequest":{"type":"object","properties":{"reportType":{"type":"string","enum":["ledger","statements","transactions"],"description":"Type of report to generate"},"format":{"type":"string","enum":["csv","json"],"description":"Export format"},"frequency":{"type":"string","enum":["daily","weekly","monthly"],"description":"How often to generate the report"},"isActive":{"type":"boolean","description":"Whether the scheduled report is active"}}},"MetaFeaturesDto":{"type":"object","properties":{"subscriptions":{"type":"boolean","example":true},"checkout_sessions":{"type":"boolean","example":true},"idempotency_keys":{"type":"boolean","example":true},"test_mode":{"type":"boolean","example":true},"webhooks":{"type":"boolean","example":true}},"required":["subscriptions","checkout_sessions","idempotency_keys","test_mode","webhooks"]},"MetaResponse":{"type":"object","properties":{"name":{"type":"string","example":"Garu"},"version":{"type":"string","description":"Semantic version of the backend (from package.json).","example":"1.3.2"},"environment":{"type":"string","example":"production","enum":["production","staging","development"]},"api_version":{"type":"string","description":"Public API version surfaced by the SDKs and MCP server.","example":"v1"},"payment_methods":{"description":"Payment methods accepted by the API.","example":["pix","credit_card","boleto"],"type":"array","items":{"type":"string"}},"currencies":{"example":["BRL"],"type":"array","items":{"type":"string"}},"billing_intervals":{"description":"Supported recurring billing intervals for subscriptions.","example":["day","week","month","year"],"type":"array","items":{"type":"string"}},"webhook_events":{"description":"Full catalog of webhook event types that may be delivered to seller endpoints.","example":["transaction.payment.succeeded","subscription.created","checkout.session.completed"],"type":"array","items":{"type":"string"}},"features":{"$ref":"#/components/schemas/MetaFeaturesDto"},"docs_url":{"type":"string","example":"https://docs.garu.com.br"},"dashboard_url":{"type":"string","example":"https://garu.com.br/inicio"},"support_email":{"type":"string","example":"contato@garu.com.br"}},"required":["name","version","environment","api_version","payment_methods","currencies","billing_intervals","webhook_events","features","docs_url","dashboard_url","support_email"]},"SubscriptionAddressDto":{"type":"object","properties":{"zipCode":{"type":"string","description":"ZIP code","example":"30411330"},"street":{"type":"string","description":"Street name","example":"Rua platina"},"number":{"type":"string","description":"Street number","example":"1330"},"complement":{"type":"string","description":"Complement","example":"2º andar"},"neighborhood":{"type":"string","description":"Neighborhood","example":"Prado"},"city":{"type":"string","description":"City","example":"Belo Horizonte"},"state":{"type":"string","description":"State","example":"MG"}}},"SubscriptionCustomerDto":{"type":"object","properties":{"name":{"type":"string","description":"Customer name","example":"John Doe"},"document":{"type":"string","description":"Customer document (CPF/CNPJ)","example":"12345678900"},"emails":{"description":"Customer email","example":"john@example.com","type":"array","items":{"type":"string"}},"phones":{"description":"Customer phone","example":"5511999999999","type":"array","items":{"type":"string"}},"address":{"description":"Customer address","allOf":[{"$ref":"#/components/schemas/SubscriptionAddressDto"}]}},"required":["name","document","emails","phones"]},"SubscriptionCreditCardDto":{"type":"object","properties":{"number":{"type":"string","description":"Card number","example":"4111111111111111"},"holder":{"type":"string","description":"Card holder name","example":"JOHN DOE"},"expiresAt":{"type":"string","description":"Card expiry month","example":"12"},"cvv":{"type":"string","description":"Card CVV","example":"123"}},"required":["number","holder","expiresAt","cvv"]},"CreateSubscriptionRequest":{"type":"object","properties":{"subscriptionPriceId":{"type":"object","description":"Subscription price ID","example":"price_1Hv7j4EGexuTiOU5BlLNGGuL"},"customer":{"description":"Customer information","allOf":[{"$ref":"#/components/schemas/SubscriptionCustomerDto"}]},"creditCard":{"description":"Credit card information","allOf":[{"$ref":"#/components/schemas/SubscriptionCreditCardDto"}]}},"required":["subscriptionPriceId","customer","creditCard"]},"CreateSubscriptionPriceRequest":{"type":"object","properties":{"productId":{"type":"string","format":"uuid","description":"UUID do produto","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"name":{"type":"string","description":"Nome do plano","example":"Plano Mensal Premium"},"amount":{"type":"number","description":"Valor em BRL (ex: 49.90)","example":49.9},"billingInterval":{"type":"string","description":"Intervalo de cobrança","example":"monthly","enum":["daily","weekly","monthly","annually"]},"trialDays":{"type":"number","description":"Período de teste em dias","example":7,"default":0},"currency":{"type":"string","description":"Código da moeda","example":"BRL","default":"BRL"},"isActive":{"type":"boolean","description":"Se o preço está ativo","example":true,"default":true}},"required":["productId","name","amount","billingInterval"]},"UpdateSubscriptionPriceRequest":{"type":"object","properties":{"name":{"type":"string","description":"Plan name"},"description":{"type":"string","description":"Plan description"},"unitAmount":{"type":"number","minimum":0.01,"description":"Unit amount in BRL"},"currency":{"type":"string","description":"Currency code"},"billingInterval":{"type":"string","description":"Billing interval (daily, weekly, monthly, quarterly, annually)"},"billingIntervalCount":{"type":"number","minimum":1,"description":"Number of intervals between billings"},"trialPeriodDays":{"type":"number","minimum":0,"description":"Number of trial days"},"pricingModel":{"type":"string","description":"Pricing model"},"isActive":{"type":"boolean","description":"Whether price is active"},"metadata":{"type":"object","description":"Additional metadata"}}},"CreatePaymentMethodRequest":{"type":"object","properties":{"cardNumber":{"type":"string","description":"Card number","example":"4111111111111111"},"cardHolder":{"type":"string","description":"Card holder name","example":"JOHN DOE"},"cardExpiry":{"type":"string","description":"Card expiry date (MMYY)","example":"1225"},"cardCvv":{"type":"string","description":"Card CVV","example":"123"},"cardBrand":{"type":"string","description":"Card brand","example":"visa"},"isDefault":{"type":"boolean","description":"Set as default payment method","example":false}},"required":["cardNumber","cardHolder","cardExpiry","cardCvv"]},"CreatePortalSessionRequest":{"type":"object","properties":{"customerId":{"type":"number","description":"Customer ID","example":1},"productId":{"type":"number","description":"Product ID (optional)","example":1},"returnUrl":{"type":"string","description":"Return URL after portal actions","example":"https://example.com/success"}},"required":["customerId"]},"PortalConfigurationRequest":{"type":"object","properties":{"businessName":{"type":"string","description":"Business name"},"logoUrl":{"type":"string","description":"Logo URL"},"primaryColor":{"type":"string","description":"Primary color"},"allowCancelSubscription":{"type":"boolean","description":"Allow subscription cancellation"},"allowUpdatePaymentMethod":{"type":"boolean","description":"Allow payment method updates"},"allowUpdateBillingInfo":{"type":"boolean","description":"Allow billing info updates"},"allowViewInvoices":{"type":"boolean","description":"Allow invoice history view"},"allowApplyCoupons":{"type":"boolean","description":"Allow coupon application"},"requireCancelReason":{"type":"boolean","description":"Require cancellation reason"},"cancelAtPeriodEndOnly":{"type":"boolean","description":"Cancel at period end only"},"sendCancellationEmail":{"type":"boolean","description":"Send cancellation email"},"sendPaymentMethodUpdatedEmail":{"type":"boolean","description":"Send payment method updated email"},"customSuccessMessage":{"type":"string","description":"Custom success message"},"customCancellationMessage":{"type":"string","description":"Custom cancellation message"}}},"ProductPortalConfiguration":{"type":"object","properties":{"id":{"type":"number"},"productId":{"type":"number"},"product":{"$ref":"#/components/schemas/Product"},"businessName":{"type":"string","nullable":true},"logoUrl":{"type":"string","nullable":true},"primaryColor":{"type":"string","nullable":true},"allowCancelSubscription":{"type":"boolean","nullable":true},"allowUpdatePaymentMethod":{"type":"boolean","nullable":true},"allowUpdateBillingInfo":{"type":"boolean","nullable":true},"allowViewInvoices":{"type":"boolean","nullable":true},"allowApplyCoupons":{"type":"boolean","nullable":true},"requireCancelReason":{"type":"boolean","nullable":true},"cancelAtPeriodEndOnly":{"type":"boolean","nullable":true},"sendCancellationEmail":{"type":"boolean","nullable":true},"sendPaymentMethodUpdatedEmail":{"type":"boolean","nullable":true},"customSuccessMessage":{"type":"string","nullable":true},"customCancellationMessage":{"type":"string","nullable":true},"customWelcomeText":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","productId","product","businessName","logoUrl","primaryColor","allowCancelSubscription","allowUpdatePaymentMethod","allowUpdateBillingInfo","allowViewInvoices","allowApplyCoupons","requireCancelReason","cancelAtPeriodEndOnly","sendCancellationEmail","sendPaymentMethodUpdatedEmail","customSuccessMessage","customCancellationMessage","customWelcomeText","createdAt","updatedAt"]},"UpdatePaymentMethodRequest":{"type":"object","properties":{"paymentMethodId":{"type":"number"}},"required":["paymentMethodId"]},"AddCardAndUpdateSubscriptionRequest":{"type":"object","properties":{"cardNumber":{"type":"string"},"holderName":{"type":"string"},"expiryMonth":{"type":"number"},"expiryYear":{"type":"number"},"cvv":{"type":"string","minLength":3,"maxLength":4}},"required":["cardNumber","holderName","expiryMonth","expiryYear","cvv"]},"UpdateCustomerInfoRequest":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"document":{"type":"string"},"personType":{"type":"string","enum":["fisica","juridica"]},"zipCode":{"type":"string"},"street":{"type":"string"},"number":{"type":"string"},"complement":{"type":"string"},"neighborhood":{"type":"string"},"city":{"type":"string"},"state":{"type":"string","minLength":2,"maxLength":2}},"required":["name","email","phone","document","personType","zipCode","street","number","neighborhood","city","state"]},"SellerDomainResponse":{"type":"object","properties":{"id":{"type":"number","description":"Domain ID"},"domain":{"type":"string","description":"Base domain (e.g., example.com.br)"},"subdomain":{"type":"string","description":"Subdomain prefix (always \"pixels\")"},"fullSubdomain":{"type":"string","description":"Full subdomain (e.g., pixels.example.com.br)"},"verificationStatus":{"type":"string","description":"Verification status","enum":["pending","verified","failed"]},"verifiedAt":{"format":"date-time","type":"string","nullable":true,"description":"Date when domain was verified"},"lastCheckAt":{"format":"date-time","type":"string","nullable":true,"description":"Date of last verification check"},"createdAt":{"format":"date-time","type":"string","description":"Date when domain was added"}},"required":["id","domain","subdomain","fullSubdomain","verificationStatus","createdAt"]},"AddDomainRequest":{"type":"object","properties":{"domain":{"type":"string","maxLength":255,"description":"Domain name (e.g., example.com.br)","example":"meusite.com.br"}},"required":["domain"]},"VerifyDomainResponse":{"type":"object","properties":{"valid":{"type":"boolean","description":"Whether verification was successful"},"message":{"type":"string","description":"Message describing the result"},"actualTarget":{"type":"string","description":"Actual CNAME target found"},"isCloudflareProxy":{"type":"boolean","description":"Whether Cloudflare proxy was detected"}},"required":["valid","message"]},"TrackingEventRequest":{"type":"object","properties":{"productId":{"type":"number","description":"Product ID","example":123},"eventName":{"type":"string","description":"Event name","example":"PageView"},"eventId":{"type":"string","description":"Event ID for deduplication","example":"123e4567-e89b-12d3-a456-426614174000"},"externalId":{"type":"string","description":"External ID (anonymous user identifier)"},"email":{"type":"string","description":"Email address"},"firstName":{"type":"string","description":"First name"},"lastName":{"type":"string","description":"Last name"},"country":{"type":"string","description":"Country code","example":"br"},"region":{"type":"string","description":"Region/State","example":"SP"},"city":{"type":"string","description":"City","example":"São Paulo"},"fbp":{"type":"string","description":"Facebook browser ID (_fbp cookie)"},"fbc":{"type":"string","description":"Facebook click ID (_fbc cookie)"},"fbclid":{"type":"string","description":"Facebook click ID from URL"},"gclid":{"type":"string","description":"Google click ID"},"utmSource":{"type":"string","description":"UTM source"},"utmMedium":{"type":"string","description":"UTM medium"},"utmCampaign":{"type":"string","description":"UTM campaign"},"utmTerm":{"type":"string","description":"UTM term"},"utmContent":{"type":"string","description":"UTM content"},"value":{"type":"number","description":"Transaction value","example":99.99},"currency":{"type":"string","description":"Currency","example":"BRL"}},"required":["productId","eventName"]},"TrackingPixelConfig":{"type":"object","properties":{"pixelId":{"type":"string","description":"Facebook Pixel ID"},"trackingDomain":{"type":"string","description":"Custom tracking domain (e.g., pixels.example.com)"}},"required":["pixelId"]},"TrackingEventSettings":{"type":"object","properties":{"pageViewEnabled":{"type":"boolean","description":"Whether PageView event is enabled"},"initiateCheckoutEnabled":{"type":"boolean","description":"Whether InitiateCheckout event is enabled"},"addPaymentInfoEnabled":{"type":"boolean","description":"Whether AddPaymentInfo event is enabled"},"leadEnabled":{"type":"boolean","description":"Whether Lead event is enabled"},"purchaseEnabled":{"type":"boolean","description":"Whether Purchase event is enabled"}},"required":["pageViewEnabled","initiateCheckoutEnabled","addPaymentInfoEnabled","leadEnabled","purchaseEnabled"]},"TrackingConfigResponse":{"type":"object","properties":{"productId":{"type":"number","description":"Product ID"},"sellerId":{"type":"number","description":"Seller ID"},"pixels":{"description":"List of pixel configurations","type":"array","items":{"$ref":"#/components/schemas/TrackingPixelConfig"}},"eventSettings":{"description":"Event settings","allOf":[{"$ref":"#/components/schemas/TrackingEventSettings"}]},"defaultDomain":{"type":"string","description":"Default tracking domain"}},"required":["productId","sellerId","pixels","eventSettings","defaultDomain"]},"CreateProductDto":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"description":"Product name","example":"Premium Course"},"description":{"type":"string","description":"Product description","example":"A comprehensive course..."},"image":{"type":"string","description":"Product image URL","example":"https://example.com/image.jpg"},"value":{"type":"number","minimum":0,"description":"Product price in BRL","example":99.9},"boleto":{"type":"boolean","description":"Enable boleto payment","default":false},"credit_card":{"type":"boolean","description":"Enable credit card payment","default":false},"pix":{"type":"boolean","description":"Enable PIX payment","default":false},"installments":{"type":"number","minimum":1,"description":"Maximum installments for credit card","default":1},"is_subscription":{"type":"boolean","description":"Is this a subscription product","default":false},"subscription_type":{"type":"string","description":"Subscription type (monthly, yearly, etc.)"},"unit_label":{"type":"string","description":"Unit label (e.g., per user, per seat)"},"return_url":{"type":"string","maxLength":500,"description":"Return URL after successful payment"},"return_url_button_text":{"type":"string","maxLength":100,"description":"Text for return URL button"},"tags":{"description":"Product tags","type":"array","items":{"type":"string"}}},"required":["name","description","image","value"]},"ProductResponseDto":{"type":"object","properties":{"id":{"type":"number","example":123},"name":{"type":"string","example":"Premium Course"},"description":{"type":"string","example":"A comprehensive course..."},"image":{"type":"string","example":"https://example.com/image.jpg"},"value":{"type":"number","example":99.9},"boleto":{"type":"boolean","example":false},"credit_card":{"type":"boolean","example":true},"pix":{"type":"boolean","example":true},"installments":{"type":"number","example":12},"is_subscription":{"type":"boolean","example":false},"subscription_type":{"type":"string","nullable":true,"example":"monthly"},"unit_label":{"type":"string","nullable":true,"example":"per user"},"return_url":{"type":"string","nullable":true,"example":"https://example.com/success"},"return_url_button_text":{"type":"string","nullable":true,"example":"Access Content"},"uuid":{"type":"string","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"is_active":{"type":"boolean","example":true},"tags":{"example":["course","premium"],"type":"array","items":{"type":"string"}},"created_at":{"format":"date-time","type":"string","example":"2024-01-15T10:30:00.000Z"},"updated_at":{"format":"date-time","type":"string","example":"2024-01-15T10:30:00.000Z"}},"required":["id","name","description","image","value","boleto","credit_card","pix","installments","is_subscription","uuid","is_active","created_at","updated_at"]},"ProductListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProductResponseDto"}},"count":{"type":"number","example":10},"total_count":{"type":"number","example":100},"total_pages":{"type":"number","example":10}},"required":["data","count","total_count","total_pages"]},"UpdateProductDto":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"description":"Product name","example":"Premium Course"},"description":{"type":"string","description":"Product description","example":"A comprehensive course..."},"image":{"type":"string","description":"Product image URL","example":"https://example.com/image.jpg"},"value":{"type":"number","minimum":0,"description":"Product price in BRL","example":99.9},"boleto":{"type":"boolean","description":"Enable boleto payment"},"credit_card":{"type":"boolean","description":"Enable credit card payment"},"pix":{"type":"boolean","description":"Enable PIX payment"},"installments":{"type":"number","minimum":1,"description":"Maximum installments for credit card"},"is_subscription":{"type":"boolean","description":"Is this a subscription product"},"subscription_type":{"type":"string","description":"Subscription type (monthly, yearly, etc.)"},"unit_label":{"type":"string","description":"Unit label (e.g., per user, per seat)"},"return_url":{"type":"string","maxLength":500,"description":"Return URL after successful payment"},"return_url_button_text":{"type":"string","maxLength":100,"description":"Text for return URL button"},"tags":{"description":"Product tags","type":"array","items":{"type":"string"}},"is_active":{"type":"boolean","description":"Is product active"}}},"CreateSubscriptionPriceDto":{"type":"object","properties":{"product_id":{"type":"number","description":"Product ID this price belongs to","example":123},"name":{"type":"string","maxLength":255,"description":"Price name","example":"Monthly Plan"},"amount":{"type":"number","minimum":0,"description":"Price amount in cents","example":2990},"currency":{"type":"string","description":"Currency code","default":"BRL","example":"BRL"},"interval":{"type":"string","description":"Billing interval","enum":["day","week","month","year"],"example":"month"},"interval_count":{"type":"number","minimum":1,"description":"Number of intervals between billings","default":1,"example":1},"trial_period_days":{"type":"number","minimum":0,"description":"Trial period in days","default":0,"example":7},"description":{"type":"string","description":"Price description"},"is_active":{"type":"boolean","description":"Is price active","default":true}},"required":["product_id","name","amount","interval"]},"SubscriptionPriceResponseDto":{"type":"object","properties":{"id":{"type":"string","example":"price_abc123xyz"},"product_id":{"type":"number","example":123},"name":{"type":"string","example":"Monthly Plan"},"unit_amount":{"type":"number","example":2990},"currency":{"type":"string","example":"BRL"},"billing_interval":{"type":"string","example":"month"},"billing_interval_count":{"type":"number","example":1},"trial_period_days":{"type":"number","example":0},"description":{"type":"string","nullable":true,"example":"Access all premium features"},"is_active":{"type":"boolean","example":true},"created_at":{"format":"date-time","type":"string","example":"2024-01-15T10:30:00.000Z"},"updated_at":{"format":"date-time","type":"string","example":"2024-01-15T10:30:00.000Z"}},"required":["id","product_id","name","unit_amount","currency","billing_interval","billing_interval_count","trial_period_days","is_active","created_at","updated_at"]},"SubscriptionPriceListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionPriceResponseDto"}}},"required":["data"]},"UpdateSubscriptionPriceDto":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"description":"Price name","example":"Monthly Plan"},"description":{"type":"string","description":"Price description"},"trial_period_days":{"type":"number","minimum":0,"description":"Trial period in days","example":7},"is_active":{"type":"boolean","description":"Is price active"}}},"CreateWebhookEndpointRequest":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri","description":"Webhook endpoint URL (HTTPS only)","example":"https://example.com/webhook"},"events":{"minItems":1,"description":"Event types to subscribe to","example":["transaction.payment.succeeded","subscription.created"],"type":"array","items":{"type":"string"}},"description":{"type":"string","maxLength":500,"description":"Optional description for this endpoint"}},"required":["url","events"]},"UpdateWebhookEndpointRequest":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri","description":"Webhook endpoint URL (HTTPS only)"},"events":{"minItems":1,"description":"Event types to subscribe to","type":"array","items":{"type":"string"}},"description":{"type":"string","maxLength":500,"description":"Optional description for this endpoint"},"enabled":{"type":"boolean","description":"Enable or disable this endpoint"}}},"OutgoingWebhookEvent":{"type":"object","properties":{"id":{"type":"number"},"endpointId":{"type":"number"},"webhookEndpoint":{"$ref":"#/components/schemas/WebhookEndpoint"},"eventType":{"type":"string"},"payload":{"type":"object"},"status":{"enum":["pending","success","failed"],"type":"string"},"attempts":{"type":"number"},"lastAttemptAt":{"format":"date-time","type":"string","nullable":true},"nextRetryAt":{"format":"date-time","type":"string","nullable":true},"responseStatus":{"type":"number","nullable":true},"responseBody":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"}},"required":["id","endpointId","webhookEndpoint","eventType","payload","status","attempts","lastAttemptAt","nextRetryAt","responseStatus","responseBody","createdAt"]},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"number"},"sellerId":{"type":"number"},"seller":{"$ref":"#/components/schemas/Seller"},"url":{"type":"string"},"secret":{"type":"string"},"enabled":{"type":"boolean"},"description":{"type":"string","nullable":true},"events":{"type":"array","items":{"type":"string"}},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"webhookEvents":{"type":"array","items":{"$ref":"#/components/schemas/OutgoingWebhookEvent"}}},"required":["id","sellerId","seller","url","secret","enabled","description","events","createdAt","updatedAt","webhookEvents"]}}}}