{"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/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 Gateway ID (Public)","tags":["transactions"]}},"/api/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/{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":{"type":"object"}}}}},"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"}},{"name":"offer","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/{uuid}/offers":{"get":{"operationId":"ProductsController_listOffers","parameters":[{"name":"uuid","required":true,"in":"path","schema":{"type":"string"}},{"name":"active","required":true,"in":"query","schema":{"type":"string"}},{"name":"page","required":true,"in":"query","schema":{"type":"number"}},{"name":"limit","required":true,"in":"query","schema":{"type":"number"}}],"responses":{"200":{"description":""}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"List a product's offers","tags":["products"]},"post":{"operationId":"ProductsController_createOffer","parameters":[{"name":"uuid","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateOfferRequest"}}}},"responses":{"201":{"description":""}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Create an offer on a product","tags":["products"]}},"/api/products/offers/{offerId}":{"patch":{"operationId":"ProductsController_updateOffer","parameters":[{"name":"offerId","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateOfferRequest"}}}},"responses":{"200":{"description":""}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Update an offer","tags":["products"]},"delete":{"operationId":"ProductsController_deleteOffer","parameters":[{"name":"offerId","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Delete an offer that has never sold","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/carne-quote":{"get":{"description":"Powers the risk-acknowledgement dialog behind the boleto-parcelado toggle, which quantifies the deal with the product's own numbers before the seller commits to extending credit. Exists so the dashboard never reimplements the fator formula: a second implementation of money math is how the two drift apart. Declared before `/:id` so \"carne-quote\" is not read as a product id.","operationId":"ProductsController_getCarneQuote","parameters":[{"name":"value","required":true,"in":"query","schema":{"type":"string"}},{"name":"installments","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Quote a carnê for an arbitrary price","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":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductRequest"}}}},"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":"string"}}],"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/products/{id}/portal-config":{"get":{"description":"Returns null when no per-product config exists (the product falls back to seller-level portal config). Accepts either the product UUID or its integer id.","operationId":"ProductsController_getPortalConfig","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 the portal customization for a product","tags":["products"]},"post":{"description":"Creates or replaces the per-product portal config. Use PATCH for partial updates. Idempotent: subsequent calls with the same body return 200 with the persisted state. Accepts either the product UUID or its integer id.","operationId":"ProductsController_setPortalConfig","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductPortalConfigRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductPortalConfiguration"}}}}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Set the portal customization for a product","tags":["products"]},"patch":{"description":"Partial update — only provided fields are written. Missing fields keep their persisted value. Accepts either the product UUID or its integer id.","operationId":"ProductsController_patchPortalConfig","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductPortalConfigRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductPortalConfiguration"}}}}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Patch the portal customization for a product","tags":["products"]},"delete":{"description":"Removes the per-product config. The product falls back to the seller-level portal config. Accepts either the product UUID or its integer id.","operationId":"ProductsController_clearPortalConfig","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"api-key":[]},{"bearer":[]}],"summary":"Delete the portal customization for a product","tags":["products"]}},"/api/public/minha-area/request":{"post":{"operationId":"MagicLinkController_Request","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestMagicLinkRequest"}}}},"responses":{"200":{"description":"Always 200; maskedEmail is null when no customer matched"}},"summary":"Request a magic link to /minha-area","tags":["minha-area"]}},"/api/public/minha-area/charges":{"get":{"operationId":"MagicLinkController_Charges","parameters":[],"responses":{"200":{"description":"Charges grouped client-side by sellerId"}},"summary":"List the customer’s scheduled charges across all sellers","tags":["minha-area"]}},"/api/public/minha-area/profile":{"patch":{"operationId":"MagicLinkController_Profile","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBillingEmailRequest"}}}},"responses":{"200":{"description":"Override applied"}},"summary":"Update the per-seller billing email override","tags":["minha-area"]}},"/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":{"description":"Creates a customer record linked to the calling seller. The seller-side profile (CustomerSellerProfile) is upserted with the latest name/email/phone.","operationId":"CustomersController_Create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomerRequest"}}}},"responses":{"201":{"description":"Customer registered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}}},"security":[{"api-key":[]},{"garu-gateway":[]}],"summary":"Register a customer for the calling seller","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"}},{"name":"status","required":true,"in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated list of customers"}},"security":[{"api-key":[]},{"garu-gateway":[]}],"summary":"List customers for the current seller","tags":["customers"]}},"/api/customers/{id}/transactions":{"get":{"description":"Every transaction this customer has with the calling seller, newest first. Carnê parcelas are listed individually — each one is its own answer to \"did they pay us\".","operationId":"CustomersController_ListTransactions","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"Transactions, newest first"}},"security":[{"api-key":[]},{"garu-gateway":[]}],"summary":"Get a customer's payment history","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":[{"api-key":[]},{"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":[{"api-key":[]},{"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":[{"api-key":[]},{"garu-gateway":[]}],"summary":"Remove customer from seller","tags":["customers"]}},"/api/customers/{id}/billing-email-override":{"patch":{"description":"Sticky per-seller billing email. Takes precedence over the last-used email for outbound seller-to-customer emails. Pass `null` to clear and fall back to the last-used email.","operationId":"CustomersController_SetBillingEmailOverride","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetBillingEmailOverrideRequest"}}}},"responses":{"200":{"description":"Override updated"}},"security":[{"api-key":[]},{"garu-gateway":[]}],"summary":"Set or clear the per-seller billing email override","tags":["customers"]}},"/api/scheduled-charges/available-methods":{"get":{"description":"Drives the dashboard create-charge drawer. Returns the base set (pix/boleto/card) plus pix_automatic if the seller is allowlisted for the Pix Automático canary.","operationId":"ScheduledChargesController_AvailableMethods","parameters":[{"name":"search","required":false,"in":"query","schema":{"type":"string"}},{"name":"dueTo","required":false,"in":"query","schema":{"example":"2026-05-31","type":"string"}},{"name":"dueFrom","required":false,"in":"query","schema":{"example":"2026-05-01","type":"string"}},{"name":"type","required":false,"in":"query","schema":{"enum":["one_time","recurring"],"type":"string"}},{"name":"status","required":false,"in":"query","schema":{"type":"array","items":{"type":"string"}}},{"name":"customerId","required":false,"in":"query","schema":{"type":"number"}}],"responses":{"200":{"description":"Methods available to the current seller"}},"security":[{"api-key":[]},{"garu-gateway":[]}],"summary":"List scheduled charges for the calling seller","tags":["scheduled-charges"]}},"/api/scheduled-charges":{"get":{"operationId":"ScheduledChargesController_List","parameters":[{"name":"customerId","required":true,"in":"query","schema":{"type":"string"}},{"name":"type","required":true,"in":"query","schema":{"type":"string"}},{"name":"dueFrom","required":true,"in":"query","schema":{"type":"string"}},{"name":"dueTo","required":true,"in":"query","schema":{"type":"string"}},{"name":"search","required":true,"in":"query","schema":{"type":"string"}},{"name":"limit","required":false,"in":"query","schema":{"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"type":"number"}}],"responses":{"200":{"description":"Paginated list of scheduled charges"}},"security":[{"api-key":[]},{"garu-gateway":[]}],"tags":["scheduled-charges"]},"post":{"description":"Creates a one-time scheduled charge for an existing customer. Recurring charges land in M3.","operationId":"ScheduledChargesController_Create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateScheduledChargeRequest"}}}},"responses":{"201":{"description":"Scheduled charge created"}},"security":[{"api-key":[]},{"garu-gateway":[]}],"summary":"Create a scheduled charge","tags":["scheduled-charges"]}},"/api/scheduled-charges/{id}":{"get":{"operationId":"ScheduledChargesController_GetOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Scheduled charge detail bundle"}},"security":[{"api-key":[]},{"garu-gateway":[]}],"summary":"Get a scheduled charge by ID, including event timeline and linked transactions","tags":["scheduled-charges"]}},"/api/scheduled-charges/{id}/attempts":{"get":{"description":"Returns one row per logical billing attempt across all cycles in the series — cycle 1 interactive, every silent-charge, every retry, every manual mark-paid. Includes the canonical failureCode for declines. Filterable by cycleNumber.","operationId":"ScheduledChargesController_ListAttempts","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}},{"name":"cycleNumber","required":false,"in":"query","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","schema":{"type":"number"}},{"name":"page","required":false,"in":"query","schema":{"type":"number"}}],"responses":{"200":{"description":"Paginated attempt log for the series"}},"security":[{"api-key":[]},{"garu-gateway":[]}],"summary":"Per-attempt billing log for a scheduled charge (SPEC §4.2)","tags":["scheduled-charges"]}},"/api/scheduled-charges/{id}/charge-now":{"post":{"description":"Runs the same dispatch the daily cron would (customer email/notification + webhook + timeline event) immediately, instead of waiting for the dueDate. Idempotent: if the current cycle was already dispatched it reports `already_sent` and does not re-charge. Allowed from scheduled / due_today.","operationId":"ScheduledChargesController_ChargeNow","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Dispatch outcome"},"201":{"description":""}},"security":[{"api-key":[]},{"garu-gateway":[]}],"summary":"Charge a scheduled charge now","tags":["scheduled-charges"]}},"/api/scheduled-charges/{id}/postpone":{"post":{"description":"Allowed from scheduled / due_today / overdue / paused. Clears the dunning chain so the new dueDate gets a fresh D-day notice.","operationId":"ScheduledChargesController_Postpone","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostponeScheduledChargeRequest"}}}},"responses":{"200":{"description":"Postponed"},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledCharge"}}}}},"security":[{"api-key":[]},{"garu-gateway":[]}],"summary":"Postpone a scheduled charge to a new due date","tags":["scheduled-charges"]}},"/api/scheduled-charges/{id}/pause":{"post":{"description":"Allowed from scheduled / due_today / overdue. Resume returns it to scheduled.","operationId":"ScheduledChargesController_Pause","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PauseScheduledChargeRequest"}}}},"responses":{"200":{"description":"Paused"},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledCharge"}}}}},"security":[{"api-key":[]},{"garu-gateway":[]}],"summary":"Pause a scheduled charge","tags":["scheduled-charges"]}},"/api/scheduled-charges/{id}/resume":{"post":{"description":"Only valid from `paused` status.","operationId":"ScheduledChargesController_Resume","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Resumed"},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledCharge"}}}}},"security":[{"api-key":[]},{"garu-gateway":[]}],"summary":"Resume a paused scheduled charge","tags":["scheduled-charges"]}},"/api/scheduled-charges/{id}/cancel-recurrence":{"post":{"description":"Recurring schedules only. Generator and billing skip the series from now on; the in-flight cycle does not fire its email. Final — use a new series to restart.","operationId":"ScheduledChargesController_CancelRecurrence","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelRecurrenceScheduledChargeRequest"}}}},"responses":{"200":{"description":"Recurrence canceled"},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledCharge"}}}}},"security":[{"api-key":[]},{"garu-gateway":[]}],"summary":"Stop future cycles for a recurring scheduled charge (hard cancel)","tags":["scheduled-charges"]}},"/api/scheduled-charges/{id}/cancel-at-period-end":{"post":{"description":"Recurring schedules only. When `enabled=true`, the cycle generator stops emitting new cycles after the next paid cycle. Reversible by passing `enabled=false`. Mutually exclusive with `recurrence.endsAfter` and `recurrence.endsOn`.","operationId":"ScheduledChargesController_SetCancelAtPeriodEnd","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelAtPeriodEndScheduledChargeRequest"}}}},"responses":{"200":{"description":"Toggle applied"},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledCharge"}}}}},"security":[{"api-key":[]},{"garu-gateway":[]}],"summary":"Toggle Stripe-style soft cancel on a recurring scheduled charge","tags":["scheduled-charges"]}},"/api/scheduled-charges/{id}/mark-paid":{"post":{"description":"Use when the customer paid off-Garu (bank transfer, etc.). For one-time charges: omit `cycleNumber`; allowed from due_today / overdue. For recurring: pass `cycleNumber`; allowed from cycle status due_today / overdue / failed. Future cycles continue.","operationId":"ScheduledChargesController_MarkPaid","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkPaidScheduledChargeRequest"}}}},"responses":{"200":{"description":"Marked as paid"},"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"api-key":[]},{"garu-gateway":[]}],"summary":"Manually mark a scheduled charge as paid","tags":["scheduled-charges"]}},"/api/scheduled-charges/{id}/payment-method":{"post":{"description":"Recurring schedules only. The new PaymentMethod must belong to the same customer and already bill one of your charges for that customer (a subscription, a scheduled charge or a past attempt); otherwise 404. Future cycles silent-charge the new card; the in-flight cycle (if already due_today) is not retroactively rebound.","operationId":"ScheduledChargesController_ChangePaymentMethod","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePaymentMethodScheduledChargeRequest"}}}},"responses":{"200":{"description":"Payment method changed"},"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledCharge"}}}}},"security":[{"api-key":[]},{"garu-gateway":[]}],"summary":"Swap the saved card on a recurring scheduled charge","tags":["scheduled-charges"]},"delete":{"description":"Recurring schedules only. Future cycles fall back to the email-with-link flow so the customer can re-enter card details or pay via PIX/boleto.","operationId":"ScheduledChargesController_ClearPaymentMethod","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Payment method cleared"}},"security":[{"api-key":[]},{"garu-gateway":[]}],"summary":"Clear the saved card on a recurring scheduled charge","tags":["scheduled-charges"]}},"/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/subscribe/{uuid}/status":{"get":{"description":"Returns the subscription status so the Pix Automático consent UI can detect when the customer finishes authorizing in their bank app and the first debit lands via webhook. Uses the subscription UUID rather than the sequential id to keep the public endpoint non-enumerable.","operationId":"SubscribeController_getStatus","parameters":[{"name":"uuid","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"summary":"Poll a subscription status (public hosted checkout consent polling)","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":""}},"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":""}},"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":"number"}}],"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":"number"}}],"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/charges":{"post":{"operationId":"V1ChargesController_create","parameters":[{"name":"X-Idempotency-Key","in":"header","description":"Optional. Pass a unique key per logical charge to safely retry without creating a duplicate. The same key returns the original charge for 24h, scoped to the seller. A DISTINCT key also marks a distinct purchase: it lets you bill the same customer for the same product and amount again inside the 60s duplicate window, which is otherwise answered with the original charge. Only send a key you can reproduce on a retry — a key generated fresh per call protects nothing.","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChargeDto"}}}},"responses":{"201":{"description":"Charge created"},"400":{"description":"Validation error"},"401":{"description":"Invalid API key"},"404":{"description":"Product not found for this account"},"409":{"description":"An identical charge (same buyer, product, rail, amount and instalments) is already being processed. Wait the seconds given in Retry-After and send it again — the retry returns the original charge rather than creating another one."}},"security":[{"api-key":[]}],"summary":"Create a charge (PIX, boleto or credit card)","tags":["v1/charges"]},"get":{"operationId":"V1ChargesController_list","parameters":[{"name":"page","required":false,"in":"query","description":"Página (padrão 1)","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Itens por página (padrão 20, máximo 100)","schema":{"minimum":1,"maximum":100,"example":20,"type":"number"}},{"name":"status","required":false,"in":"query","description":"Filtra pelo status da cobrança","schema":{"example":"payedPix","type":"string"}},{"name":"paymentMethod","required":false,"in":"query","description":"Filtra pelo método","schema":{"type":"string","enum":["pix","boleto","creditCard"]}},{"name":"productId","required":false,"in":"query","description":"Filtra pelo UUID do produto","schema":{"type":"string"}},{"name":"createdAfter","required":false,"in":"query","description":"Cobranças criadas a partir desta data (ISO-8601)","schema":{"type":"string"}},{"name":"createdBefore","required":false,"in":"query","description":"Cobranças criadas até esta data (ISO-8601)","schema":{"type":"string"}},{"name":"search","required":false,"in":"query","description":"Busca por nome, e-mail ou documento do cliente","schema":{"type":"string"}},{"name":"sort","required":false,"in":"query","description":"Ordenação (padrão -createdAt)","schema":{"type":"string","enum":["createdAt","-createdAt","amount","-amount"]}}],"responses":{"200":{"description":"Paginated list of charges"}},"security":[{"api-key":[]}],"summary":"List charges for the authenticated account","tags":["v1/charges"]}},"/api/v1/charges/{uuid}":{"get":{"operationId":"V1ChargesController_retrieve","parameters":[{"name":"uuid","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Charge found"},"404":{"description":"Charge not found"}},"security":[{"api-key":[]}],"summary":"Retrieve a charge by uuid","tags":["v1/charges"]},"delete":{"operationId":"V1ChargesController_cancel","parameters":[{"name":"uuid","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Charge canceled"},"404":{"description":"Charge not found"}},"security":[{"api-key":[]}],"summary":"Cancel an unpaid charge","tags":["v1/charges"]}},"/api/v1/charges/{uuid}/refund":{"post":{"operationId":"V1ChargesController_refund","parameters":[{"name":"uuid","required":true,"in":"path","schema":{"type":"string"}},{"name":"X-Idempotency-Key","in":"header","description":"Optional. For Pix/boleto (which open a refund request instead of an automated reversal), pass a unique key to safely retry without opening a second request. Ignored for card, which reverses automatically and has no manual request to duplicate.","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundChargeDto"}}}},"responses":{"200":{"description":"Charge refunded"},"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"Celcoin Pix and boleto have no usable reversal, so the money has to go back by hand. Garu opened a REFUND REQUEST and notified your team; the body is that request. Return the money to the buyer, then close it with POST /v1/refund-requests/{uuid}/confirm — or send `manualRefundConfirmed: true` here to open and confirm in one call. Open requests are listable at GET /v1/refund-requests, so nothing is left untracked."},"400":{"description":"Charge not in a refundable state"},"404":{"description":"Charge not found"}},"security":[{"api-key":[]}],"summary":"Refund a charge, fully or partially","tags":["v1/charges"]}},"/api/v1/installment-plans":{"post":{"description":"Creates the plan and registers ONLY the first boleto. The remaining parcelas are emitted month by month, and the sale activates when parcela 1 compensates — a plan is not a sale until the buyer has paid something.","operationId":"V1InstallmentPlansController_create","parameters":[{"name":"X-Idempotency-Key","in":"header","description":"Strongly recommended. A carnê registers a real boleto at the bank, so a retry after a timeout can otherwise put two payable barcodes in one buyer's hands. The same key returns the original plan for 24h, scoped to your account.","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInstallmentPlanDto"}}}},"responses":{"201":{"description":"The plan, with its first installment"},"400":{"description":"Product does not accept carnê, or bad parcela count"},"409":{"description":"An identical plan was just created for this customer"}},"security":[{"api-key":[]}],"summary":"Sell a product as a carnê","tags":["v1/installment-plans"]},"get":{"operationId":"V1InstallmentPlansController_list","parameters":[{"name":"page","required":false,"in":"query","description":"Página (padrão 1)","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Itens por página (padrão 20, máximo 100)","schema":{"minimum":1,"maximum":100,"example":20,"type":"number"}},{"name":"status","required":false,"in":"query","description":"Filtra por status. Repita o parâmetro para aceitar mais de um.","schema":{"type":"array","items":{"type":"string","enum":["pending_activation","active","completed","defaulted","canceled","refunded"]}}},{"name":"customerId","required":false,"in":"query","description":"Filtra pelo id do cliente","schema":{"example":4821,"type":"number"}},{"name":"productId","required":false,"in":"query","description":"Filtra pelo UUID do produto","schema":{"type":"string"}},{"name":"dueFrom","required":false,"in":"query","description":"Carnês cuja PRIMEIRA parcela vence a partir desta data (YYYY-MM-DD). O filtro usa a data âncora, que identifica o carnê; filtrar por qualquer parcela devolveria o mesmo carnê doze vezes.","schema":{"pattern":"/^\\d{4}-\\d{2}-\\d{2}$/","example":"2026-09-01","type":"string"}},{"name":"dueTo","required":false,"in":"query","description":"Carnês cuja primeira parcela vence até esta data (YYYY-MM-DD)","schema":{"pattern":"/^\\d{4}-\\d{2}-\\d{2}$/","example":"2026-12-31","type":"string"}}],"responses":{"200":{"description":"Paginated list of plans"}},"security":[{"api-key":[]}],"summary":"List carnês for the authenticated account","tags":["v1/installment-plans"]}},"/api/v1/installment-plans/{uuid}":{"get":{"description":"Includes each parcela: due date, status, barcode line and boleto PDF.","operationId":"V1InstallmentPlansController_getOne","parameters":[{"name":"uuid","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"The plan"},"404":{"description":"Plan not found"}},"security":[{"api-key":[]}],"summary":"Get one carnê with every installment","tags":["v1/installment-plans"]}},"/api/v1/installment-plans/{uuid}/installments/{number}/reissue":{"post":{"description":"Only once the current slip has expired. A boleto stays payable at any bank until its due date plus five days, so a second live barcode would let the buyer pay the same parcela twice. Once per parcela per day.","operationId":"V1InstallmentPlansController_reissue","parameters":[{"name":"uuid","required":true,"in":"path","schema":{"type":"string"}},{"name":"number","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"The reissued installment"},"201":{"description":""},"409":{"description":"Already reissued today, or the slip is still live"}},"security":[{"api-key":[]}],"summary":"Issue a segunda via for one installment","tags":["v1/installment-plans"]}},"/api/v1/installment-plans/{uuid}/installments/{number}/postpone":{"post":{"description":"This parcela only; its siblings keep their dates. A slip already emitted stays payable on its original date until it expires.","operationId":"V1InstallmentPlansController_postpone","parameters":[{"name":"uuid","required":true,"in":"path","schema":{"type":"string"}},{"name":"number","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostponeInstallmentDto"}}}},"responses":{"200":{"description":"The postponed installment"},"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"api-key":[]}],"summary":"Move one installment to a later date","tags":["v1/installment-plans"]}},"/api/v1/installment-plans/{uuid}/installments/{number}/mark-paid":{"post":{"description":"For when the buyer paid the slip but the webhook never arrived. Garu asks the provider to confirm the charge really compensated before recording it, because this settles the transaction and pays affiliate and co-producer commissions.","operationId":"V1InstallmentPlansController_markPaid","parameters":[{"name":"uuid","required":true,"in":"path","schema":{"type":"string"}},{"name":"number","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"The installment, now paid"},"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}},"409":{"description":"The provider does not report this slip as paid"}},"security":[{"api-key":[]}],"summary":"Record an installment as paid","tags":["v1/installment-plans"]}},"/api/v1/installment-plans/{uuid}/cancel":{"post":{"description":"Stops emission and reminders and cancels open slips at the provider. Money already collected is not returned — open a refund request for that. A cancelled carnê is never revived by a late payment; that money opens a refund request instead.","operationId":"V1InstallmentPlansController_cancel","parameters":[{"name":"uuid","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelInstallmentPlanDto"}}}},"responses":{"200":{"description":"The cancelled plan"},"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"api-key":[]}],"summary":"Cancel the carnê","tags":["v1/installment-plans"]}},"/api/v1/installment-plans/{uuid}/refund-requests":{"post":{"description":"Garu does NOT move the money. A boleto cannot be reversed and the funds already settled to you, so this records the request and notifies your team. Transfer the money to the buyer yourself, then confirm the request to close it.","operationId":"V1InstallmentPlansController_requestRefund","parameters":[{"name":"uuid","required":true,"in":"path","schema":{"type":"string"}},{"name":"X-Idempotency-Key","in":"header","description":"Optional. Pass a unique key to safely retry this request without opening a second refund request. The same key returns the original request for 24h, scoped to the seller.","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestPlanRefundDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}},"202":{"description":"The pending refund request"}},"security":[{"api-key":[]}],"summary":"Ask for this carnê to be refunded","tags":["v1/installment-plans"]}},"/api/v1/products":{"post":{"operationId":"V1ProductsController_create","parameters":[{"name":"X-Idempotency-Key","in":"header","description":"Optional. Pass a unique key to safely retry this request without creating a duplicate product. The same key returns the originally-created product for 24h, scoped to the seller.","required":false,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProductDto"}}}},"responses":{"201":{"description":"Product created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponseDto"}}}},"400":{"description":"Validation error, or a one-time product priced above 0 and below the platform minimum"},"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 (default 1)","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Per page (default 10)","schema":{"type":"number"}},{"name":"search","required":false,"in":"query","description":"Filter by name","schema":{"type":"string"}}],"responses":{"200":{"description":"Products list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductListResponseDto"}}}},"401":{"description":"Invalid API key"}},"security":[{"api-key":[]}],"summary":"List products","tags":["v1/products"]}},"/api/v1/products/{id}":{"get":{"operationId":"V1ProductsController_getById","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Product","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponseDto"}}}},"401":{"description":"Invalid API key"},"404":{"description":"Product not found"}},"security":[{"api-key":[]}],"summary":"Retrieve a product by UUID","tags":["v1/products"]},"patch":{"operationId":"V1ProductsController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProductDto"}}}},"responses":{"200":{"description":"Product updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponseDto"}}}},"400":{"description":"Validation error, or a one-time product priced above 0 and below the platform minimum"},"401":{"description":"Invalid API key"},"404":{"description":"Product not found"}},"security":[{"api-key":[]}],"summary":"Update a product by UUID","tags":["v1/products"]},"delete":{"operationId":"V1ProductsController_deactivate","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Product deactivated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductResponseDto"}}}},"401":{"description":"Invalid API key"},"404":{"description":"Product not found"}},"security":[{"api-key":[]}],"summary":"Deactivate a product by UUID","tags":["v1/products"]}},"/api/v1/products/{id}/portal-config":{"get":{"operationId":"V1ProductsController_getPortalConfig","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"Portal config (null if none set)"}},"security":[{"api-key":[]}],"summary":"Get the payment-page customization for a product","tags":["v1/products"]},"post":{"operationId":"V1ProductsController_setPortalConfig","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductPortalConfigRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductPortalConfiguration"}}}}},"security":[{"api-key":[]}],"summary":"Set the payment-page customization for a product","tags":["v1/products"]},"patch":{"operationId":"V1ProductsController_patchPortalConfig","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductPortalConfigRequest"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductPortalConfiguration"}}}}},"security":[{"api-key":[]}],"summary":"Partially update the payment-page customization for a product","tags":["v1/products"]},"delete":{"operationId":"V1ProductsController_clearPortalConfig","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"security":[{"api-key":[]}],"summary":"Remove the payment-page customization for a product","tags":["v1/products"]}},"/api/v1/refund-requests":{"get":{"description":"Covers carnê and Pix requests alike. Newest first.","operationId":"V1RefundRequestsController_list","parameters":[{"name":"page","required":false,"in":"query","description":"Página (padrão 1)","schema":{"minimum":1,"example":1,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Itens por página (padrão 20, máximo 100)","schema":{"minimum":1,"maximum":100,"example":20,"type":"number"}},{"name":"status","required":false,"in":"query","description":"Filtra por status. Repita o parâmetro para aceitar mais de um.","schema":{"type":"array","items":{"type":"string","enum":["pending","confirmed","rejected"]}}},{"name":"planId","required":false,"in":"query","description":"Filtra pelos pedidos de um carnê (UUID do plano)","schema":{"type":"string"}},{"name":"chargeId","required":false,"in":"query","description":"Filtra pelos pedidos de uma cobrança Pix (UUID)","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated list of refund requests"}},"security":[{"api-key":[]}],"summary":"List refund requests","tags":["v1/refund-requests"]}},"/api/v1/refund-requests/{uuid}":{"get":{"operationId":"V1RefundRequestsController_getOne","parameters":[{"name":"uuid","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":"The refund request"},"404":{"description":"Refund request not found"}},"security":[{"api-key":[]}],"summary":"Get one refund request","tags":["v1/refund-requests"]}},"/api/v1/refund-requests/{uuid}/confirm":{"post":{"description":"Call this AFTER transferring the money to the buyer. It closes the carnê as refunded, stops any remaining parcelas, cancels open slips at the provider and claws back the affiliate and co-producer commissions on the parcelas that cleared. Idempotent: confirming twice does not claw back twice.","operationId":"V1RefundRequestsController_confirm","parameters":[{"name":"uuid","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveRefundRequestDto"}}}},"responses":{"200":{"description":"The confirmed request"},"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"api-key":[]}],"summary":"Record that you returned the money","tags":["v1/refund-requests"]}},"/api/v1/refund-requests/{uuid}/reject":{"post":{"description":"The carnê is untouched and keeps running. Idempotent.","operationId":"V1RefundRequestsController_reject","parameters":[{"name":"uuid","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResolveRefundRequestDto"}}}},"responses":{"200":{"description":"The rejected request"},"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"api-key":[]}],"summary":"Decline the refund request","tags":["v1/refund-requests"]}},"/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, or an amount below the platform minimum price"},"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-endpoints/{id}/trigger":{"post":{"operationId":"WebhookEndpointsController_trigger","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerWebhookEndpointRequest"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[{"bearer":[]}],"summary":"Trigger a sample payload for any subscribed event type — used by sellers to validate their integration end-to-end without waiting for real traffic. Payload carries metadata.test=true so receivers can branch.","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":[{"api-key":[]},{"garu-gateway":[]}],"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":[{"api-key":[]},{"garu-gateway":[]}],"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":[{"api-key":[]},{"garu-gateway":[]}],"summary":"Manually retry a failed webhook event","tags":["webhook-events"]}},"/api/webhook-events/{id}/resend":{"post":{"operationId":"WebhookEventsController_resend","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutgoingWebhookEvent"}}}}},"security":[{"api-key":[]},{"garu-gateway":[]}],"summary":"Clone a webhook event and deliver the clone (works on any status)","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_` — as únicas aceitas aqui\n- **Teste**: Chaves com prefixo `sk_test_` recebem `403`. **Não existe sandbox**: esta\n  API tem dados reais e fala com o processador de pagamento real, então uma chave de teste\n  moveria dinheiro de verdade.\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)"},{"name":"v1/charges","description":"API v1 - Cobranças / checkout transparente (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. Chaves sk_test_ são recusadas com 403 — não existe sandbox. 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"]},"PreferenceItemDto":{"type":"object","properties":{"eventType":{"type":"string","enum":["sale_pix_created","sale_boleto_created","sale_approved","sale_renewal","sale_renewal_failed","scheduled_charge_overdue","affiliate_invite_received"],"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","scheduled_charge_overdue","affiliate_invite_received"],"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"]},"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"]},"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"},"carneFeePercent":{"type":"number","nullable":true,"minimum":0,"maximum":1,"description":"Carnê fee percentage. Charged on EVERY parcela — an 8,99% line on a 12x carnê takes 8,99% of everything collected, not of the sale."},"carneFeeFixed":{"type":"number","nullable":true,"minimum":0,"description":"Carnê fixed fee in BRL, per parcela. R$2,49 on a R$50 parcela is 5% on its own."},"carneDplusX":{"type":"number","nullable":true,"minimum":0,"maximum":60,"description":"Carnê settlement days (D+X)"},"carneReservePercent":{"type":"number","nullable":true,"minimum":0,"maximum":1,"description":"Carnê reserve percentage"},"carneReserveDays":{"type":"number","nullable":true,"minimum":0,"maximum":365,"description":"Carnê reserve days"},"carneMarkupShare":{"type":"number","nullable":true,"minimum":0,"maximum":1,"description":"Garu's share of the carnê markup (0..1). Taken from the seller's side; affiliate and co-producer bases are untouched. At 1.0 the seller nets LESS than selling the same product as one plain boleto while still carrying a year of default risk."},"cardFator":{"type":"number","nullable":true,"minimum":1,"maximum":3,"description":"Credit-card installment markup, e.g. 1.30 = the buyer pays 130% of the sticker price at 12x. Snapshotted per transaction, so changing it never reprices a past sale."},"carneFator":{"type":"number","nullable":true,"minimum":1,"maximum":3,"description":"Carnê installment markup. Separate from `cardFator` so tuning a carnê cannot silently reprice the live credit-card checkout. Snapshotted onto every plan at creation."},"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"]},"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"]},"AffiliateInviteSummary":{"type":"object","properties":{"productUuid":{"type":"string","description":"Product UUID, used as the identifier when accepting the invite"},"productName":{"type":"string","description":"Product name"},"productImage":{"type":"string","nullable":true,"description":"Product image URL"},"productValue":{"type":"number","description":"Product value in reais"},"sellerName":{"type":"string","description":"Producer/Seller name"},"commissionPercent":{"type":"number","description":"Commission percentage the invite offers"},"invitedAt":{"format":"date-time","type":"string","description":"When the invite was sent"}},"required":["productUuid","productName","productImage","productValue","sellerName","commissionPercent","invitedAt"]},"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"]},"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"]},"AddressDto":{"type":"object","properties":{"zipCode":{"type":"string"},"street":{"type":"string"},"number":{"type":"string"},"complement":{"type":"string"},"neighborhood":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"}}},"CustomerDto":{"type":"object","properties":{"galaxPayId":{"type":"number"},"myId":{"type":"string"},"phones":{"type":"array","items":{"type":"number"}},"name":{"type":"string"},"document":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"emails":{"type":"array","items":{"type":"string"}},"Address":{"$ref":"#/components/schemas/AddressDto"},"ExtraFields":{"type":"array","items":{"type":"object"}}}},"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"]},"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"},"uuid":{"type":"string","description":"Public identifier for the Customer resource (`/api/v1/customers/{uuid}`).\nGenerated by a DB-level `DEFAULT gen_random_uuid()`, never derived in app code."},"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","uuid","galaxPayId","name","email","phone","document","personType","zipCode","street","number","complement","neighborhood","city","state","createdAt","updatedAt","transactions"]},"ProductVariant":{"type":"object","properties":{"id":{"type":"number"},"productId":{"type":"number"},"product":{"$ref":"#/components/schemas/Product"},"sku":{"type":"string","nullable":true},"name":{"type":"string","nullable":true,"description":"Human-facing variant label, e.g. \"Preto / M\"."},"options":{"type":"object","nullable":true,"description":"Selected option map, e.g. { \"cor\": \"Preto\", \"tamanho\": \"M\" }."},"price":{"type":"number","nullable":true,"description":"Decimal BRL. NULL means \"use the parent Product.value\"."},"image":{"type":"string","nullable":true},"weightGrams":{"type":"number","nullable":true},"lengthCm":{"type":"number","nullable":true},"widthCm":{"type":"number","nullable":true},"heightCm":{"type":"number","nullable":true},"externalVariantId":{"type":"string","nullable":true,"description":"External platform variant reference (e.g. Shopify variant GID). Nullable\nfor Garu-native variants; populated by the store connectors (E0.8)."},"isActive":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","productId","product","sku","name","options","price","image","weightGrams","lengthCm","widthCm","heightCm","externalVariantId","isActive","createdAt","updatedAt"]},"OrderItem":{"type":"object","properties":{"id":{"type":"number"},"orderId":{"type":"number"},"order":{"$ref":"#/components/schemas/Order"},"productId":{"type":"number","nullable":true},"product":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Product"}]},"variantId":{"type":"number","nullable":true},"variant":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ProductVariant"}]},"productName":{"type":"string","description":"Snapshot of the product name at order time."},"variantName":{"type":"string","nullable":true,"description":"Snapshot of the variant label at order time."},"sku":{"type":"string","nullable":true},"unitPrice":{"type":"number"},"quantity":{"type":"number"},"lineSubtotal":{"type":"number"},"createdAt":{"format":"date-time","type":"string"}},"required":["id","orderId","order","productId","product","variantId","variant","productName","variantName","sku","unitPrice","quantity","lineSubtotal","createdAt"]},"Order":{"type":"object","properties":{"id":{"type":"number"},"uuid":{"type":"string"},"sellerId":{"type":"number"},"seller":{"$ref":"#/components/schemas/Seller"},"status":{"type":"string","enum":["pending","paid","fulfilled","shipped","delivered","canceled"]},"currency":{"type":"string"},"itemsSubtotal":{"type":"number"},"freightAmount":{"type":"number"},"discountAmount":{"type":"number"},"orderTotal":{"type":"number"},"chargedTotal":{"type":"number","nullable":true,"description":"What was actually collected (incl. fator). NULL until the charge engine (E0.2) runs."},"customerId":{"type":"number","nullable":true},"customer":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Customer"}]},"customerName":{"type":"string","nullable":true},"customerEmail":{"type":"string","nullable":true},"customerDocument":{"type":"string","nullable":true},"customerPhone":{"type":"string","nullable":true},"customerZipCode":{"type":"string","nullable":true},"customerStreet":{"type":"string","nullable":true},"customerNumber":{"type":"string","nullable":true},"customerComplement":{"type":"string","nullable":true},"customerNeighborhood":{"type":"string","nullable":true},"customerCity":{"type":"string","nullable":true},"customerState":{"type":"string","nullable":true},"transactionId":{"type":"number","nullable":true},"transaction":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Transaction"}]},"externalOrderId":{"type":"string","nullable":true},"externalPlatform":{"type":"string","nullable":true},"clientReferenceId":{"type":"string","nullable":true},"metadata":{"type":"object"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItem"}},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","uuid","sellerId","seller","status","currency","itemsSubtotal","freightAmount","discountAmount","orderTotal","chargedTotal","customerId","customer","customerName","customerEmail","customerDocument","customerPhone","customerZipCode","customerStreet","customerNumber","customerComplement","customerNeighborhood","customerCity","customerState","transactionId","transaction","externalOrderId","externalPlatform","clientReferenceId","metadata","items","createdAt","updatedAt"]},"ProductOffer":{"type":"object","properties":{"id":{"type":"object"},"productId":{"type":"number"},"product":{"$ref":"#/components/schemas/Product"},"name":{"type":"string","description":"Seller-facing label. Never shown to the buyer (SPEC.md decision 18)."},"slug":{"type":"string","nullable":true,"description":"Optional, seller-chosen, unique per product. Lowercase/digits/hyphens only,\nwhich is what keeps it from ever colliding with a generated id.\n\nA slug is PUBLIC and guessable — anyone holding a product link can try\n`?offer=black-friday`. That is accepted, not overlooked: see SPEC.md §6.2.\nA seller who does not want a promo price discovered leaves it null and\nshares the id instead."},"value":{"type":"number"},"isActive":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","productId","product","name","slug","value","isActive","createdAt","updatedAt"]},"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"},"kind":{"type":"object"},"gatewayCardId":{"type":"string","description":"Provider credential reference. For `card`: the Celcoin tokenized-card id.\nFor `pix_automatic`: the Woovi subscription/authorization globalID."},"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"},"expiringSoonNotifiedAt":{"format":"date-time","type":"string","nullable":true},"expiring14dNotifiedAt":{"format":"date-time","type":"string","nullable":true},"expiring7dNotifiedAt":{"format":"date-time","type":"string","nullable":true},"expiredAt":{"format":"date-time","type":"string","nullable":true},"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","kind","gatewayCardId","cardBrand","cardLast4","cardExpMonth","cardExpYear","cardholderName","isDefault","isBackup","status","lastUsedAt","failedAttempts","expiringSoonNotifiedAt","expiring14dNotifiedAt","expiring7dNotifiedAt","expiredAt","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},"emailVerificationTokenHash":{"type":"string","nullable":true,"description":"SHA-256 of the pending e-mail confirmation token. The token itself is only in the e-mail."},"emailVerificationExpiresAt":{"format":"date-time","type":"string","nullable":true},"lastLoginAt":{"format":"date-time","type":"string","nullable":true},"tokensValidAfter":{"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","emailVerificationTokenHash","emailVerificationExpiresAt","lastLoginAt","tokensValidAfter","twoFactorEnabled","twoFactorPromptDismissed","twoFactorEnabledAt","createdAt","updatedAt","teamMembers","sessions","mfaCodes","twoFactorMethods","backupCodes"]},"Transaction":{"type":"object","properties":{"id":{"type":"number"},"uuid":{"type":"string","description":"Public identifier for the Charge resource (`/api/v1/charges/{uuid}`). The\nserial `id` stays internal — sequential ids leak volume and invite\nenumeration. Generated by a DB-level `DEFAULT gen_random_uuid()` rather\nthan by the app, because transactions are inserted from several code paths\n(public checkout, webhook recovery, minimal-save, subscription billing,\nscheduled-charge dispatch) and the default covers all of them at once."},"galaxPayId":{"type":"number"},"gatewayProvider":{"type":"string","nullable":true,"description":"Which processor handled this transaction. NULL is read as 'celcoin'\n(every pre-Woovi row). Woovi rows set this to 'woovi' and keep\n`galaxPayId=0` (sentinel) since Woovi ids are strings — see\n`gatewayChargeId`."},"gatewayChargeId":{"type":"string","nullable":true,"description":"String charge reference for non-Celcoin processors (Woovi correlationID /\ncharge globalID). Used to reconcile inbound webhooks. NULL for Celcoin."},"product":{"nullable":true,"description":"The product this transaction charges. NULL for physical-goods ORDER charges\n(E0.2.2) — those set `order` instead, since an order can span multiple\nproducts. Read the seller from `order` when `product` is null.","allOf":[{"$ref":"#/components/schemas/Product"}]},"orderId":{"type":"number","nullable":true,"description":"The physical-goods order this transaction charges (E0.2.2). NULL for the\nlegacy single-product / subscription flows (which set `product`). Exactly\none of `product` / `order` is set on a given transaction."},"order":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Order"}]},"customer":{"$ref":"#/components/schemas/Customer"},"affiliation":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Affiliations"}]},"offerId":{"type":"object","nullable":true,"description":"The offer this sale came through, or null for the product's default price\n(SPEC.md §3.2). `RESTRICT` mirrors `subscription.subscriptionPriceId`: an\noffer that has sales can never be deleted out from under its history.\n\nThe offer's NAME is deliberately not copied. `value` below already freezes\nthe amount, so a rename only relabels reports — the same gap subscriptions\nhave carried since they shipped, matched here on purpose (decision 8)."},"offer":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/ProductOffer"}]},"value":{"type":"number"},"valueSeller":{"type":"number"},"valueAffiliate":{"type":"number","nullable":true},"chargedTotal":{"type":"number","nullable":true,"description":"Total amount actually charged to the customer and captured by the\nprocessor, in BRL. Equals `value` for PIX/boleto/1x, but for installment\ncard sales it includes the `fator` financing markup, so it can exceed the\nproduct base price. NULL for rows created before v0.14.3 (read as `value`)."},"date":{"format":"date-time","type":"string"},"paymentMethod":{"type":"string"},"installments":{"type":"number"},"fator":{"type":"number","nullable":true},"code":{"type":"string","nullable":true},"boletoPdfUrl":{"type":"string","nullable":true,"description":"Processor-hosted boleto PDF. Persisted so `/api/v1/charges/{uuid}/boleto.pdf`\ncan proxy the document through garu.com.br instead of handing a whitelabel\npayer a link on the acquirer's domain. NULL for PIX and card."},"deadline":{"format":"date-time","type":"string"},"status":{"type":"string"},"scheduledChargeId":{"type":"string","nullable":true,"description":"Optional link back to a `scheduled_charge` row. Set when this\ntransaction was minted to fulfil a scheduled-charge dispatch (M2+).\nDrives the Celcoin webhook ingestion path that flips the schedule's\nstatus to `paid`."},"scheduledChargeCycleId":{"type":"string","nullable":true},"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},"failureCode":{"type":"string","nullable":true},"failureReason":{"type":"string","nullable":true},"gatewayFailureCode":{"type":"string","nullable":true},"failedAt":{"format":"date-time","type":"string","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"}]},"refundedByApiKeyId":{"type":"string","nullable":true,"description":"Audit trail for refunds issued through the public API (PCI-6). An API key\nhas no user behind it, so a dashboard refund records `refundedByUserId`\nand an API refund records this instead — never both. Refunds predating\nthe v1 charges API have both NULL."},"feePercent":{"type":"number","nullable":true},"feeFixed":{"type":"number","nullable":true},"feeTotalAmount":{"type":"number","nullable":true},"carneMarkupAmount":{"type":"number","nullable":true,"description":"Garu's share of the carnê markup taken from this parcela, in BRL.\n\nFIN-4: derivable from the plan and the seller's configured share only\nuntil someone edits that share, at which point every past parcela would\nsilently re-derive at the new rate. Persisting it is what keeps\ncharge-vs-collected reconciliation true a year after the sale."},"netAmount":{"type":"number","nullable":true},"valueCoProducers":{"type":"number","nullable":true},"installmentPlanId":{"type":"object","nullable":true,"description":"Boleto parcelado (carnê) back-reference. Set on every parcela slip so\n`/transacoes` can roll the whole carnê up into one parent row instead of\nlisting twelve rows that each look like a separate sale (SPEC.md §7.2)."},"parcelaNumber":{"type":"number","nullable":true,"description":"1-based parcela index. Several transactions can share one number when a\nparcela is reissued (segunda via) — the expired slips stay for audit and\nonly the compensated one carries fees and commission."}},"required":["id","uuid","galaxPayId","gatewayProvider","gatewayChargeId","product","orderId","order","customer","affiliation","offerId","offer","value","valueSeller","valueAffiliate","chargedTotal","date","paymentMethod","installments","fator","code","boletoPdfUrl","deadline","status","scheduledChargeId","scheduledChargeCycleId","subscriptionId","subscription","isRecurring","billingReason","billingCycle","failureCode","failureReason","gatewayFailureCode","failedAt","refundedAt","refundAmount","refundReason","refundedByUserId","refundedByUser","refundedByApiKeyId","feePercent","feeFixed","feeTotalAmount","carneMarkupAmount","netAmount","valueCoProducers","installmentPlanId","parcelaNumber"]},"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"},"pixAutomatic":{"type":"boolean","description":"Per-product Pix Automático (Woovi recurring) enablement. Defaults true;\nsellers can disable per product when they don't want the recurring-Pix\ntab on a specific subscription product. Only the subscription checkout\nmode reads this flag."},"boletoInstallmentsEnabled":{"type":"boolean","description":"Boleto parcelado (carnê) opt-in. Defaults FALSE — this is the only rollout\ngate for the feature, so nothing changes for any existing product until a\nseller deliberately enables it (SPEC.md §12)."},"maxBoletoInstallments":{"type":"number","nullable":true,"description":"Cap on parcelas for this product, 2..12. NULL means \"up to the platform\nceiling\" when enabled. The fator formula divides by 11, so 12 is hard."},"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"}},"isPhysical":{"type":"boolean"},"weightGrams":{"type":"number","nullable":true},"lengthCm":{"type":"number","nullable":true},"widthCm":{"type":"number","nullable":true},"heightCm":{"type":"number","nullable":true},"variants":{"type":"array","items":{"$ref":"#/components/schemas/ProductVariant"}},"offers":{"description":"Named prices on this product (SPEC.md §3.1). `value` above stays the\ndefault a bare `/pay/:uuid` charges; an offer only applies when the link\ncarries `?offer=`.","type":"array","items":{"$ref":"#/components/schemas/ProductOffer"}}},"required":["id","name","description","image","value","boleto","creditCard","pix","pixAutomatic","boletoInstallmentsEnabled","maxBoletoInstallments","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","isPhysical","weightGrams","lengthCm","widthCm","heightCm","variants"]},"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"},"manualRefundConfirmed":{"type":"boolean","description":"Set to true to record the refund WITHOUT calling the processor. Required for Celcoin Pix and boleto, which Garu cannot refund on your behalf: return the money to the buyer yourself, then confirm here. Ignored for card and Woovi Pix, which are reversed automatically.","example":true}}},"GetReportSynthetic":{"type":"object","properties":{}},"ErrorResponseDto":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"},"path":{"type":"string"},"timestamp":{"type":"string"}},"required":["statusCode","message","path","timestamp"]},"CreateOfferRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"example":"Black Friday"},"value":{"type":"number","minimum":5,"description":"Preço em reais. Must be at least R$ 5,00, the platform minimum price; a lower value returns 400.","example":97},"slug":{"type":"string","nullable":true,"example":"black-friday"},"isActive":{"type":"boolean","default":true}},"required":["name","value"]},"UpdateOfferRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"example":"Black Friday"},"value":{"type":"number","minimum":5,"description":"Preço em reais. Must be at least R$ 5,00, the platform minimum price; a lower value returns 400.","example":97},"slug":{"type":"string","nullable":true,"example":"black-friday"},"isActive":{"type":"boolean"}}},"AppliedOfferResponse":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"Seller-facing label. The checkout does NOT render it (SPEC.md decision 18)."},"slug":{"type":"string","nullable":true}},"required":["id","name","slug"]},"ProductVariantResponse":{"type":"object","properties":{"id":{"type":"number"},"sku":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"options":{"type":"object","nullable":true},"price":{"type":"number","nullable":true},"image":{"type":"string","nullable":true},"weightGrams":{"type":"number","nullable":true},"lengthCm":{"type":"number","nullable":true},"widthCm":{"type":"number","nullable":true},"heightCm":{"type":"number","nullable":true},"externalVariantId":{"type":"string","nullable":true},"isActive":{"type":"boolean"}},"required":["id","sku","name","options","price","image","weightGrams","lengthCm","widthCm","heightCm","externalVariantId","isActive"]},"ProductResponse":{"type":"object","properties":{"appliedOffer":{"nullable":true,"description":"The offer this response is priced for, or null for the product's default\nprice. Every money figure below (`value`, `installments`,\n`boletoInstallmentOptions`, `valueWithComission`) is derived from it.","allOf":[{"$ref":"#/components/schemas/AppliedOfferResponse"}]},"offerUnavailable":{"type":"boolean","description":"The link carried an `?offer=` that is inactive or unknown. The checkout\nstill sells at the default price and tells the buyer (SPEC.md decision 6)."},"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"},"pixAutomatic":{"type":"boolean"},"installments":{"type":"array","items":{"type":"object"}},"boletoInstallmentsEnabled":{"type":"boolean","description":"True when this product may be sold as a carnê (SPEC.md §7.1)."},"boletoInstallmentOptions":{"description":"Every carnê option, fully quoted for the CDC Art. 52 block. Computed\nserver-side from the same `installmentValue()` the slips are registered\nwith — the checkout displays these figures and derives none of them.","type":"array","items":{"type":"object"}},"tags":{"type":"array","items":{"$ref":"#/components/schemas/Tag"}},"pixelFB":{"type":"string"},"hasFacebookPixel":{"type":"boolean"},"uuid":{"type":"string"},"isActive":{"type":"boolean"},"comission":{"type":"string"},"valueWithComission":{"type":"number"},"sellerName":{"type":"string"},"affiliateLink":{"type":"string"},"affiliateId":{"type":"number"},"affiliationId":{"type":"number"},"affiliationOrderAccept":{"type":"boolean"},"leadBond":{"type":"boolean"},"leadBondDirectVisit":{"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},"isPhysical":{"type":"boolean"},"weightGrams":{"type":"number","nullable":true},"lengthCm":{"type":"number","nullable":true},"widthCm":{"type":"number","nullable":true},"heightCm":{"type":"number","nullable":true},"variants":{"type":"array","items":{"$ref":"#/components/schemas/ProductVariantResponse"}},"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"]},"ProductVariantRequest":{"type":"object","properties":{"sku":{"type":"string"},"name":{"type":"string"},"options":{"type":"object"},"price":{"type":"number","minimum":0},"image":{"type":"string"},"weightGrams":{"type":"number","minimum":0},"lengthCm":{"type":"number","minimum":0},"widthCm":{"type":"number","minimum":0},"heightCm":{"type":"number","minimum":0},"externalVariantId":{"type":"string"}}},"CreateProductRequest":{"type":"object","properties":{"value":{"type":"number","minimum":0,"description":"Price in BRL (decimal reais). On create, omitting it is the same as 0. 0 means the product has no price, and is accepted. Any other price must be at least R$ 5,00, the platform minimum price; a price above 0 and below the minimum, or a negative price, returns 400. A product with no price cannot be sold through its payment link.","example":97},"name":{"type":"string"},"description":{"type":"string"},"image":{"type":"string"},"boleto":{"type":"boolean"},"creditCard":{"type":"boolean"},"pix":{"type":"boolean"},"pixAutomatic":{"type":"boolean"},"boletoInstallmentsEnabled":{"type":"boolean","description":"Opting in is the seller accepting the credit risk of a carnê (SPEC.md\n§7.0) — nobody guarantees a boleto, and unpaid parcelas are never\nadvanced. The dashboard gates the switch behind an explicit\nacknowledgement; this is the flag that switch writes."},"maxBoletoInstallments":{"type":"number","minimum":2,"maximum":12},"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"},"returnUrl":{"type":"string"},"returnUrlButtonText":{"type":"string"},"isPhysical":{"type":"boolean"},"weightGrams":{"type":"number","minimum":0},"lengthCm":{"type":"number","minimum":0},"widthCm":{"type":"number","minimum":0},"heightCm":{"type":"number","minimum":0},"variants":{"type":"array","items":{"$ref":"#/components/schemas/ProductVariantRequest"}}},"required":["name","image","tags","pixelFB"]},"UpdateProductRequest":{"type":"object","properties":{"value":{"type":"number","minimum":0,"description":"Price in BRL (decimal reais). On create, omitting it is the same as 0. 0 means the product has no price, and is accepted. Any other price must be at least R$ 5,00, the platform minimum price; a price above 0 and below the minimum, or a negative price, returns 400. A product with no price cannot be sold through its payment link.","example":97},"name":{"type":"string"},"description":{"type":"string"},"image":{"type":"string"},"boleto":{"type":"boolean"},"creditCard":{"type":"boolean"},"pix":{"type":"boolean"},"pixAutomatic":{"type":"boolean"},"boletoInstallmentsEnabled":{"type":"boolean","description":"Opting in is the seller accepting the credit risk of a carnê (SPEC.md\n§7.0) — nobody guarantees a boleto, and unpaid parcelas are never\nadvanced. The dashboard gates the switch behind an explicit\nacknowledgement; this is the flag that switch writes."},"maxBoletoInstallments":{"type":"number","minimum":2,"maximum":12},"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"},"returnUrl":{"type":"string"},"returnUrlButtonText":{"type":"string"},"isPhysical":{"type":"boolean"},"weightGrams":{"type":"number","minimum":0},"lengthCm":{"type":"number","minimum":0},"widthCm":{"type":"number","minimum":0},"heightCm":{"type":"number","minimum":0},"variants":{"type":"array","items":{"$ref":"#/components/schemas/ProductVariantRequest"}}}},"ProductPortalConfigRequest":{"type":"object","properties":{"businessName":{"type":"string","maxLength":120,"description":"Display name shown on the hosted payment page header."},"logoUrl":{"type":"string","maxLength":500,"format":"uri","description":"HTTPS URL of the logo image. PNG/JPG, recommended 4:1 aspect ratio."},"primaryColor":{"type":"string","pattern":"^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$","description":"Primary brand color in hex (e.g. \"#257264\"). Used for buttons and accents.","example":"#257264"},"allowCancelSubscription":{"type":"boolean","description":"Show the Cancel Subscription button on the customer portal."},"allowUpdatePaymentMethod":{"type":"boolean","description":"Show the Update Payment Method button."},"allowUpdateBillingInfo":{"type":"boolean","description":"Show the Update Billing Info button."},"allowViewInvoices":{"type":"boolean","description":"Show the Invoices tab on the customer portal."},"allowApplyCoupons":{"type":"boolean","description":"Allow customers to apply coupon codes at checkout."},"requireCancelReason":{"type":"boolean","description":"Force the customer to enter a reason on cancel."},"cancelAtPeriodEndOnly":{"type":"boolean","description":"Soft-cancel: the customer can only cancel at end of period (Stripe-style). Hard-cancel disabled."},"sendCancellationEmail":{"type":"boolean","description":"Email the customer when their subscription is canceled."},"sendPaymentMethodUpdatedEmail":{"type":"boolean","description":"Email the customer when their saved card is updated via the portal."},"customSuccessMessage":{"type":"string","maxLength":500,"description":"Free-form text shown on the post-payment success screen."},"customCancellationMessage":{"type":"string","maxLength":500,"description":"Free-form text shown on the cancellation confirmation screen."},"customWelcomeText":{"type":"string","maxLength":500,"description":"Free-form welcome text shown on the customer portal home."}}},"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"]},"CreateSellerRequest":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string","format":"email","description":"Ignored when inviteToken is sent: the invite e-mail is used."},"password":{"type":"string"},"document":{"type":"string"},"phone":{"type":"string","pattern":"/^\\d{10,13}$/","description":"Digits only, with country code and area code","example":"5511999998888"},"inviteToken":{"type":"string","maxLength":64,"description":"Token of the affiliate invite this signup comes from"}},"required":["name","email","password","document","phone"]},"SellerResponse":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"phone":{"type":"string"}},"required":["id","name","phone"]},"ConfirmEmailRequest":{"type":"object","properties":{"token":{"type":"string","maxLength":64,"description":"Token from the confirmation link sent by e-mail"}},"required":["token"]},"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"]},"PaymentMethodConfigDto":{"type":"object","properties":{"feePercent":{"type":"number","example":0.0899,"description":"Percentage fee (decimal). 0.0899 = 8.99%."},"feeFixed":{"type":"number","example":2.49,"description":"Fixed fee in BRL (or USD for intl-credit)."},"reservePercent":{"type":"number","example":0.04,"description":"Reserve percentage (decimal)."},"reserveDays":{"type":"number","example":30,"description":"Reserve hold period in days."}},"required":["feePercent","feeFixed","reservePercent","reserveDays"]},"EffectiveFeesDto":{"type":"object","properties":{"pix":{"$ref":"#/components/schemas/PaymentMethodConfigDto"},"credit":{"$ref":"#/components/schemas/PaymentMethodConfigDto"},"boleto":{"$ref":"#/components/schemas/PaymentMethodConfigDto"},"carne":{"description":"Carnê (boleto parcelado). Priced apart from `boleto` because the fee is charged on every parcela, so the same line reads very differently across twelve slips.","allOf":[{"$ref":"#/components/schemas/PaymentMethodConfigDto"}]},"intlCredit":{"$ref":"#/components/schemas/PaymentMethodConfigDto"},"chargebackFee":{"type":"number","example":50,"description":"Chargeback fee in BRL."},"withdrawalFee":{"type":"number","example":3.5,"description":"Withdrawal fee in BRL."}},"required":["pix","credit","boleto","carne","intlCredit","chargebackFee","withdrawalFee"]},"SellerFeesResponse":{"type":"object","properties":{"effective":{"$ref":"#/components/schemas/EffectiveFeesDto"},"settlementDays":{"type":"number","example":15,"description":"Days after a sale is booked until its money is released for withdrawal (D+X). The same for every payment method: it is the seller's own settlement, not a per-method value."},"updatedAt":{"type":"string","nullable":true,"example":"2026-03-12T14:00:00.000Z","description":"When the seller-specific fee overrides were last updated. Null if seller is on platform defaults."}},"required":["effective","settlementDays","updatedAt"]},"RequestMagicLinkRequest":{"type":"object","properties":{"document":{"type":"string","minLength":11,"maxLength":20,"description":"CPF (11 digits) or CNPJ (14 digits). Punctuation is stripped server-side.","example":"12345678901"}},"required":["document"]},"UpdateBillingEmailRequest":{"type":"object","properties":{"sellerId":{"type":"number","minimum":1,"description":"Seller ID for which to set the override."},"billingEmailOverride":{"type":"string","nullable":true,"format":"email","description":"Email to set as the override, or `null` to clear it and fall back to the per-seller last-used email or the global customer email."}},"required":["sellerId"]},"MarketingRegister":{"type":"object","properties":{"email":{"type":"string"}},"required":["email"]},"SendInvitedAffiliationRequest":{"type":"object","properties":{"affiliateEmail":{"type":"string","format":"email","description":"E-mail of the person to invite"},"productId":{"type":"string","description":"UUID of the product"}},"required":["affiliateEmail","productId"]},"AcceptAffiliationRequest":{"type":"object","properties":{"productId":{"type":"string","description":"UUID of the product whose invite is accepted"},"email":{"type":"string","description":"Ignored. The e-mail of the session is used."}},"required":["productId"]},"UpdateAffiliationRequest":{"type":"object","properties":{"commission":{"type":"number","minimum":1,"maximum":90,"description":"New commission percentage (1-90)"}},"required":["commission"]},"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"]},"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: at least 8 characters with an uppercase letter, a lowercase letter, a number and a symbol, and different from the current password","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"]},"OrderItemInputDto":{"type":"object","properties":{"variant_id":{"type":"number","description":"Preferred reference: the variant being ordered. When omitted, `product_id`\nis used and the product's own price/weight (the implicit default variant)\napplies."},"product_id":{"type":"number"},"quantity":{"type":"number","minimum":1}},"required":["quantity"]},"OrderCustomerDto":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"},"document":{"type":"string"},"phone":{"type":"string"},"zip_code":{"type":"string"},"street":{"type":"string"},"number":{"type":"string"},"complement":{"type":"string"},"neighborhood":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"}}},"CreateOrderDto":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemInputDto"}},"customer":{"$ref":"#/components/schemas/OrderCustomerDto"},"metadata":{"type":"object"},"client_reference_id":{"type":"string"}},"required":["items"]},"OrderItemResponseDto":{"type":"object","properties":{"id":{"type":"number"},"product_id":{"type":"number","nullable":true},"variant_id":{"type":"number","nullable":true},"product_name":{"type":"string"},"variant_name":{"type":"string","nullable":true},"sku":{"type":"string","nullable":true},"unit_price":{"type":"number"},"quantity":{"type":"number"},"line_subtotal":{"type":"number"}},"required":["id","product_id","variant_id","product_name","variant_name","sku","unit_price","quantity","line_subtotal"]},"OrderResponseDto":{"type":"object","properties":{"id":{"type":"number"},"uuid":{"type":"string"},"status":{"type":"string"},"currency":{"type":"string"},"items_subtotal":{"type":"number"},"freight_amount":{"type":"number"},"discount_amount":{"type":"number"},"order_total":{"type":"number"},"charged_total":{"type":"number","nullable":true},"customer_name":{"type":"string","nullable":true},"customer_email":{"type":"string","nullable":true},"customer_document":{"type":"string","nullable":true},"customer_phone":{"type":"string","nullable":true},"customer_zip_code":{"type":"string","nullable":true},"customer_street":{"type":"string","nullable":true},"customer_number":{"type":"string","nullable":true},"customer_complement":{"type":"string","nullable":true},"customer_neighborhood":{"type":"string","nullable":true},"customer_city":{"type":"string","nullable":true},"customer_state":{"type":"string","nullable":true},"transaction_id":{"type":"number","nullable":true},"external_order_id":{"type":"string","nullable":true},"external_platform":{"type":"string","nullable":true},"client_reference_id":{"type":"string","nullable":true},"metadata":{"type":"object"},"items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItemResponseDto"}},"created_at":{"format":"date-time","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","uuid","status","currency","items_subtotal","freight_amount","discount_amount","order_total","charged_total","customer_name","customer_email","customer_document","customer_phone","customer_zip_code","customer_street","customer_number","customer_complement","customer_neighborhood","customer_city","customer_state","transaction_id","external_order_id","external_platform","client_reference_id","metadata","items","created_at","updated_at"]},"OrderListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OrderResponseDto"}},"count":{"type":"number"},"total_count":{"type":"number"},"total_pages":{"type":"number"}},"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)"}}},"SetBillingEmailOverrideRequest":{"type":"object","properties":{"billingEmailOverride":{"type":"string","nullable":true,"description":"Billing email override for this customer for the calling seller. Set null to clear.","format":"email"}}},"PostponeParcelaRequest":{"type":"object","properties":{"newDueDate":{"type":"string","description":"New vencimento for this parcela, ISO date. Must be later than the current one and within 90 days of it. Siblings are never shifted (decision #21).","example":"2026-09-15"}},"required":["newDueDate"]},"CancelInstallmentPlanRequest":{"type":"object","properties":{"note":{"type":"string","description":"Why the carnê was cancelled. Recorded on the timeline (PCI-6).","example":"Comprador desistiu antes da segunda parcela"}}},"ScheduledChargeCycle":{"type":"object","properties":{"id":{"type":"object"},"scheduledChargeId":{"type":"object"},"scheduledCharge":{"$ref":"#/components/schemas/ScheduledCharge"},"cycleNumber":{"type":"number"},"dueDate":{"type":"string"},"amount":{"type":"number","description":"Snapshot from parent at creation; series price changes don't rewrite history."},"status":{"type":"object"},"transactionId":{"type":"number","nullable":true},"transaction":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Transaction"}]},"attemptCount":{"type":"number"},"lastError":{"type":"string","nullable":true},"failureCode":{"type":"string","nullable":true},"failureReason":{"type":"string","nullable":true},"gatewayFailureCode":{"type":"string","nullable":true},"nextRetryAt":{"format":"date-time","type":"string","nullable":true},"paidAt":{"format":"date-time","type":"string","nullable":true},"failedAt":{"format":"date-time","type":"string","nullable":true},"boletoBarcode":{"type":"string","nullable":true},"boletoPdfUrl":{"type":"string","nullable":true,"description":"Processor-hosted PDF, proxied through garu.com.br when served."},"boletoDueDate":{"type":"string","nullable":true,"description":"The current slip's payday. Diverges from `dueDate` after a segunda via.\nThe grace clock always measures from `dueDate`, never from this, or a\nreissue would restart the clock and the plan could never default."},"reissueCount":{"type":"number"},"providerCancelPending":{"type":"boolean","description":"Set when a terminal plan transition could not cancel the open slip at the\nprovider. An emitted boleto stays payable at any bank until it expires\nregardless of our DB state, so the emission cron retries these."},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","scheduledChargeId","scheduledCharge","cycleNumber","dueDate","amount","status","transactionId","transaction","attemptCount","lastError","failureCode","failureReason","gatewayFailureCode","nextRetryAt","paidAt","failedAt","boletoBarcode","boletoPdfUrl","boletoDueDate","reissueCount","providerCancelPending","createdAt","updatedAt"]},"ScheduledCharge":{"type":"object","properties":{"id":{"type":"object"},"sellerId":{"type":"number"},"seller":{"$ref":"#/components/schemas/Seller"},"customerId":{"type":"number"},"customer":{"$ref":"#/components/schemas/Customer"},"productId":{"type":"number","nullable":true},"product":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Product"}]},"amount":{"type":"number"},"description":{"type":"string","nullable":true},"type":{"type":"object"},"dueDate":{"type":"string"},"methods":{"type":"array","items":{"type":"object"}},"recurrence":{"type":"object","nullable":true},"status":{"type":"object"},"subscriptionId":{"type":"number","nullable":true},"trialEndsAt":{"format":"date-time","type":"string","nullable":true},"pendingTokenization":{"type":"boolean","description":"Deprecated; pay-now-card flow no longer uses this state."},"paymentMethodId":{"type":"number","nullable":true},"paymentMethod":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/PaymentMethod"}]},"cancelAtPeriodEnd":{"type":"boolean"},"externalReference":{"type":"string","nullable":true},"maxRecoveryDays":{"type":"number","nullable":true,"description":"Max days past `dueDate` the recovery sweep may still auto-bill this\ncharge if a daily run missed it. NULL falls back to the system default\n(SCHEDULED_CHARGE_MAX_RECOVERY_DAYS, default 14)."},"createdBy":{"type":"object"},"metadata":{"type":"object","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"},"cycles":{"type":"array","items":{"$ref":"#/components/schemas/ScheduledChargeCycle"}}},"required":["id","sellerId","seller","customerId","customer","productId","product","amount","description","type","dueDate","methods","recurrence","status","subscriptionId","trialEndsAt","pendingTokenization","paymentMethodId","paymentMethod","cancelAtPeriodEnd","externalReference","maxRecoveryDays","createdBy","metadata","createdAt","updatedAt","cycles"]},"InstallmentPlan":{"type":"object","properties":{"id":{"type":"object"},"uuid":{"type":"string","description":"Public identifier for /api/v1. Filled by the migration's\n`DEFAULT gen_random_uuid()`.\n\n`@Generated('uuid')` is not decoration: TypeORM only adds a column to the\nINSERT ... RETURNING clause when it is marked generated (or has a default,\nor is a create/update/version column). Without it the row in Postgres was\ncorrect while the object handed back by `save()` had `uuid: undefined` —\nso the create response, the refund 202 body and the `installment_plan.*`\nwebhooks all published `undefined` for the one field that identifies the\nplan publicly."},"sellerId":{"type":"number"},"seller":{"$ref":"#/components/schemas/Seller"},"customerId":{"type":"number"},"customer":{"$ref":"#/components/schemas/Customer"},"productId":{"type":"number"},"product":{"$ref":"#/components/schemas/Product"},"scheduledChargeId":{"type":"object","description":"The cycle container. One schedule per plan."},"scheduledCharge":{"$ref":"#/components/schemas/ScheduledCharge"},"installments":{"type":"number","description":"2..12. The fator formula divides by 11, so 12 is the platform ceiling."},"anchorDueDate":{"type":"string","description":"Parcela 1's due date. Parcela N is anchor + (N-1) months, always derived\nfrom here rather than stepped off the previous parcela."},"baseValue":{"type":"number","description":"Product price à vista."},"fator":{"type":"number","description":"Snapshotted: editing the product later must not rewrite this sale."},"parcelaAmount":{"type":"number","description":"installmentValue(baseValue, fator, installments) — one boleto's face value."},"totalScheduled":{"type":"number","description":"parcelaAmount × installments — what the buyer pays if every parcela clears."},"totalCollected":{"type":"number","description":"As actually received, INCLUDING multa/mora — so it may legitimately exceed\ntotalScheduled. Below totalScheduled on a `completed` plan is a\nreconciliation alert, not a rounding artefact (FIN-4)."},"status":{"type":"object"},"cancelReason":{"type":"object","nullable":true,"description":"Only a plan canceled by `activation_expiry` may be resurrected by a late\nparcela-1 payment — that cancel was our own housekeeping racing money in\nflight. A seller-initiated cancel is never undone (SPEC.md §6.4)."},"graceDays":{"type":"number","nullable":true,"description":"NULL → seller_config default → env default (15)."},"activatedAt":{"format":"date-time","type":"string","nullable":true},"defaultedAt":{"format":"date-time","type":"string","nullable":true},"refundRequestedAt":{"format":"date-time","type":"string","nullable":true},"completedAt":{"format":"date-time","type":"string","nullable":true},"canceledAt":{"format":"date-time","type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","uuid","sellerId","seller","customerId","customer","productId","product","scheduledChargeId","scheduledCharge","installments","anchorDueDate","baseValue","fator","parcelaAmount","totalScheduled","totalCollected","status","cancelReason","graceDays","activatedAt","defaultedAt","refundRequestedAt","completedAt","canceledAt","createdAt","updatedAt"]},"OpenRefundRequestRequest":{"type":"object","properties":{"installmentPlanId":{"type":"string","description":"Carnê to refund. Exactly one of installmentPlanId / transactionId must be supplied.","example":"iplan_01HXYZABCDEF"},"transactionId":{"type":"number","description":"PIX transaction to refund. Card refunds use the automated reversal instead.","example":4821},"amount":{"type":"number","description":"Amount to return in BRL. Defaults to everything collected on the carnê, or the transaction value for PIX.","example":390},"reason":{"type":"string","description":"Why the refund was asked for. Shown to the seller team.","example":"Comprador desistiu da compra"}}},"ResolveRefundRequestRequest":{"type":"object","properties":{"sellerNote":{"type":"string","description":"Note recorded against the decision. On a rejection this is what the buyer is owed an explanation from, so it is worth filling in.","example":"Reembolso enviado por Pix em 03/08"}}},"RefundRequest":{"type":"object","properties":{"id":{"type":"object"},"uuid":{"type":"string","description":"Public identifier for /api/v1. See the note on `InstallmentPlan.uuid`:\nwithout `@Generated('uuid')` TypeORM leaves this `undefined` on the saved\nobject, and the 202 from `POST /v1/charges/{uuid}/refund` omitted the very\nuuid its own docs tell the integrator to confirm with."},"sellerId":{"type":"number"},"seller":{"$ref":"#/components/schemas/Seller"},"installmentPlanId":{"type":"object","nullable":true,"description":"Exactly one of these is set — carnê requests target a plan, PIX requests\ntarget a transaction. Enforced by a DB CHECK, not just convention."},"installmentPlan":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/InstallmentPlan"}]},"transactionId":{"type":"number","nullable":true},"transaction":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Transaction"}]},"amount":{"type":"number"},"reason":{"type":"string","nullable":true},"status":{"type":"object"},"requestedBy":{"type":"object"},"resolvedBy":{"type":"object","nullable":true},"resolvedAt":{"format":"date-time","type":"string","nullable":true},"sellerNote":{"type":"string","nullable":true},"createdAt":{"format":"date-time","type":"string"},"updatedAt":{"format":"date-time","type":"string"}},"required":["id","uuid","sellerId","seller","installmentPlanId","installmentPlan","transactionId","transaction","amount","reason","status","requestedBy","resolvedBy","resolvedAt","sellerNote","createdAt","updatedAt"]},"RecurrenceConfigRequest":{"type":"object","properties":{"interval":{"type":"string","enum":["weekly","biweekly","monthly","bimonthly","quarterly","biannual","yearly"],"description":"Cadence between cycles."},"intervalCount":{"type":"number","minimum":1,"description":"Multiplier for the interval (default 1)."},"endsAfter":{"type":"number","minimum":1,"description":"Stop after N successful cycles."},"endsOn":{"type":"string","pattern":"/^\\d{4}-\\d{2}-\\d{2}$/","description":"Stop after this calendar date (YYYY-MM-DD, São Paulo TZ).","example":"2027-01-15"}},"required":["interval"]},"CreateScheduledChargeRequest":{"type":"object","properties":{"customerId":{"type":"number","minimum":1,"description":"Customer ID (must already be linked to the calling seller)"},"productId":{"type":"number","minimum":1,"description":"Optional product to associate with this charge"},"amount":{"type":"number","minimum":5,"description":"Amount in BRL (decimal, e.g. 297.50). Must be at least R$ 5,00, the platform minimum per charge; a lower value returns 400.","example":297.5},"description":{"type":"string","maxLength":500,"description":"Free-form description shown on the customer email and payment page"},"type":{"type":"string","enum":["one_time","recurring"],"description":"Schedule type. `recurring` requires a `recurrence` block; `one_time` must omit it."},"dueDate":{"type":"string","pattern":"/^\\d{4}-\\d{2}-\\d{2}$/","description":"Due date in YYYY-MM-DD (São Paulo TZ). Must be today or future.","example":"2026-05-15"},"methods":{"type":"array","enum":["pix","boleto","card","pix_automatic"],"uniqueItems":true,"minItems":1,"description":"Payment methods to offer. `card` and `pix_automatic` are only valid when `type=recurring` and a `productId` is set — cycle 1 captures a one-time authorization (card tokenization, or a Pix Automático consent the customer authorizes in their bank app) and cycles 2+ auto-charge it silently.","items":{"type":"string","enum":["pix","boleto","card","pix_automatic"]}},"recurrence":{"description":"Recurrence config. Required when `type=recurring`; must be omitted otherwise.","allOf":[{"$ref":"#/components/schemas/RecurrenceConfigRequest"}]},"externalReference":{"type":"string","maxLength":255,"description":"Seller-controlled identifier for this schedule (deduping, reconciliation)."},"metadata":{"type":"object","description":"Free-form metadata. Persisted as JSONB; not interpreted by Garu."},"trialDays":{"type":"number","minimum":1,"maximum":365,"description":"Free-trial duration in days. Only valid when `type=recurring`. When set, cycle 1 is scheduled at `today + trialDays` and a `customer.trial_started` webhook fires immediately.","example":7},"maxRecoveryDays":{"type":"number","minimum":1,"maximum":365,"description":"Max days past `dueDate` this charge may still be auto-billed by the daily recovery sweep if a run missed it. Omit to use the system default. Lower it for time-sensitive charges where billing late is worse than not billing.","example":14}},"required":["customerId","amount","type","dueDate","methods"]},"PostponeScheduledChargeRequest":{"type":"object","properties":{"newDueDate":{"type":"string","pattern":"/^\\d{4}-\\d{2}-\\d{2}$/","description":"New due date (YYYY-MM-DD). Must be today or future.","example":"2026-06-01"},"reason":{"type":"string","maxLength":500,"description":"Optional reason recorded on the schedule timeline."}},"required":["newDueDate"]},"PauseScheduledChargeRequest":{"type":"object","properties":{"reason":{"type":"string","maxLength":500,"description":"Optional reason recorded on the schedule timeline."}}},"CancelRecurrenceScheduledChargeRequest":{"type":"object","properties":{"reason":{"type":"string","maxLength":500,"description":"Optional reason recorded on the schedule timeline and audit log."}}},"CancelAtPeriodEndScheduledChargeRequest":{"type":"object","properties":{"enabled":{"type":"boolean","description":"When true, the cycle generator stops emitting new cycles after the next paid cycle. Reversible.","example":true}},"required":["enabled"]},"MarkPaidScheduledChargeRequest":{"type":"object","properties":{"paymentDate":{"type":"string","pattern":"/^\\d{4}-\\d{2}-\\d{2}$/","description":"Date the customer paid (YYYY-MM-DD). Recorded on the schedule timeline.","example":"2026-05-15"},"externalReference":{"type":"string","maxLength":255,"description":"Seller-side reference for the off-Garu payment (e.g. bank-transfer ID)."},"cycleNumber":{"type":"number","minimum":1,"description":"Cycle number to mark paid. REQUIRED for recurring schedules; ignored for one-time.","example":3}},"required":["paymentDate"]},"ChangePaymentMethodScheduledChargeRequest":{"type":"object","properties":{"paymentMethodId":{"type":"number","minimum":1,"description":"PaymentMethod id to bind to this recurring series. Must belong to the same customer and already bill one of your charges for that customer (a subscription, a scheduled charge or a past attempt); otherwise 404.","example":42}},"required":["paymentMethodId"]},"PayCycleWithCardRequest":{"type":"object","properties":{"holderName":{"type":"string","maxLength":60,"description":"Cardholder name as it appears on the card."},"cardNumber":{"type":"string","pattern":"/^\\d{13,19}$/","description":"Card number, digits only (no spaces or hyphens).","minLength":13,"maxLength":19},"expiry":{"type":"string","pattern":"/^\\d{4}-(0[1-9]|1[0-2])$/","description":"Card expiry in YYYY-MM format.","example":"2030-12"},"cvv":{"type":"string","minLength":3,"maxLength":4,"pattern":"/^\\d{3,4}$/","description":"CVV/CVC, 3–4 digits."}},"required":["holderName","cardNumber","expiry","cvv"]},"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"}]},"paymentMethod":{"type":"string","enum":["creditCard","pix_automatic"],"description":"Payment method for the subscription. Defaults to `creditCard`."},"creditCard":{"description":"Credit card information. Required when `paymentMethod=creditCard`.","allOf":[{"$ref":"#/components/schemas/SubscriptionCreditCardDto"}]}},"required":["subscriptionPriceId","customer"]},"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). Must be at least R$ 5,00, the platform minimum price; a lower value returns 400.","example":49.9,"minimum":5},"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":5,"description":"Unit amount in BRL. Must be at least R$ 5,00, the platform minimum price; a lower value returns 400."},"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"}}},"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"]},"ChargeCustomerDto":{"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","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","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","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)","example":"SP"}},"required":["name","email","document","phone"]},"ChargeCardDto":{"type":"object","properties":{"number":{"type":"string","pattern":"/^\\d{13,19}$/","description":"Número do cartão, 13 a 19 dígitos","example":"4111111111111111"},"holderName":{"type":"string","minLength":3,"maxLength":255,"description":"Nome do titular como impresso no cartão","example":"MARIA SILVA"},"expirationDate":{"type":"string","pattern":"/^\\d{4}-\\d{2}$/","description":"Validade no formato YYYY-MM","example":"2030-12"},"cvv":{"type":"string","pattern":"/^\\d{3,4}$/","description":"Código de segurança (3 ou 4 dígitos)","example":"123"},"installments":{"type":"number","minimum":1,"maximum":12,"description":"Número de parcelas (1 a 12)","example":1}},"required":["number","holderName","expirationDate","cvv","installments"]},"CreateChargeDto":{"type":"object","properties":{"productId":{"type":"string","description":"UUID do produto que está sendo cobrado","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"offer":{"type":"string","minLength":1,"maxLength":60,"description":"Oferta a aplicar: o identificador do link (ex.: `black-friday`) ou o id da oferta (`offer_...`). Substitui APENAS o preço — formas de pagamento, parcelamento e carnê continuam vindo do produto. Responde 409 se a oferta tiver sido desativada, e 400 em produto de assinatura, que usa preços de assinatura. Veja POST /v1/products/{id}/offers.","example":"black-friday"},"paymentMethod":{"enum":["pix","boleto","creditCard"],"type":"string","description":"Método de pagamento","example":"pix"},"customer":{"description":"Dados do cliente pagador","allOf":[{"$ref":"#/components/schemas/ChargeCustomerDto"}]},"card":{"description":"Dados do cartão. Obrigatório apenas quando paymentMethod = creditCard. ATENÇÃO: recebe PAN + CVV em texto claro — chame este endpoint apenas do seu servidor, em ambiente PCI-compliant, nunca do navegador ou de um app.","allOf":[{"$ref":"#/components/schemas/ChargeCardDto"}]},"checkoutSessionToken":{"type":"string","description":"Token de uma Checkout Session criada previamente, para atribuição","example":"cs_01HXYZABCDEF1234567890"},"additionalInfo":{"type":"string","description":"Informação livre anexada à cobrança","example":"pedido #4472"}},"required":["productId","paymentMethod","customer"]},"RefundChargeDto":{"type":"object","properties":{"amount":{"type":"number","minimum":0.01,"description":"Valor a estornar em BRL decimal (não centavos). Omita para estornar o total cobrado. O teto é o `chargedTotal` da cobrança.","example":50},"reason":{"type":"string","maxLength":500,"description":"Motivo do estorno","example":"Cliente desistiu"},"manualRefundConfirmed":{"type":"boolean","description":"Confirma que você já devolveu o valor ao comprador por fora. Obrigatório para Pix e boleto da Celcoin, que a Garu não consegue estornar por você: a cobrança é marcada como estornada sem nenhuma chamada ao processador. Ignorado para cartão e Pix Woovi.","example":true}}},"CreateCustomerDto":{"type":"object","properties":{"name":{"type":"string","description":"Customer name","example":"Maria Silva"},"email":{"type":"string","format":"email","description":"Customer email","example":"maria@exemplo.com.br"},"document":{"type":"string","pattern":"/^\\d{11}$|^\\d{14}$/","description":"CPF (11 digits) or CNPJ (14 digits), digits only"},"phone":{"type":"string","pattern":"/^\\d{10,11}$/","description":"Phone number, 10-11 digits with area code, digits only"},"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"]},"CustomerResponseDto":{"type":"object","properties":{"uuid":{"type":"string","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"name":{"type":"string","example":"Maria Silva"},"email":{"type":"string","example":"maria@exemplo.com.br"},"phone":{"type":"string","example":"11987654321"},"document":{"type":"string","example":"12345678909"},"personType":{"enum":["fisica","juridica"],"type":"string","example":"fisica"},"zipCode":{"type":"string","nullable":true,"example":"01310100"},"street":{"type":"string","nullable":true,"example":"Av. Paulista"},"number":{"type":"string","nullable":true,"example":"1000"},"complement":{"type":"string","nullable":true,"example":"Apto 10"},"neighborhood":{"type":"string","nullable":true,"example":"Bela Vista"},"city":{"type":"string","nullable":true,"example":"São Paulo"},"state":{"type":"string","nullable":true,"example":"SP"},"billingEmail":{"type":"string","example":"cobrancas@exemplo.com.br","description":"Resolved billing email for outbound seller→customer emails"},"hasBillingEmailOverride":{"type":"boolean","example":false,"description":"True when a sticky billing-email override is set"},"createdAt":{"format":"date-time","type":"string","example":"2026-01-15T10:30:00.000Z"},"updatedAt":{"format":"date-time","type":"string","example":"2026-01-15T10:30:00.000Z"}},"required":["uuid","name","email","phone","document","personType","billingEmail","hasBillingEmailOverride","createdAt","updatedAt"]},"CustomerListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/CustomerResponseDto"}},"count":{"type":"number","example":10,"description":"Items returned on this page"},"totalCount":{"type":"number","example":100,"description":"Total items matching the filter across all pages"},"totalPages":{"type":"number","example":10}},"required":["data","count","totalCount","totalPages"]},"UpdateCustomerDto":{"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 with area code"},"document":{"type":"string","pattern":"/^\\d{11}$|^\\d{14}$/","description":"CPF (11 digits) or CNPJ (14 digits), digits only"},"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)"}}},"SetBillingEmailOverrideDto":{"type":"object","properties":{"billingEmailOverride":{"type":"string","nullable":true,"format":"email","description":"Billing email override for this customer for the calling seller. Set null to clear."}}},"CreateInstallmentPlanDto":{"type":"object","properties":{"productId":{"type":"string","description":"Public uuid of the product being sold. It must have carnê enabled.","example":"40381e8e-6ee7-4b8e-9393-766a6e2109d2"},"customerId":{"type":"number","description":"Id of the customer who is buying, as returned by POST /api/customers. Numeric, not a uuid: customers predate the uuid convention and have no public uuid, so this matches the id the customer endpoints and MCP tools already hand out.","example":4821},"installments":{"type":"number","minimum":2,"maximum":12,"description":"How many monthly boletos. The platform ceiling is 12, and a seller may set a lower one per product. One parcela is not a carnê, so the minimum is 2.","example":12},"firstDueDate":{"type":"string","pattern":"/^\\d{4}-\\d{2}-\\d{2}$/","description":"Due date of parcela 1 as YYYY-MM-DD. Defaults to today. Must fall within the next 90 days. Every later parcela lands on the same day of each following month, computed from this anchor so a Jan-31 carnê does not drift after February.","example":"2026-09-05"},"affiliateId":{"type":"number","description":"Id of the affiliate who made this sale, if any. Fixed at sale time: every later parcela inherits it, so omitting it pays that affiliate nothing for the whole carnê. The affiliate must already have an active affiliation on this product.","example":5}},"required":["productId","customerId","installments"]},"PostponeInstallmentDto":{"type":"object","properties":{"newDueDate":{"type":"string","pattern":"/^\\d{4}-\\d{2}-\\d{2}$/","description":"New due date for THIS parcela only (YYYY-MM-DD). Its siblings keep their dates. A slip already emitted stays payable on its original date until it expires.","example":"2026-10-20"}},"required":["newDueDate"]},"CancelInstallmentPlanDto":{"type":"object","properties":{"note":{"type":"string","maxLength":500,"description":"Free-text note recorded on the cancellation event (audit trail, PCI-6)."}}},"RequestPlanRefundDto":{"type":"object","properties":{"amount":{"type":"number","description":"Amount to return, in reais. Defaults to everything the carnê has collected. Garu does not move this money; it records the request so you can transfer it and confirm.","example":390},"reason":{"type":"string","maxLength":500,"description":"Why the refund was asked for."}}},"CreateOfferDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"description":"Nome interno da oferta","example":"Black Friday"},"value":{"type":"number","minimum":5,"description":"Preço em reais (BRL). Must be at least R$ 5,00, the platform minimum price; a lower value returns 400.","example":97},"slug":{"type":"string","nullable":true,"description":"Identificador usado no link público (`?offer=black-friday`). Apenas letras minúsculas, números e hífens, de 3 a 40 caracteres, único por produto. Opcional — sem ele o link usa o id da oferta. ATENÇÃO: um slug é público e adivinhável; use o id para preços sensíveis.","example":"black-friday"},"isActive":{"type":"boolean","description":"Começa ativa. Padrão: true","default":true}},"required":["name","value"]},"OfferResponseDto":{"type":"object","properties":{"id":{"type":"string","example":"offer_1Hv7j4EGexuTiOU5BlLNGGuL"},"productUuid":{"type":"string","example":"b3f2c1e8-6e4a-4b9f-9d1c-2a1f6c3d4e5f"},"name":{"type":"string","example":"Black Friday"},"slug":{"type":"string","nullable":true,"example":"black-friday"},"value":{"type":"number","description":"Preço em reais (BRL)","example":97},"isActive":{"type":"boolean","example":true},"createdAt":{"format":"date-time","type":"string","example":"2026-09-11T14:22:01.000Z"},"updatedAt":{"format":"date-time","type":"string","example":"2026-09-11T14:22:01.000Z"}},"required":["id","productUuid","name","slug","value","isActive","createdAt","updatedAt"]},"OfferListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OfferResponseDto"}},"totalCount":{"type":"number","example":34},"totalPages":{"type":"number","example":2}},"required":["data","totalCount","totalPages"]},"UpdateOfferDto":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255,"example":"Black Friday"},"value":{"type":"number","minimum":5,"description":"Preço em reais (BRL). Must be at least R$ 5,00, the platform minimum price; a lower value returns 400.","example":97},"slug":{"type":"string","nullable":true,"description":"Identificador usado no link público (`?offer=black-friday`). Apenas letras minúsculas, números e hífens, de 3 a 40 caracteres, único por produto. Opcional — sem ele o link usa o id da oferta. ATENÇÃO: um slug é público e adivinhável; use o id para preços sensíveis."},"isActive":{"type":"boolean","description":"Desative para parar de vender por este link"}}},"CreateProductDto":{"type":"object","properties":{"name":{"type":"string","maxLength":255,"description":"Product name","example":"Premium Course"},"image":{"type":"string","description":"Product image URL","example":"https://example.com/image.jpg"},"value":{"type":"number","minimum":0,"description":"Product price in BRL (decimal reais). 0 means the product has no price, and is accepted. Any other price must be at least R$ 5,00, the platform minimum price; a price above 0 and below the minimum, or a negative price, returns 400. A product with no price cannot be sold through its payment link. Not checked when isSubscription is true: that price lives on the subscription prices.","example":297},"description":{"type":"string","description":"Product description","example":"A comprehensive course..."},"boleto":{"type":"boolean","description":"Enable boleto payment","default":false},"creditCard":{"type":"boolean","description":"Enable credit card payment","default":false},"pix":{"type":"boolean","description":"Enable PIX payment","default":false},"pixAutomatic":{"type":"boolean","description":"Offer Pix Automático (BACEN auto-debit) on the subscription checkout. Defaults to true — omit it to keep every subscription-capable product opted in.","default":true},"installments":{"type":"number","minimum":1,"description":"Maximum credit-card installments to offer","default":1},"isSubscription":{"type":"boolean","description":"Is this a subscription product","default":false},"subscriptionType":{"type":"string","description":"Subscription type (monthly, yearly, etc.)"},"unitLabel":{"type":"string","description":"Unit label (e.g., per user, per seat)"},"returnUrl":{"type":"string","maxLength":500,"description":"Return URL after successful payment"},"returnUrlButtonText":{"type":"string","maxLength":100,"description":"Text for return URL button"},"tags":{"description":"Product tags","type":"array","items":{"type":"string"}}},"required":["name","image","value"]},"InstallmentDto":{"type":"object","properties":{"quantity":{"type":"number","example":2,"description":"Number of installments (parcelas)"},"value":{"type":"number","example":153.45,"description":"Amount charged per installment in BRL"}},"required":["quantity","value"]},"ProductResponseDto":{"type":"object","properties":{"uuid":{"type":"string","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"name":{"type":"string","example":"Premium Course"},"description":{"type":"string","nullable":true,"example":"A comprehensive course..."},"image":{"type":"string","example":"https://example.com/image.jpg"},"value":{"type":"number","example":297,"description":"Base price in BRL"},"pix":{"type":"boolean","example":true},"creditCard":{"type":"boolean","example":true},"boleto":{"type":"boolean","example":false},"pixAutomatic":{"type":"boolean","example":false,"description":"Pix Automático (recurring) enabled"},"installments":{"type":"array","items":{"$ref":"#/components/schemas/InstallmentDto"}},"isSubscription":{"type":"boolean","example":false},"subscriptionType":{"type":"string","nullable":true,"example":"monthly"},"unitLabel":{"type":"string","nullable":true,"example":"per user"},"returnUrl":{"type":"string","nullable":true,"example":"https://example.com/success"},"returnUrlButtonText":{"type":"string","nullable":true,"example":"Access Content"},"isPhysical":{"type":"boolean","example":false},"isActive":{"type":"boolean","example":true},"tags":{"example":["course","premium"],"type":"array","items":{"type":"string"}},"createdAt":{"format":"date-time","type":"string","example":"2026-01-15T10:30:00.000Z"},"updatedAt":{"format":"date-time","type":"string","example":"2026-01-15T10:30:00.000Z"}},"required":["uuid","name","image","value","pix","creditCard","boleto","pixAutomatic","installments","isSubscription","isPhysical","isActive","createdAt","updatedAt"]},"ProductListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProductResponseDto"}},"count":{"type":"number","example":10,"description":"Items returned on this page"},"totalCount":{"type":"number","example":100,"description":"Total items matching the filter across all pages"},"totalPages":{"type":"number","example":10}},"required":["data","count","totalCount","totalPages"]},"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 (decimal reais). 0 means the product has no price, and is accepted. Any other price must be at least R$ 5,00, the platform minimum price; a price above 0 and below the minimum, or a negative price, returns 400. A product with no price cannot be sold through its payment link. Omit it to keep the current price: an existing product priced below the minimum keeps selling, and only a request that sets a price is checked.","example":297},"boleto":{"type":"boolean","description":"Enable boleto payment"},"creditCard":{"type":"boolean","description":"Enable credit card payment"},"pix":{"type":"boolean","description":"Enable PIX payment"},"pixAutomatic":{"type":"boolean","description":"Offer Pix Automático (BACEN auto-debit) on the subscription checkout. Setting it to false blocks new Pix Automático subscriptions on this product; subscriptions already active keep billing."},"installments":{"type":"number","minimum":1,"description":"Maximum credit-card installments to offer"},"isSubscription":{"type":"boolean","description":"Is this a subscription product"},"subscriptionType":{"type":"string","description":"Subscription type (monthly, yearly, etc.)"},"unitLabel":{"type":"string","description":"Unit label (e.g., per user, per seat)"},"returnUrl":{"type":"string","maxLength":500,"description":"Return URL after successful payment"},"returnUrlButtonText":{"type":"string","maxLength":100,"description":"Text for return URL button"},"tags":{"description":"Product tags","type":"array","items":{"type":"string"}}}},"ResolveRefundRequestDto":{"type":"object","properties":{"note":{"type":"string","maxLength":500,"description":"Note recorded against the resolution, kept for the audit trail (PCI-6)."}}},"AvailableMethodsResponseDto":{"type":"object","properties":{"methods":{"type":"array","items":{"type":"string","enum":["pix","boleto","card","pix_automatic"]}}},"required":["methods"]},"ScheduledChargeCustomerDto":{"type":"object","properties":{"id":{"type":"number","example":42},"name":{"type":"string","example":"Maria Silva"},"email":{"type":"string","example":"maria@exemplo.com.br"},"document":{"type":"string","example":"12345678909"}},"required":["id","name","email","document"]},"ScheduledChargeProductDto":{"type":"object","properties":{"id":{"type":"number","example":58},"uuid":{"type":"string","example":"a45b91a8-d0d9-4ff4-89c5-ffb0c6a65923"},"name":{"type":"string","example":"Plano Pro"}},"required":["id","uuid","name"]},"RecurrenceConfigResponseDto":{"type":"object","properties":{"interval":{"type":"string","enum":["weekly","biweekly","monthly","bimonthly","quarterly","biannual","yearly"]},"intervalCount":{"type":"number","example":1},"endsAfter":{"type":"number","example":12},"endsOn":{"type":"string","example":"2027-01-15"}},"required":["interval"]},"ScheduledChargeResponseDto":{"type":"object","properties":{"id":{"type":"string","example":"sch_a1b2c3d4e5f6"},"sellerId":{"type":"number","example":12},"customerId":{"type":"number","example":42},"productId":{"type":"number","nullable":true,"example":58},"customer":{"nullable":true,"description":"Present on list/get; omitted on mutation responses (postpone, pause, ...).","allOf":[{"$ref":"#/components/schemas/ScheduledChargeCustomerDto"}]},"product":{"nullable":true,"description":"Present on list/get; omitted on mutation responses (postpone, pause, ...).","allOf":[{"$ref":"#/components/schemas/ScheduledChargeProductDto"}]},"amount":{"type":"number","example":297.5,"description":"Decimal BRL, never centavos."},"description":{"type":"string","nullable":true,"example":"Assinatura mensal"},"type":{"type":"string","enum":["one_time","recurring"]},"dueDate":{"type":"string","example":"2026-05-15","description":"YYYY-MM-DD, São Paulo TZ."},"methods":{"type":"array","items":{"type":"string","enum":["pix","boleto","card","pix_automatic"]}},"recurrence":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/RecurrenceConfigResponseDto"}]},"status":{"type":"string","enum":["scheduled","due_today","overdue","paid","paused","canceled","trial","pending_tokenization","recurrence_canceled"]},"subscriptionId":{"type":"number","nullable":true,"example":null},"trialEndsAt":{"type":"string","nullable":true,"example":null,"description":"ISO-8601."},"cancelAtPeriodEnd":{"type":"boolean","example":false},"externalReference":{"type":"string","nullable":true,"example":null},"maxRecoveryDays":{"type":"number","nullable":true,"example":null},"metadata":{"type":"object","nullable":true,"example":null},"createdAt":{"type":"string","example":"2026-01-15T10:30:00.000Z"},"updatedAt":{"type":"string","example":"2026-01-15T10:30:00.000Z"}},"required":["id","sellerId","customerId","amount","type","dueDate","methods","status","cancelAtPeriodEnd","createdAt","updatedAt"]},"ScheduledChargeListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ScheduledChargeResponseDto"}},"count":{"type":"number","example":10,"description":"Items returned on this page"},"totalCount":{"type":"number","example":100,"description":"Total items matching the filter across all pages"},"totalPages":{"type":"number","example":10}},"required":["data","count","totalCount","totalPages"]},"ScheduledChargeEventResponseDto":{"type":"object","properties":{"id":{"type":"number","example":501},"scheduledChargeId":{"type":"string","example":"sch_a1b2c3d4e5f6"},"eventType":{"type":"string","enum":["created","postponed","paused","resumed","recurrence_canceled","manually_marked_paid","paid","overdue_reminder_sent","d_day_reminder_sent"]},"actor":{"type":"object"},"payload":{"type":"object","nullable":true},"createdAt":{"type":"string","example":"2026-01-15T10:30:00.000Z"}},"required":["id","scheduledChargeId","eventType","actor","createdAt"]},"ScheduledChargeLinkedTransactionDto":{"type":"object","properties":{"id":{"type":"number","example":999},"value":{"type":"number","example":297.5,"description":"Decimal BRL, never centavos."},"paymentMethod":{"type":"string","example":"pix"},"status":{"type":"string","example":"paid"},"date":{"type":"string","example":"2026-05-15T10:30:00.000Z"},"refundedAt":{"type":"string","nullable":true,"example":null}},"required":["id","value","paymentMethod","status","date"]},"ScheduledChargeDetailResponseDto":{"type":"object","properties":{"charge":{"$ref":"#/components/schemas/ScheduledChargeResponseDto"},"events":{"type":"array","items":{"$ref":"#/components/schemas/ScheduledChargeEventResponseDto"}},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/ScheduledChargeLinkedTransactionDto"}}},"required":["charge","events","transactions"]},"ScheduledChargeAttemptResponseDto":{"type":"object","properties":{"id":{"type":"number","example":1},"cycleId":{"type":"string","example":"cyc_abc123"},"cycleNumber":{"type":"number","example":3},"attemptNumber":{"type":"number","example":1},"attemptedAt":{"type":"string","example":"2026-05-15T10:30:00.000Z"},"source":{"type":"string","enum":["cycle1_interactive","silent_charge","card_retry","manual_mark_paid","fallback_pix"]},"paymentMethod":{"type":"string","enum":["card","pix","boleto","pix_automatic","manual"]},"paymentMethodId":{"type":"number","nullable":true,"example":null},"cardLast4":{"type":"string","nullable":true,"example":null},"cardBrand":{"type":"string","nullable":true,"example":null},"status":{"type":"string","enum":["pending","succeeded","declined","canceled","errored"]},"failureCode":{"type":"string","nullable":true,"example":null},"failureReason":{"type":"string","nullable":true,"example":null},"gatewayFailureCode":{"type":"string","nullable":true,"example":null},"gatewayChargeId":{"type":"number","nullable":true,"example":null},"transactionId":{"type":"number","nullable":true,"example":null}},"required":["id","cycleId","cycleNumber","attemptNumber","attemptedAt","source","paymentMethod","status"]},"ScheduledChargeAttemptListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ScheduledChargeAttemptResponseDto"}},"count":{"type":"number","example":10},"totalCount":{"type":"number","example":100},"totalPages":{"type":"number","example":10}},"required":["data","count","totalCount","totalPages"]},"RecurrenceConfigDto":{"type":"object","properties":{"interval":{"type":"string","enum":["weekly","biweekly","monthly","bimonthly","quarterly","biannual","yearly"],"description":"Cadence between cycles."},"intervalCount":{"type":"number","minimum":1,"description":"Multiplier for the interval (default 1)."},"endsAfter":{"type":"number","minimum":1,"description":"Stop after N successful cycles."},"endsOn":{"type":"string","pattern":"/^\\d{4}-\\d{2}-\\d{2}$/","description":"Stop after this calendar date (YYYY-MM-DD, São Paulo TZ).","example":"2027-01-15"}},"required":["interval"]},"CreateScheduledChargeDto":{"type":"object","properties":{"customerId":{"type":"number","minimum":1,"description":"Customer ID (must already be linked to the calling seller)"},"productId":{"type":"number","minimum":1,"description":"Optional product to associate with this charge"},"amount":{"type":"number","minimum":5,"description":"Amount in BRL (decimal, e.g. 297.50). Must be at least R$ 5,00, the platform minimum per charge; a lower value returns 400.","example":297.5},"description":{"type":"string","maxLength":500,"description":"Free-form description shown on the customer email and payment page"},"type":{"type":"string","enum":["one_time","recurring"],"description":"Schedule type. `recurring` requires a `recurrence` block; `one_time` must omit it."},"dueDate":{"type":"string","pattern":"/^\\d{4}-\\d{2}-\\d{2}$/","description":"Due date in YYYY-MM-DD (São Paulo TZ). Must be today or future.","example":"2026-05-15"},"methods":{"type":"array","enum":["pix","boleto","card","pix_automatic"],"uniqueItems":true,"minItems":1,"description":"Payment methods to offer. `card` and `pix_automatic` are only valid when `type=recurring` and a `productId` is set — cycle 1 captures a one-time authorization (card tokenization, or a Pix Automático consent the customer authorizes in their bank app) and cycles 2+ auto-charge it silently.","items":{"type":"string","enum":["pix","boleto","card","pix_automatic"]}},"recurrence":{"description":"Recurrence config. Required when `type=recurring`; must be omitted otherwise.","allOf":[{"$ref":"#/components/schemas/RecurrenceConfigDto"}]},"externalReference":{"type":"string","maxLength":255,"description":"Seller-controlled identifier for this schedule (deduping, reconciliation)."},"metadata":{"type":"object","description":"Free-form metadata. Persisted as JSONB; not interpreted by Garu."},"trialDays":{"type":"number","minimum":1,"maximum":365,"description":"Free-trial duration in days. Only valid when `type=recurring`. When set, cycle 1 is scheduled at `today + trialDays` and a `customer.trial_started` webhook fires immediately.","example":7},"maxRecoveryDays":{"type":"number","minimum":1,"maximum":365,"description":"Max days past `dueDate` this charge may still be auto-billed by the daily recovery sweep if a run missed it. Omit to use the system default. Lower it for time-sensitive charges where billing late is worse than not billing.","example":14}},"required":["customerId","amount","type","dueDate","methods"]},"ChargeNowResultDto":{"type":"object","properties":{"outcome":{"type":"string","enum":["dispatched","already_sent","failed","not_sent"]},"cycleNumber":{"type":"number","nullable":true,"example":3},"reason":{"type":"string","example":null,"nullable":true},"message":{"type":"string","example":"Cobrança enviada agora."}},"required":["outcome","message"]},"PostponeScheduledChargeDto":{"type":"object","properties":{"newDueDate":{"type":"string","pattern":"/^\\d{4}-\\d{2}-\\d{2}$/","description":"New due date (YYYY-MM-DD). Must be today or future.","example":"2026-06-01"},"reason":{"type":"string","maxLength":500,"description":"Optional reason recorded on the schedule timeline."}},"required":["newDueDate"]},"PauseScheduledChargeDto":{"type":"object","properties":{"reason":{"type":"string","maxLength":500,"description":"Optional reason recorded on the schedule timeline."}}},"CancelRecurrenceScheduledChargeDto":{"type":"object","properties":{"reason":{"type":"string","maxLength":500,"description":"Optional reason recorded on the schedule timeline and audit log."}}},"CancelAtPeriodEndScheduledChargeDto":{"type":"object","properties":{"enabled":{"type":"boolean","description":"When true, the cycle generator stops emitting new cycles after the next paid cycle. Reversible.","example":true}},"required":["enabled"]},"MarkPaidScheduledChargeDto":{"type":"object","properties":{"paymentDate":{"type":"string","pattern":"/^\\d{4}-\\d{2}-\\d{2}$/","description":"Date the customer paid (YYYY-MM-DD). Recorded on the schedule timeline.","example":"2026-05-15"},"externalReference":{"type":"string","maxLength":255,"description":"Seller-side reference for the off-Garu payment (e.g. bank-transfer ID)."},"cycleNumber":{"type":"number","minimum":1,"description":"Cycle number to mark paid. REQUIRED for recurring schedules; ignored for one-time.","example":3}},"required":["paymentDate"]},"ChangePaymentMethodScheduledChargeDto":{"type":"object","properties":{"paymentMethodId":{"type":"number","minimum":1,"description":"PaymentMethod id to bind to this recurring series. Must belong to the same customer and already bill one of your charges for that customer (a subscription, a scheduled charge or a past attempt); otherwise 404.","example":42}},"required":["paymentMethodId"]},"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":5,"description":"Amount charged every cycle, in BRL (decimal reais). Must be at least R$ 5,00, the platform minimum price; a lower value returns 400.","example":29.9},"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","description":"Amount charged every cycle, in BRL (decimal reais)","example":29.9},"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"}}},"WebhookEventEndpointDto":{"type":"object","properties":{"id":{"type":"number","example":17},"url":{"type":"string","example":"https://example.com/webhooks/garu"},"description":{"type":"string","nullable":true,"example":"Production endpoint"},"enabled":{"type":"boolean","example":true},"events":{"example":["transaction.payment.paid"],"type":"array","items":{"type":"string"}}},"required":["id","url","enabled","events"]},"WebhookEventResponseDto":{"type":"object","properties":{"uuid":{"type":"string","example":"a1b2c3d4-e5f6-7890-abcd-ef1234567890"},"webhookEndpoint":{"$ref":"#/components/schemas/WebhookEventEndpointDto"},"eventType":{"type":"string","example":"transaction.payment.paid"},"payload":{"type":"object","description":"Full JSON payload posted (or to be posted)"},"status":{"enum":["pending","success","failed"],"type":"string","example":"success"},"attempts":{"type":"number","example":1},"lastAttemptAt":{"format":"date-time","type":"string","nullable":true,"example":"2026-01-15T10:30:00.000Z"},"nextRetryAt":{"format":"date-time","type":"string","nullable":true,"example":null},"responseStatus":{"type":"number","nullable":true,"example":200},"responseBody":{"type":"string","nullable":true,"example":"OK"},"manualResendOf":{"type":"string","nullable":true,"example":null,"description":"uuid of the source event, when this row is a clone produced by resend"},"createdAt":{"format":"date-time","type":"string","example":"2026-01-15T10:30:00.000Z"}},"required":["uuid","webhookEndpoint","eventType","payload","status","attempts","createdAt"]},"WebhookEventListResponseDto":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEventResponseDto"}},"count":{"type":"number","example":10,"description":"Items returned on this page"},"totalCount":{"type":"number","example":100,"description":"Total items matching the filter across all pages"},"totalPages":{"type":"number","example":10}},"required":["data","count","totalCount","totalPages"]},"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"}}},"TriggerWebhookEndpointRequest":{"type":"object","properties":{"event":{"type":"string","description":"Event type to trigger. Must be in the manual-test whitelist and the endpoint must already be subscribed to it.","example":"transaction.payment.failed"},"payloadOverrides":{"type":"object","description":"Shallow-merged into the sample payload's data.object so callers can pin specific values (e.g. failureCode='card_expired').","example":{"failureCode":"card_expired"}}},"required":["event"]},"OutgoingWebhookEvent":{"type":"object","properties":{"id":{"type":"number"},"uuid":{"type":"string","description":"Public identifier for the WebhookEvent resource\n(`/api/v1/webhook-events/{uuid}`). Generated by a DB-level\n`DEFAULT gen_random_uuid()`, never derived in app code."},"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},"manualResendOf":{"type":"number","nullable":true},"createdAt":{"format":"date-time","type":"string"}},"required":["id","uuid","endpointId","webhookEndpoint","eventType","payload","status","attempts","lastAttemptAt","nextRetryAt","responseStatus","responseBody","manualResendOf","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"]}}}}