{"openapi":"3.1.0","info":{"title":"Quentli REST API","version":"1.0.0","description":"OpenAPI spec for Quentli REST endpoints."},"servers":[{"url":"https://api.quentli.com","description":"Production API"},{"url":"https://api.staging.quentli.com","description":"Staging API for production-like validation"}],"security":[{"organizationApiKey":[]}],"tags":[{"name":"Auth"},{"name":"Billing"},{"name":"Catalog"},{"name":"Customers"},{"name":"Invoices"},{"name":"Payment Methods"},{"name":"Payment Sessions"},{"name":"Payments"},{"name":"Subscriptions"},{"name":"Tax Invoices"},{"name":"Webhooks"}],"components":{"securitySchemes":{"organizationApiKey":{"type":"http","scheme":"bearer","description":"Organization API key using `Authorization: Bearer sk_...`."}},"schemas":{"InvoiceWebhookData":{"type":"object","properties":{"invoice":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"number","description":"Invoice amount in minor currency units."},"currency":{"type":"string","description":"ISO 4217 currency code."},"dueDate":{"type":"string","format":"date-time","description":"Date when invoice payment is due."},"expireDate":{"type":["string","null"],"format":"date-time","description":"Date after which the invoice can no longer be paid."},"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"Line item description."},"amount":{"type":"number","description":"Unit amount in minor currency units."},"currency":{"type":"string","description":"ISO 4217 currency code."},"quantity":{"type":"number","description":"Number of units."},"conceptId":{"type":"string","description":"Payment concept identifier."}},"required":["description","amount","currency","quantity","conceptId"]}},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Metadata key."},"value":{"type":"string","description":"Metadata value."}},"required":["key","value"],"description":"Custom key-value metadata entry."},"description":"Structured metadata entries."},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Flattened metadata key-value map."}},"required":["id","amount","currency","dueDate","expireDate","items","metadata","meta"]},"invoiceId":{"type":"string"},"amount":{"type":"number","description":"Amount associated with the invoice event in minor currency units."},"description":{"type":"string","description":"Human-readable description of the invoice event."},"payment":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"number","description":"Payment amount in minor currency units."},"currency":{"type":"string","description":"ISO 4217 currency code."},"paymentTime":{"type":["string","null"],"format":"date-time","description":"When the payment completed, if applicable."},"type":{"type":["string","null"],"description":"Payment method type, if available."},"authorizationCode":{"type":["string","null"],"description":"Processor authorization code, if available."},"cardDetail":{"type":["object","null"],"properties":{"id":{"type":"string"},"cardholder":{"type":["string","null"],"description":"Name printed on the card, if available."},"last4":{"type":"string","description":"Last four digits of the card."},"brand":{"type":"string","description":"Card brand."},"expiryMonth":{"type":"integer","description":"Card expiration month."},"expiryYear":{"type":"integer","description":"Card expiration year."},"funding":{"type":["string","null"],"description":"Card funding category, such as CREDIT or DEBIT."},"issuer":{"type":["string","null"],"description":"Card issuing bank or institution, if available."},"country":{"type":["string","null"],"description":"ISO country code of the card issuer, if available."}},"required":["id","cardholder","last4","brand","expiryMonth","expiryYear","funding","issuer","country"]},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Metadata key."},"value":{"type":"string","description":"Metadata value."}},"required":["key","value"],"description":"Custom key-value metadata entry."},"description":"Structured metadata entries."},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Flattened metadata key-value map."},"monthlyInstallments":{"type":["integer","null"]}},"required":["id","amount","currency","paymentTime","type","authorizationCode","metadata","meta","monthlyInstallments"]},"customer":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"],"description":"Customer display name."},"email":{"type":["string","null"],"description":"Customer email address, if available."},"phoneNumber":{"type":["string","null"],"description":"Customer phone number, if available."},"username":{"type":"string","description":"Customer username used for identification."},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Metadata key."},"value":{"type":"string","description":"Metadata value."}},"required":["key","value"],"description":"Custom key-value metadata entry."},"description":"Structured metadata entries."},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Flattened metadata key-value map."},"customerId":{"type":"string","description":"Customer identifier associated with the invoice."}},"required":["id","name","email","phoneNumber","username","metadata","meta","customerId"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"Organization display name."}},"required":["id","name"],"description":"Organization associated with the event."},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Metadata key."},"value":{"type":"string","description":"Metadata value."}},"required":["key","value"],"description":"Custom key-value metadata entry."},"description":"Structured metadata entries."},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Flattened metadata key-value map."},"formAnswers":{"type":"object","additionalProperties":{"type":"string"},"description":"Flattened metadata key-value map."}},"required":["invoice","invoiceId","amount","description","organization","metadata","meta"],"description":"Event-specific payload data."},"CustomerWebhookData":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"],"description":"Customer display name."},"email":{"type":["string","null"],"description":"Customer email address, if available."},"phoneNumber":{"type":["string","null"],"description":"Customer phone number, if available."},"username":{"type":"string","description":"Customer username used for identification."},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Metadata key."},"value":{"type":"string","description":"Metadata value."}},"required":["key","value"],"description":"Custom key-value metadata entry."},"description":"Structured metadata entries."},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Flattened metadata key-value map."}},"required":["id","name","email","phoneNumber","username","metadata","meta"],"description":"Event-specific payload data."},"PaymentAttemptWebhookData":{"type":"object","properties":{"paymentAttempt":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 timestamp."},"success":{"type":"boolean","description":"Whether the payment attempt succeeded."},"startedOn":{"type":["string","null"],"description":"Payment attempt start category, if available."},"automatic":{"type":"boolean","description":"Whether the attempt was triggered automatically."},"scheduled":{"type":"boolean","description":"Whether the attempt was scheduled in advance."},"wasAttemptedByOrganization":{"type":"boolean","description":"Whether the organization initiated the attempt."},"attemptNumber":{"type":"integer","description":"Sequential attempt number for the payment."},"errorCode":{"type":["string","null"],"description":"Processor error code when the attempt failed."},"errorType":{"type":["string","null"],"description":"Normalized error category when the attempt failed."},"errorResponse":{"type":["string","null"],"description":"Processor error response when the attempt failed."}},"required":["id","createdAt","success","startedOn","automatic","scheduled","wasAttemptedByOrganization","attemptNumber","errorCode","errorType","errorResponse"]},"payment":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"number","description":"Payment amount in minor currency units."},"currency":{"type":"string","description":"ISO 4217 currency code."},"type":{"type":["string","null"],"description":"Payment method type, if available."},"status":{"type":["string","null"],"description":"Current payment status, if available."},"isCompleted":{"type":"boolean","description":"Whether the payment is fully settled."},"authorizationCode":{"type":["string","null"],"description":"Processor authorization code, if available."},"cardDetail":{"type":["object","null"],"properties":{"id":{"type":"string"},"cardholder":{"type":["string","null"],"description":"Name printed on the card, if available."},"last4":{"type":"string","description":"Last four digits of the card."},"brand":{"type":"string","description":"Card brand."},"expiryMonth":{"type":"integer","description":"Card expiration month."},"expiryYear":{"type":"integer","description":"Card expiration year."},"funding":{"type":["string","null"],"description":"Card funding category, such as CREDIT or DEBIT."},"issuer":{"type":["string","null"],"description":"Card issuing bank or institution, if available."},"country":{"type":["string","null"],"description":"ISO country code of the card issuer, if available."}},"required":["id","cardholder","last4","brand","expiryMonth","expiryYear","funding","issuer","country"],"description":"Sanitized card details, if the payment used a card."},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Metadata key."},"value":{"type":"string","description":"Metadata value."}},"required":["key","value"],"description":"Custom key-value metadata entry."},"description":"Structured metadata entries."},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Flattened metadata key-value map."}},"required":["id","amount","currency","type","status","isCompleted","authorizationCode","cardDetail","metadata","meta"]},"customer":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"],"description":"Customer display name."},"email":{"type":["string","null"],"description":"Customer email address, if available."},"phoneNumber":{"type":["string","null"],"description":"Customer phone number, if available."},"username":{"type":"string","description":"Customer username used for identification."},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Metadata key."},"value":{"type":"string","description":"Metadata value."}},"required":["key","value"],"description":"Custom key-value metadata entry."},"description":"Structured metadata entries."},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Flattened metadata key-value map."}},"required":["id","name","email","phoneNumber","username","metadata","meta"]},"paymentSession":{"type":["object","null"],"properties":{"id":{"type":"string"},"returnUrl":{"type":["string","null"],"description":"URL used after a successful checkout."},"cancelUrl":{"type":["string","null"],"description":"URL used when the payer cancels checkout."},"totalAmount":{"type":"number","description":"Total session amount in minor currency units."},"currency":{"type":"string","description":"ISO 4217 currency code."},"status":{"type":"string","description":"Current payment session status."},"displayMode":{"type":"string","description":"How the checkout was presented to the payer."},"origin":{"type":"string","description":"Source that created the payment session."},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Metadata key."},"value":{"type":"string","description":"Metadata value."}},"required":["key","value"],"description":"Custom key-value metadata entry."},"description":"Structured metadata entries."},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Flattened metadata key-value map."}},"required":["id","returnUrl","cancelUrl","totalAmount","currency","status","displayMode","origin","metadata","meta"]}},"required":["paymentAttempt","payment","customer","paymentSession"],"description":"Event-specific payload data."},"PaymentCompletedWebhookData":{"type":"object","properties":{"payment":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"number","description":"Payment amount in minor currency units."},"currency":{"type":"string","description":"ISO 4217 currency code."},"paymentTime":{"type":["string","null"],"format":"date-time","description":"When the payment completed, if applicable."},"type":{"type":["string","null"],"description":"Payment method type, if available."},"authorizationCode":{"type":["string","null"],"description":"Processor authorization code, if available."},"cardDetail":{"type":["object","null"],"properties":{"id":{"type":"string"},"cardholder":{"type":["string","null"],"description":"Name printed on the card, if available."},"last4":{"type":"string","description":"Last four digits of the card."},"brand":{"type":"string","description":"Card brand."},"expiryMonth":{"type":"integer","description":"Card expiration month."},"expiryYear":{"type":"integer","description":"Card expiration year."},"funding":{"type":["string","null"],"description":"Card funding category, such as CREDIT or DEBIT."},"issuer":{"type":["string","null"],"description":"Card issuing bank or institution, if available."},"country":{"type":["string","null"],"description":"ISO country code of the card issuer, if available."}},"required":["id","cardholder","last4","brand","expiryMonth","expiryYear","funding","issuer","country"],"description":"Sanitized card details, if the payment used a card."},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Metadata key."},"value":{"type":"string","description":"Metadata value."}},"required":["key","value"],"description":"Custom key-value metadata entry."},"description":"Structured metadata entries."},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Flattened metadata key-value map."}},"required":["id","amount","currency","paymentTime","type","authorizationCode","cardDetail","metadata","meta"]},"items":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"number","description":"Unit amount in minor currency units."},"currency":{"type":"string","description":"ISO 4217 currency code."},"description":{"type":"string","description":"Line item description."},"quantity":{"type":"number","description":"Number of units."},"conceptId":{"type":["string","null"],"description":"Related payment concept identifier, if any."},"concept":{"type":["object","null"],"properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 timestamp."},"updatedAt":{"type":"string","format":"date-time","description":"ISO 8601 timestamp."},"amount":{"type":"integer","description":"Unit price in minor currency units."},"currency":{"type":"string","description":"ISO 4217 currency code."},"displayName":{"type":"string","description":"Product or service name shown to customers."},"description":{"type":["string","null"],"description":"Longer product or service description, if available."},"sku":{"type":["string","null"],"description":"Internal stock-keeping unit, if configured."},"organizationId":{"type":"string"},"active":{"type":"boolean","description":"Whether the concept is available for use."},"recurrentDetailId":{"type":["string","null"],"description":"Recurrence configuration identifier, if applicable."},"amountEditable":{"type":"boolean","description":"Whether the payer can customize the amount."},"quantityEditable":{"type":"boolean","description":"Whether the payer can customize the quantity."},"archivedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp."},"archivedById":{"type":["string","null"]},"oneOff":{"type":"boolean","description":"Whether the concept represents a one-time charge."},"groupId":{"type":["string","null"]},"createdById":{"type":["string","null"]},"updatedById":{"type":["string","null"]},"group":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string","description":"Display name of the payment concept group."}},"required":["id","name"]},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Metadata key."},"value":{"type":"string","description":"Metadata value."}},"required":["key","value"],"description":"Custom key-value metadata entry."},"description":"Structured metadata entries."},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Flattened metadata key-value map."}},"required":["id","createdAt","updatedAt","amount","currency","displayName","description","sku","organizationId","active","recurrentDetailId","amountEditable","quantityEditable","archivedAt","archivedById","oneOff","groupId","createdById","updatedById","group","metadata","meta"],"description":"Resolved payment concept, if available."}},"required":["amount","currency","description","quantity","conceptId","concept"]}},"relatedInvoices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Metadata key."},"value":{"type":"string","description":"Metadata value."}},"required":["key","value"],"description":"Custom key-value metadata entry."},"description":"Structured metadata entries."},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Flattened metadata key-value map."},"items":{"type":"array","items":{"type":"object","properties":{"amount":{"type":"number","description":"Unit amount in minor currency units."},"currency":{"type":"string","description":"ISO 4217 currency code."},"description":{"type":"string","description":"Line item description."},"quantity":{"type":"number","description":"Number of units."},"conceptId":{"type":["string","null"],"description":"Related payment concept identifier, if any."},"concept":{"type":["object","null"],"properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 timestamp."},"updatedAt":{"type":"string","format":"date-time","description":"ISO 8601 timestamp."},"amount":{"type":"integer","description":"Unit price in minor currency units."},"currency":{"type":"string","description":"ISO 4217 currency code."},"displayName":{"type":"string","description":"Product or service name shown to customers."},"description":{"type":["string","null"],"description":"Longer product or service description, if available."},"sku":{"type":["string","null"],"description":"Internal stock-keeping unit, if configured."},"organizationId":{"type":"string"},"active":{"type":"boolean","description":"Whether the concept is available for use."},"recurrentDetailId":{"type":["string","null"],"description":"Recurrence configuration identifier, if applicable."},"amountEditable":{"type":"boolean","description":"Whether the payer can customize the amount."},"quantityEditable":{"type":"boolean","description":"Whether the payer can customize the quantity."},"archivedAt":{"type":["string","null"],"format":"date-time","description":"ISO 8601 timestamp."},"archivedById":{"type":["string","null"]},"oneOff":{"type":"boolean","description":"Whether the concept represents a one-time charge."},"groupId":{"type":["string","null"]},"createdById":{"type":["string","null"]},"updatedById":{"type":["string","null"]},"group":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string","description":"Display name of the payment concept group."}},"required":["id","name"]},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Metadata key."},"value":{"type":"string","description":"Metadata value."}},"required":["key","value"],"description":"Custom key-value metadata entry."},"description":"Structured metadata entries."},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Flattened metadata key-value map."}},"required":["id","createdAt","updatedAt","amount","currency","displayName","description","sku","organizationId","active","recurrentDetailId","amountEditable","quantityEditable","archivedAt","archivedById","oneOff","groupId","createdById","updatedById","group","metadata","meta"],"description":"Resolved payment concept, if available."}},"required":["amount","currency","description","quantity","conceptId","concept"]}}},"required":["id","metadata","meta","items"]}},"paymentAttempt":{"type":["object","null"],"properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 timestamp."},"success":{"type":"boolean","description":"Whether the payment attempt succeeded."},"startedOn":{"type":["string","null"],"description":"Payment attempt start category, if available."},"automatic":{"type":"boolean","description":"Whether the attempt was triggered automatically."},"scheduled":{"type":"boolean","description":"Whether the attempt was scheduled in advance."},"wasAttemptedByOrganization":{"type":"boolean","description":"Whether the organization initiated the attempt."},"attemptNumber":{"type":"integer","description":"Sequential attempt number for the payment."},"errorCode":{"type":["string","null"],"description":"Processor error code when the attempt failed."},"errorType":{"type":["string","null"],"description":"Normalized error category when the attempt failed."},"errorResponse":{"type":["string","null"],"description":"Processor error response when the attempt failed."}},"required":["id","createdAt","success","startedOn","automatic","scheduled","wasAttemptedByOrganization","attemptNumber","errorCode","errorType","errorResponse"]},"customer":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"],"description":"Customer display name."},"email":{"type":["string","null"],"description":"Customer email address, if available."},"phoneNumber":{"type":["string","null"],"description":"Customer phone number, if available."},"username":{"type":"string","description":"Customer username used for identification."},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Metadata key."},"value":{"type":"string","description":"Metadata value."}},"required":["key","value"],"description":"Custom key-value metadata entry."},"description":"Structured metadata entries."},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Flattened metadata key-value map."}},"required":["id","name","email","phoneNumber","username","metadata","meta"]},"paymentSession":{"type":["object","null"],"properties":{"id":{"type":"string"},"returnUrl":{"type":["string","null"],"description":"URL used after a successful checkout."},"cancelUrl":{"type":["string","null"],"description":"URL used when the payer cancels checkout."},"totalAmount":{"type":"number","description":"Total session amount in minor currency units."},"currency":{"type":"string","description":"ISO 4217 currency code."},"status":{"type":"string","description":"Current payment session status."},"displayMode":{"type":"string","description":"How the checkout was presented to the payer."},"origin":{"type":"string","description":"Source that created the payment session."},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Metadata key."},"value":{"type":"string","description":"Metadata value."}},"required":["key","value"],"description":"Custom key-value metadata entry."},"description":"Structured metadata entries."},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Flattened metadata key-value map."}},"required":["id","returnUrl","cancelUrl","totalAmount","currency","status","displayMode","origin","metadata","meta"]}},"required":["payment","items","relatedInvoices","paymentAttempt","customer","paymentSession"],"description":"Event-specific payload data."},"PaymentMethodCreatedWebhookData":{"type":"object","properties":{"paymentMethod":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","description":"Payment method type."},"confirmed":{"type":"boolean","description":"Whether the payment method is confirmed and usable."},"chargesConsented":{"type":"boolean","description":"Whether the customer consented to future charges."},"cardDetail":{"type":["object","null"],"properties":{"id":{"type":"string"},"cardholder":{"type":["string","null"],"description":"Name printed on the card, if available."},"last4":{"type":"string","description":"Last four digits of the card."},"brand":{"type":"string","description":"Card brand."},"expiryMonth":{"type":"integer","description":"Card expiration month."},"expiryYear":{"type":"integer","description":"Card expiration year."},"funding":{"type":["string","null"],"description":"Card funding category, such as CREDIT or DEBIT."},"issuer":{"type":["string","null"],"description":"Card issuing bank or institution, if available."},"country":{"type":["string","null"],"description":"ISO country code of the card issuer, if available."}},"required":["id","cardholder","last4","brand","expiryMonth","expiryYear","funding","issuer","country"],"description":"Sanitized card details, if applicable."},"bankAccount":{"type":["object","null"],"properties":{"id":{"type":"string"},"clabeLast":{"type":"string","description":"Last visible digits of the CLABE."},"clabeFirst":{"type":"string","description":"First visible digits of the CLABE."},"bankCode":{"type":"string","description":"Bank institution code."},"bankName":{"type":"string","description":"Bank institution name."},"verified":{"type":"boolean","description":"Whether bank account ownership was verified."}},"required":["id","clabeLast","clabeFirst","bankCode","bankName","verified"],"description":"Bank account details, if applicable."}},"required":["id","type","confirmed","chargesConsented","cardDetail","bankAccount"]},"customer":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"],"description":"Customer display name."},"email":{"type":["string","null"],"description":"Customer email address, if available."},"phoneNumber":{"type":["string","null"],"description":"Customer phone number, if available."},"username":{"type":"string","description":"Customer username used for identification."},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Metadata key."},"value":{"type":"string","description":"Metadata value."}},"required":["key","value"],"description":"Custom key-value metadata entry."},"description":"Structured metadata entries."},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Flattened metadata key-value map."}},"required":["id","name","email","phoneNumber","username","metadata","meta"]}},"required":["paymentMethod","customer"],"description":"Event-specific payload data."},"PaymentRefundedWebhookData":{"type":"object","properties":{"refund":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"number","description":"Refund amount in minor currency units."},"currency":{"type":"string","description":"ISO 4217 currency code."},"status":{"type":"string","description":"Current refund status."},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 timestamp."},"statusUpdatedAt":{"type":"string","format":"date-time","description":"ISO 8601 timestamp."},"customRefundReason":{"type":["string","null"],"description":"Custom reason supplied for the refund, if any."}},"required":["id","amount","currency","status","createdAt","statusUpdatedAt","customRefundReason"]},"payment":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"number","description":"Payment amount in minor currency units."},"currency":{"type":"string","description":"ISO 4217 currency code."},"paymentTime":{"type":["string","null"],"format":"date-time","description":"When the payment completed, if applicable."},"type":{"type":["string","null"],"description":"Payment method type, if available."},"authorizationCode":{"type":["string","null"],"description":"Processor authorization code, if available."},"cardDetail":{"type":["object","null"],"properties":{"id":{"type":"string"},"cardholder":{"type":["string","null"],"description":"Name printed on the card, if available."},"last4":{"type":"string","description":"Last four digits of the card."},"brand":{"type":"string","description":"Card brand."},"expiryMonth":{"type":"integer","description":"Card expiration month."},"expiryYear":{"type":"integer","description":"Card expiration year."},"funding":{"type":["string","null"],"description":"Card funding category, such as CREDIT or DEBIT."},"issuer":{"type":["string","null"],"description":"Card issuing bank or institution, if available."},"country":{"type":["string","null"],"description":"ISO country code of the card issuer, if available."}},"required":["id","cardholder","last4","brand","expiryMonth","expiryYear","funding","issuer","country"],"description":"Sanitized card details, if the payment used a card."},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Metadata key."},"value":{"type":"string","description":"Metadata value."}},"required":["key","value"],"description":"Custom key-value metadata entry."},"description":"Structured metadata entries."},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Flattened metadata key-value map."}},"required":["id","amount","currency","paymentTime","type","authorizationCode","cardDetail","metadata","meta"]},"customer":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"],"description":"Customer display name."},"email":{"type":["string","null"],"description":"Customer email address, if available."},"phoneNumber":{"type":["string","null"],"description":"Customer phone number, if available."},"username":{"type":"string","description":"Customer username used for identification."},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Metadata key."},"value":{"type":"string","description":"Metadata value."}},"required":["key","value"],"description":"Custom key-value metadata entry."},"description":"Structured metadata entries."},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Flattened metadata key-value map."}},"required":["id","name","email","phoneNumber","username","metadata","meta"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"Organization display name."}},"required":["id","name"],"description":"Organization associated with the event."}},"required":["refund","payment","customer","organization"],"description":"Event-specific payload data."},"DisputeWebhookData":{"type":"object","properties":{"dispute":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","description":"Current dispute status."},"respondBy":{"type":["string","null"],"format":"date-time","description":"Deadline for submitting evidence, if applicable."},"reason":{"type":["string","null"],"description":"Reason supplied for the dispute, if available."},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 timestamp."},"resolvedAt":{"type":["string","null"],"format":"date-time","description":"When the dispute was resolved, if applicable."},"lostReason":{"type":["string","null"],"description":"Reason the dispute was lost, if applicable."}},"required":["id","status","respondBy","reason","createdAt","resolvedAt","lostReason"]},"response":{"type":["object","null"],"properties":{"id":{"type":"string"},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 timestamp."}},"required":["id","createdAt"]},"payment":{"type":"object","properties":{"id":{"type":"string"},"amount":{"type":"number","description":"Payment amount in minor currency units."},"currency":{"type":"string","description":"ISO 4217 currency code."},"paymentTime":{"type":["string","null"],"format":"date-time","description":"When the payment completed, if applicable."},"type":{"type":["string","null"],"description":"Payment method type, if available."},"authorizationCode":{"type":["string","null"],"description":"Processor authorization code, if available."},"cardDetail":{"type":["object","null"],"properties":{"id":{"type":"string"},"cardholder":{"type":["string","null"],"description":"Name printed on the card, if available."},"last4":{"type":"string","description":"Last four digits of the card."},"brand":{"type":"string","description":"Card brand."},"expiryMonth":{"type":"integer","description":"Card expiration month."},"expiryYear":{"type":"integer","description":"Card expiration year."},"funding":{"type":["string","null"],"description":"Card funding category, such as CREDIT or DEBIT."},"issuer":{"type":["string","null"],"description":"Card issuing bank or institution, if available."},"country":{"type":["string","null"],"description":"ISO country code of the card issuer, if available."}},"required":["id","cardholder","last4","brand","expiryMonth","expiryYear","funding","issuer","country"],"description":"Sanitized card details, if the payment used a card."},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Metadata key."},"value":{"type":"string","description":"Metadata value."}},"required":["key","value"],"description":"Custom key-value metadata entry."},"description":"Structured metadata entries."},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Flattened metadata key-value map."}},"required":["id","amount","currency","paymentTime","type","authorizationCode","cardDetail","metadata","meta"]},"customer":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"],"description":"Customer display name."},"email":{"type":["string","null"],"description":"Customer email address, if available."},"phoneNumber":{"type":["string","null"],"description":"Customer phone number, if available."},"username":{"type":"string","description":"Customer username used for identification."},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Metadata key."},"value":{"type":"string","description":"Metadata value."}},"required":["key","value"],"description":"Custom key-value metadata entry."},"description":"Structured metadata entries."},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Flattened metadata key-value map."}},"required":["id","name","email","phoneNumber","username","metadata","meta"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"Organization display name."}},"required":["id","name"],"description":"Organization associated with the event."}},"required":["dispute","response","payment","customer","organization"],"description":"Event-specific payload data."},"SubscriptionWebhookData":{"type":"object","properties":{"subscription":{"type":"object","properties":{"id":{"type":"string"},"description":{"type":["string","null"],"description":"Human-readable subscription description."},"status":{"type":["string","null"],"description":"Current subscription status."},"isActive":{"type":"boolean","description":"Whether the subscription is active."},"isCompleted":{"type":"boolean","description":"Whether all scheduled collections are complete."},"firstCollectionDate":{"type":"string","format":"date-time","description":"Date of the first collection."},"lastCollectionDate":{"type":["string","null"],"format":"date-time","description":"Date of the final collection, if configured."},"nextCollectionDate":{"type":["string","null"],"format":"date-time","description":"Date of the next scheduled collection."},"numberOfPayments":{"type":["integer","null"],"description":"Total number of scheduled payments, if limited."},"collectionMethod":{"type":"string","description":"How generated invoices are collected."},"onlyAutomaticCollection":{"type":"boolean","description":"Whether only automatic collection is allowed."},"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"Recurring line item description."},"amount":{"type":"number","description":"Unit amount in minor currency units."},"currency":{"type":"string","description":"ISO 4217 currency code."},"quantity":{"type":"number","description":"Number of units billed per collection."},"conceptId":{"type":["string","null"],"description":"Related payment concept identifier, if any."}},"required":["description","amount","currency","quantity","conceptId"]}},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Metadata key."},"value":{"type":"string","description":"Metadata value."}},"required":["key","value"],"description":"Custom key-value metadata entry."},"description":"Structured metadata entries."},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Flattened metadata key-value map."}},"required":["id","description","status","isActive","isCompleted","firstCollectionDate","lastCollectionDate","nextCollectionDate","numberOfPayments","collectionMethod","onlyAutomaticCollection","items","metadata","meta"]},"customer":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":["string","null"],"description":"Customer display name."},"email":{"type":["string","null"],"description":"Customer email address, if available."},"phoneNumber":{"type":["string","null"],"description":"Customer phone number, if available."},"username":{"type":"string","description":"Customer username used for identification."},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Metadata key."},"value":{"type":"string","description":"Metadata value."}},"required":["key","value"],"description":"Custom key-value metadata entry."},"description":"Structured metadata entries."},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Flattened metadata key-value map."}},"required":["id","name","email","phoneNumber","username","metadata","meta"]},"organization":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string","description":"Organization display name."}},"required":["id","name"],"description":"Organization associated with the event."}},"required":["subscription","customer","organization"],"description":"Event-specific payload data."},"CustomerFilter":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"name":{"$ref":"#/components/schemas/StringFilter"},"archivedAt":{"$ref":"#/components/schemas/NullableDateTimeFilter"},"email":{"$ref":"#/components/schemas/StringFilter"},"phoneNumber":{"$ref":"#/components/schemas/StringFilter"},"secondaryPhoneNumber":{"$ref":"#/components/schemas/StringFilter"},"username":{"$ref":"#/components/schemas/StringFilter"},"tags":{"type":"object","properties":{"some":{"$ref":"#/components/schemas/TagFilter"},"every":{"$ref":"#/components/schemas/TagFilter"},"none":{"$ref":"#/components/schemas/TagFilter"}},"additionalProperties":false},"invoices":{"type":"object","properties":{"some":{"$ref":"#/components/schemas/InvoiceFilter"},"every":{"$ref":"#/components/schemas/InvoiceFilter"},"none":{"$ref":"#/components/schemas/InvoiceFilter"}},"additionalProperties":false},"receivedAnnouncements":{"type":"object","properties":{"some":{"type":"object","properties":{"announcementId":{"$ref":"#/components/schemas/StringFilter"}},"additionalProperties":false},"every":{"type":"object","properties":{"announcementId":{"$ref":"#/components/schemas/StringFilter"}},"additionalProperties":false},"none":{"type":"object","properties":{"announcementId":{"$ref":"#/components/schemas/StringFilter"}},"additionalProperties":false}},"additionalProperties":false},"metadataItem":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"metadata":{"type":"object","properties":{"some":{"type":"object","properties":{"key":{"type":"object","properties":{"name":{"type":"string"}}},"value":{"type":"string"}},"required":["key","value"]},"none":{"type":"object","properties":{"key":{"type":"object","properties":{"name":{"type":"string"}}},"value":{"type":"string"}},"required":["key","value"]},"every":{"type":"object","properties":{"key":{"type":"object","properties":{"name":{"type":"string"}}},"value":{"type":"string"}},"required":["key","value"]}}},"assignee":{"$ref":"#/components/schemas/MemberFilter"},"noPayments":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"hasTaxProfiles":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"AND":{"type":"array","items":{"$ref":"#/components/schemas/CustomerFilter"}},"OR":{"type":"array","items":{"$ref":"#/components/schemas/CustomerFilter"}}},"additionalProperties":false},"StringFilter":{"type":"object","properties":{"equals":{"type":"string"},"in":{"type":"array","items":{"type":"string"}},"notIn":{"type":"array","items":{"type":"string"}},"lt":{"type":"string"},"lte":{"type":"string"},"gt":{"type":"string"},"gte":{"type":"string"},"contains":{"type":"string"},"startsWith":{"type":"string"},"endsWith":{"type":"string"},"search":{"type":"string"},"not":{"$ref":"#/components/schemas/StringFilter"}},"additionalProperties":false},"DateTimeFilter":{"type":"object","properties":{"equals":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}]},"lt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}]},"lte":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}]},"gt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}]},"gte":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}]},"not":{"$ref":"#/components/schemas/DateTimeFilter"}},"additionalProperties":false},"NullableDateTimeFilter":{"type":["object","null"],"properties":{"equals":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}]},"lt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}]},"lte":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}]},"gt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}]},"gte":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}]},"not":{"oneOf":[{"$ref":"#/components/schemas/NullableDateTimeFilter"},{"type":"null"}]}},"additionalProperties":false},"TagFilter":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"name":{"$ref":"#/components/schemas/StringFilter"},"description":{"$ref":"#/components/schemas/StringFilter"},"AND":{"type":"array","items":{"$ref":"#/components/schemas/TagFilter"}},"OR":{"type":"array","items":{"$ref":"#/components/schemas/TagFilter"}}},"additionalProperties":false},"InvoiceFilter":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"isPaid":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"canceledAt":{"$ref":"#/components/schemas/NullableDateTimeFilter"},"canceledById":{"$ref":"#/components/schemas/StringFilter"},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"items":{"type":"object","properties":{"some":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"concept":{"$ref":"#/components/schemas/ConceptFilter"},"amount":{"type":"object","properties":{"equals":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"in":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"notIn":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"lt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"lte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"description":{"$ref":"#/components/schemas/StringFilter"}},"additionalProperties":false},"every":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"concept":{"$ref":"#/components/schemas/ConceptFilter"},"amount":{"type":"object","properties":{"equals":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"in":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"notIn":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"lt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"lte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"description":{"$ref":"#/components/schemas/StringFilter"}},"additionalProperties":false},"none":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"concept":{"$ref":"#/components/schemas/ConceptFilter"},"amount":{"type":"object","properties":{"equals":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"in":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"notIn":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"lt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"lte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"description":{"$ref":"#/components/schemas/StringFilter"}},"additionalProperties":false}},"additionalProperties":false},"dueDate":{"$ref":"#/components/schemas/DateTimeFilter"},"expireDate":{"$ref":"#/components/schemas/NullableDateTimeFilter"},"subscriptionId":{"$ref":"#/components/schemas/StringFilter"},"customerId":{"$ref":"#/components/schemas/StringFilter"},"refundedAt":{"$ref":"#/components/schemas/NullableDateTimeFilter"},"refundedById":{"$ref":"#/components/schemas/StringFilter"},"collectionMethod":{"type":"string","enum":["AUTOMATIC","SEND_REMINDER","NONE"]},"metadata":{"type":"object","properties":{"some":{"type":"object","properties":{"key":{"type":"object","properties":{"name":{"type":"string"}}},"value":{"type":"string"}},"required":["key","value"]},"none":{"type":"object","properties":{"key":{"type":"object","properties":{"name":{"type":"string"}}},"value":{"type":"string"}},"required":["key","value"]},"every":{"type":"object","properties":{"key":{"type":"object","properties":{"name":{"type":"string"}}},"value":{"type":"string"}},"required":["key","value"]}}},"createdBy":{"$ref":"#/components/schemas/UserFilter"},"AND":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceFilter"}},"OR":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceFilter"}},"customer":{"$ref":"#/components/schemas/CustomerFilter"},"beneficiary":{"$ref":"#/components/schemas/CustomerFilter"},"paidWith":{"$ref":"#/components/schemas/PaymentFilter"}},"additionalProperties":false},"ConceptFilter":{"type":"object","properties":{"term":{"type":"string"},"id":{"$ref":"#/components/schemas/StringFilter"},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"displayName":{"$ref":"#/components/schemas/StringFilter"},"sku":{"$ref":"#/components/schemas/StringFilter"},"description":{"$ref":"#/components/schemas/StringFilter"},"active":{"type":"object","properties":{"equals":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]}}},"amount":{"type":"object","properties":{"equals":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"in":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"notIn":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"lt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"lte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"archivedAt":{"$ref":"#/components/schemas/NullableDateTimeFilter"},"archivedById":{"$ref":"#/components/schemas/StringFilter"},"metadataItem":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"recurrentDetailId":{"$ref":"#/components/schemas/NullableStringFilter"},"groupId":{"$ref":"#/components/schemas/NullableStringFilter"},"group":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"name":{"$ref":"#/components/schemas/StringFilter"},"null":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]}},"additionalProperties":false},"AND":{"type":"array","items":{"$ref":"#/components/schemas/ConceptFilter"}},"OR":{"type":"array","items":{"$ref":"#/components/schemas/ConceptFilter"}}},"additionalProperties":false},"NullableStringFilter":{"type":"object","properties":{"equals":{"type":["string","null"]},"in":{"type":["array","null"],"items":{"type":"string"}},"notIn":{"type":["array","null"],"items":{"type":"string"}},"lt":{"type":"string"},"lte":{"type":"string"},"gt":{"type":"string"},"gte":{"type":"string"},"contains":{"type":"string"},"startsWith":{"type":"string"},"endsWith":{"type":"string"},"search":{"type":"string"},"not":{"$ref":"#/components/schemas/NullableStringFilter"}},"additionalProperties":false},"UserFilter":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"name":{"$ref":"#/components/schemas/StringFilter"},"phoneNumber":{"$ref":"#/components/schemas/NullableStringFilter"},"username":{"$ref":"#/components/schemas/StringFilter"},"verified":{"type":"object","properties":{"equals":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]}}},"AND":{"type":"array","items":{"$ref":"#/components/schemas/UserFilter"}},"OR":{"type":"array","items":{"$ref":"#/components/schemas/UserFilter"}}},"additionalProperties":false},"PaymentFilter":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"amount":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"status":{"type":"object","properties":{"equals":{"type":"string","enum":["INCOMPLETE","COMPLETE","CANCELED","INITIATED","REFUNDED","DISPUTED","REVERTED"]},"not":{"type":"string","enum":["INCOMPLETE","COMPLETE","CANCELED","INITIATED","REFUNDED","DISPUTED","REVERTED"]},"in":{"type":"array","items":{"type":"string","enum":["INCOMPLETE","COMPLETE","CANCELED","INITIATED","REFUNDED","DISPUTED","REVERTED"]}},"notIn":{"type":"array","items":{"type":"string","enum":["INCOMPLETE","COMPLETE","CANCELED","INITIATED","REFUNDED","DISPUTED","REVERTED"]}}},"additionalProperties":false},"isCompleted":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"skipTaxInvoice":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"paymentTime":{"$ref":"#/components/schemas/DateTimeFilter"},"type":{"type":"object","properties":{"equals":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]},"not":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]},"in":{"type":"array","items":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]}},"notIn":{"type":"array","items":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]}}},"additionalProperties":false},"processor":{"type":"object","properties":{"equals":{"type":"string","enum":["FISERV","KUSHKI","QUENTLI","SANTANDER","STRIPE","TAPI"]},"not":{"type":"string","enum":["FISERV","KUSHKI","QUENTLI","SANTANDER","STRIPE","TAPI"]},"in":{"type":"array","items":{"type":"string","enum":["FISERV","KUSHKI","QUENTLI","SANTANDER","STRIPE","TAPI"]}},"notIn":{"type":"array","items":{"type":"string","enum":["FISERV","KUSHKI","QUENTLI","SANTANDER","STRIPE","TAPI"]}}},"additionalProperties":false},"refunds":{"type":"object","properties":{"some":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"amount":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"}},"additionalProperties":false},"none":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"amount":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"}},"additionalProperties":false},"every":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"amount":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"}},"additionalProperties":false}},"additionalProperties":false},"taxInvoices":{"type":"object","properties":{"some":{"$ref":"#/components/schemas/TaxInvoiceFilter"},"none":{"$ref":"#/components/schemas/TaxInvoiceFilter"},"every":{"$ref":"#/components/schemas/TaxInvoiceFilter"}},"additionalProperties":false},"payoutId":{"$ref":"#/components/schemas/StringFilter"},"customerId":{"$ref":"#/components/schemas/StringFilter"},"cardDetail":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"bin":{"$ref":"#/components/schemas/StringFilter"},"last4":{"$ref":"#/components/schemas/StringFilter"},"expiryMonth":{"type":"object","properties":{"equals":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"in":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"notIn":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"lt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"lte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"expiryYear":{"type":"object","properties":{"equals":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"in":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"notIn":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"lt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"lte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"isExpired":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]}},"additionalProperties":false},"authorizationCode":{"$ref":"#/components/schemas/StringFilter"},"hasRelatedInvoice":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"payout":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"settleDate":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"grossAmount":{"type":"object","properties":{"equals":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"in":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"notIn":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"lt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"lte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"inconsistent":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"payer":{"type":"object","properties":{"equals":{"type":"string","enum":["AMEX","FISERV","STRIPE","KUSHKI","SANTANDER","TAPI","QUENTLI"]},"in":{"type":"array","items":{"type":"string","enum":["AMEX","FISERV","STRIPE","KUSHKI","SANTANDER","TAPI","QUENTLI"]}},"notIn":{"type":"array","items":{"type":"string","enum":["AMEX","FISERV","STRIPE","KUSHKI","SANTANDER","TAPI","QUENTLI"]}}},"additionalProperties":false},"null":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]}},"additionalProperties":false},"attempts":{"type":"object","properties":{"every":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"paymentId":{"$ref":"#/components/schemas/StringFilter"},"success":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"type":{"type":"object","properties":{"equals":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]},"not":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]},"in":{"type":"array","items":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]}},"notIn":{"type":"array","items":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]}}},"additionalProperties":false},"attemptedBy":{"allOf":[{"$ref":"#/components/schemas/UserFilter"},{"type":["object","null"]}]},"automatic":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"scheduled":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"authenticated":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"monthlyInstallments":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"none":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"paymentId":{"$ref":"#/components/schemas/StringFilter"},"success":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"type":{"type":"object","properties":{"equals":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]},"not":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]},"in":{"type":"array","items":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]}},"notIn":{"type":"array","items":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]}}},"additionalProperties":false},"attemptedBy":{"allOf":[{"$ref":"#/components/schemas/UserFilter"},{"type":["object","null"]}]},"automatic":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"scheduled":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"authenticated":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"monthlyInstallments":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"some":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"paymentId":{"$ref":"#/components/schemas/StringFilter"},"success":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"type":{"type":"object","properties":{"equals":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]},"not":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]},"in":{"type":"array","items":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]}},"notIn":{"type":"array","items":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]}}},"additionalProperties":false},"attemptedBy":{"allOf":[{"$ref":"#/components/schemas/UserFilter"},{"type":["object","null"]}]},"automatic":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"scheduled":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"authenticated":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"monthlyInstallments":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false}},"additionalProperties":false},"paymentConceptId":{"type":"string"},"paymentConceptGroupIds":{"type":"array","items":{"type":"string"}},"origin":{"type":"object","properties":{"equals":{"type":"string","enum":["INVOICE","LISTING","API"]},"in":{"type":"array","items":{"type":"string","enum":["INVOICE","LISTING","API"]}},"notIn":{"type":"array","items":{"type":"string","enum":["INVOICE","LISTING","API"]}}},"additionalProperties":false},"disputes":{"type":"object","properties":{"some":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"status":{"type":"object","properties":{"equals":{"type":"string","enum":["PENDING_RESPONSE","IN_REVIEW","CLOSED","LOST","WON"]},"in":{"type":"array","items":{"type":"string","enum":["PENDING_RESPONSE","IN_REVIEW","CLOSED","LOST","WON"]}},"notIn":{"type":"array","items":{"type":"string","enum":["PENDING_RESPONSE","IN_REVIEW","CLOSED","LOST","WON"]}}},"additionalProperties":false},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"resolvedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"respondBy":{"$ref":"#/components/schemas/DateTimeFilter"},"resolvedBy":{"$ref":"#/components/schemas/UserFilter"},"lostReason":{"$ref":"#/components/schemas/StringFilter"}}},"none":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"status":{"type":"object","properties":{"equals":{"type":"string","enum":["PENDING_RESPONSE","IN_REVIEW","CLOSED","LOST","WON"]},"in":{"type":"array","items":{"type":"string","enum":["PENDING_RESPONSE","IN_REVIEW","CLOSED","LOST","WON"]}},"notIn":{"type":"array","items":{"type":"string","enum":["PENDING_RESPONSE","IN_REVIEW","CLOSED","LOST","WON"]}}},"additionalProperties":false},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"resolvedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"respondBy":{"$ref":"#/components/schemas/DateTimeFilter"},"resolvedBy":{"$ref":"#/components/schemas/UserFilter"},"lostReason":{"$ref":"#/components/schemas/StringFilter"}}},"every":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"status":{"type":"object","properties":{"equals":{"type":"string","enum":["PENDING_RESPONSE","IN_REVIEW","CLOSED","LOST","WON"]},"in":{"type":"array","items":{"type":"string","enum":["PENDING_RESPONSE","IN_REVIEW","CLOSED","LOST","WON"]}},"notIn":{"type":"array","items":{"type":"string","enum":["PENDING_RESPONSE","IN_REVIEW","CLOSED","LOST","WON"]}}},"additionalProperties":false},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"resolvedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"respondBy":{"$ref":"#/components/schemas/DateTimeFilter"},"resolvedBy":{"$ref":"#/components/schemas/UserFilter"},"lostReason":{"$ref":"#/components/schemas/StringFilter"}}}},"additionalProperties":false},"response":{"type":"object","properties":{"fieldName":{"type":"string"},"answer":{"type":"string"}},"required":["fieldName","answer"]},"transferInstruction":{"type":"object","properties":{"reference":{"$ref":"#/components/schemas/StringFilter"},"clabe":{"$ref":"#/components/schemas/StringFilter"}}},"cashPaymentInstructions":{"type":"object","properties":{"reference":{"$ref":"#/components/schemas/StringFilter"}}},"oxxoInstruction":{"type":"object","properties":{"reference":{"$ref":"#/components/schemas/StringFilter"}}},"externalPaymentType":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"name":{"$ref":"#/components/schemas/StringFilter"},"taxPaymentForm":{"$ref":"#/components/schemas/StringFilter"}}},"AND":{"type":"array","items":{"$ref":"#/components/schemas/PaymentFilter"}},"OR":{"type":"array","items":{"$ref":"#/components/schemas/PaymentFilter"}},"customer":{"$ref":"#/components/schemas/CustomerFilter"}},"additionalProperties":false},"TaxInvoiceFilter":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"issueDate":{"$ref":"#/components/schemas/DateTimeFilter"},"customerId":{"$ref":"#/components/schemas/StringFilter"},"taxId":{"$ref":"#/components/schemas/StringFilter"},"isPublicInvoice":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"folio":{"$ref":"#/components/schemas/StringFilter"},"canceledAt":{"$ref":"#/components/schemas/DateTimeFilter"},"canceledById":{"$ref":"#/components/schemas/StringFilter"},"uuid":{"$ref":"#/components/schemas/StringFilter"},"status":{"type":"string","enum":["VALID","CANCELED","PENDING","DRAFT","PENDING_CANCELLATION","FAILED"]},"cancellationStatus":{"$ref":"#/components/schemas/StringFilter"},"usage":{"$ref":"#/components/schemas/StringFilter"},"paymentMethod":{"$ref":"#/components/schemas/StringFilter"},"paymentForm":{"$ref":"#/components/schemas/StringFilter"},"type":{"type":"string","enum":["TAX_RECEIPT","TAX_INVOICE_PPD","TAX_INVOICE_PUE"]},"AND":{"type":"array","items":{"$ref":"#/components/schemas/TaxInvoiceFilter"}},"OR":{"type":"array","items":{"$ref":"#/components/schemas/TaxInvoiceFilter"}},"customer":{"$ref":"#/components/schemas/CustomerFilter"},"paidWith":{"$ref":"#/components/schemas/PaymentFilter"}},"additionalProperties":false},"MemberFilter":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"user":{"$ref":"#/components/schemas/UserFilter"},"organization":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"name":{"$ref":"#/components/schemas/StringFilter"},"identifier":{"$ref":"#/components/schemas/StringFilter"}},"additionalProperties":false},"role":{"type":"string","enum":["ADMIN","USER","SUPPORT","OWNER","SALES","FINANCE","BERLITZ_QUALITY","BERLITZ_ADVISOR","BERLITZ_ADMIN_ADVISOR","BERLITZ_SCHOOL_ADMIN","BERLITZ_SCHOOL_ANALYST","BERLITZ_RECEPTION","BERLITZ_SERVICE_LEADER","BERLITZ_COORDINATOR","BERLITZ_SM2B_DIRECTOR","BERLITZ_SM2B_SUPERVISOR"]},"status":{"type":"string","enum":["ACTIVE","INACTIVE","PENDING"]},"AND":{"type":"array","items":{"$ref":"#/components/schemas/MemberFilter"}},"OR":{"type":"array","items":{"$ref":"#/components/schemas/MemberFilter"}}},"additionalProperties":false},"DiscountFilter":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"deletedAt":{"$ref":"#/components/schemas/NullableDateTimeFilter"},"name":{"$ref":"#/components/schemas/StringFilter"},"description":{"$ref":"#/components/schemas/NullableStringFilter"},"type":{"$ref":"#/components/schemas/StringFilter"},"amountOff":{"type":"object","properties":{"equals":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"in":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"notIn":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"lt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"lte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"percentageOff":{"type":"object","properties":{"equals":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"in":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"notIn":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"lt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"lte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"active":{"type":"object","properties":{"equals":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]}}},"oneOff":{"type":"object","properties":{"equals":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]}}},"expiresAt":{"$ref":"#/components/schemas/NullableDateTimeFilter"},"AND":{"type":"array","items":{"$ref":"#/components/schemas/DiscountFilter"}},"OR":{"type":"array","items":{"$ref":"#/components/schemas/DiscountFilter"}}},"additionalProperties":false},"SubscriptionFilter":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"description":{"$ref":"#/components/schemas/StringFilter"},"customerId":{"$ref":"#/components/schemas/StringFilter"},"collectionMethod":{"type":"string","enum":["AUTOMATIC","SEND_REMINDER","NONE"]},"paymentMethodId":{"$ref":"#/components/schemas/StringFilter"},"nextCollectionDate":{"$ref":"#/components/schemas/NullableDateTimeFilter"},"firstCollectionDate":{"$ref":"#/components/schemas/DateTimeFilter"},"lastCollectionDate":{"$ref":"#/components/schemas/NullableDateTimeFilter"},"generationMode":{"type":"string","enum":["MANUAL","AUTO"]},"onlyAutomaticCollection":{"type":"object","properties":{"equals":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]}}},"isActive":{"type":"object","properties":{"equals":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]}}},"isCompleted":{"type":"object","properties":{"equals":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]}}},"status":{"type":"string","enum":["INACTIVE","ACTIVE","CANCELED","COMPLETED"]},"customCancelReason":{"$ref":"#/components/schemas/StringFilter"},"metadata":{"type":"object","properties":{"some":{"type":"object","properties":{"key":{"type":"object","properties":{"name":{"type":"string"}}},"value":{"type":"string"}},"required":["key","value"]},"none":{"type":"object","properties":{"key":{"type":"object","properties":{"name":{"type":"string"}}},"value":{"type":"string"}},"required":["key","value"]},"every":{"type":"object","properties":{"key":{"type":"object","properties":{"name":{"type":"string"}}},"value":{"type":"string"}},"required":["key","value"]}}},"AND":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionFilter"}},"OR":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionFilter"}},"customer":{"$ref":"#/components/schemas/CustomerFilter"},"paymentMethod":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"customerId":{"$ref":"#/components/schemas/StringFilter"},"type":{"type":"object","properties":{"equals":{"type":"string","enum":["CARD","MEXICAN_BANK_ACCOUNT"]},"in":{"type":"array","items":{"type":"string","enum":["CARD","MEXICAN_BANK_ACCOUNT"]}},"notIn":{"type":"array","items":{"type":"string","enum":["CARD","MEXICAN_BANK_ACCOUNT"]}}},"additionalProperties":false},"confirmed":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"default":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"expired":{"type":"object","properties":{"equals":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]}}},"cardDetail":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"bin":{"$ref":"#/components/schemas/StringFilter"},"last4":{"$ref":"#/components/schemas/StringFilter"},"expiryMonth":{"type":"object","properties":{"equals":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"in":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"notIn":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"lt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"lte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"expiryYear":{"type":"object","properties":{"equals":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"in":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"notIn":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"lt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"lte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"isExpired":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]}},"additionalProperties":false},"null":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]}},"additionalProperties":false}},"additionalProperties":false},"WebhookFilter":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"url":{"$ref":"#/components/schemas/StringFilter"},"status":{"type":"string","enum":["ENABLED","DISABLED","BROKEN","DELETED"]},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"}}},"WebhookEventFilter":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"type":{"type":"object","properties":{"equals":{"type":"string","enum":["INVOICE_CREATED","INVOICE_CANCELED","INVOICE_PAID","INVOICE_PAID_OTHER","INVOICE_UPDATED","PAYMENT_COMPLETED","PAYMENT_REFUNDED","PAYMENT_ATTEMPT_FAILED","PAYMENT_ATTEMPT_SUCCEEDED","DISPUTE_CREATED","DISPUTE_RESPONSE_CREATED","DISPUTE_RESOLVED","CUSTOMER_CREATED","CUSTOMER_UPDATED","CUSTOMER_ARCHIVED","SUBSCRIPTION_CREATED","SUBSCRIPTION_UPDATED","SUBSCRIPTION_CANCELED","PAYMENT_METHOD_CREATED"]},"not":{"type":"string","enum":["INVOICE_CREATED","INVOICE_CANCELED","INVOICE_PAID","INVOICE_PAID_OTHER","INVOICE_UPDATED","PAYMENT_COMPLETED","PAYMENT_REFUNDED","PAYMENT_ATTEMPT_FAILED","PAYMENT_ATTEMPT_SUCCEEDED","DISPUTE_CREATED","DISPUTE_RESPONSE_CREATED","DISPUTE_RESOLVED","CUSTOMER_CREATED","CUSTOMER_UPDATED","CUSTOMER_ARCHIVED","SUBSCRIPTION_CREATED","SUBSCRIPTION_UPDATED","SUBSCRIPTION_CANCELED","PAYMENT_METHOD_CREATED"]},"in":{"type":"array","items":{"type":"string","enum":["INVOICE_CREATED","INVOICE_CANCELED","INVOICE_PAID","INVOICE_PAID_OTHER","INVOICE_UPDATED","PAYMENT_COMPLETED","PAYMENT_REFUNDED","PAYMENT_ATTEMPT_FAILED","PAYMENT_ATTEMPT_SUCCEEDED","DISPUTE_CREATED","DISPUTE_RESPONSE_CREATED","DISPUTE_RESOLVED","CUSTOMER_CREATED","CUSTOMER_UPDATED","CUSTOMER_ARCHIVED","SUBSCRIPTION_CREATED","SUBSCRIPTION_UPDATED","SUBSCRIPTION_CANCELED","PAYMENT_METHOD_CREATED"]}},"notIn":{"type":"array","items":{"type":"string","enum":["INVOICE_CREATED","INVOICE_CANCELED","INVOICE_PAID","INVOICE_PAID_OTHER","INVOICE_UPDATED","PAYMENT_COMPLETED","PAYMENT_REFUNDED","PAYMENT_ATTEMPT_FAILED","PAYMENT_ATTEMPT_SUCCEEDED","DISPUTE_CREATED","DISPUTE_RESPONSE_CREATED","DISPUTE_RESOLVED","CUSTOMER_CREATED","CUSTOMER_UPDATED","CUSTOMER_ARCHIVED","SUBSCRIPTION_CREATED","SUBSCRIPTION_UPDATED","SUBSCRIPTION_CANCELED","PAYMENT_METHOD_CREATED"]}}},"additionalProperties":false},"status":{"type":"object","properties":{"equals":{"type":"string","enum":["PENDING","SUCCESSFUL","RETRYING","FAILED"]},"not":{"type":"string","enum":["PENDING","SUCCESSFUL","RETRYING","FAILED"]},"in":{"type":"array","items":{"type":"string","enum":["PENDING","SUCCESSFUL","RETRYING","FAILED"]}},"notIn":{"type":"array","items":{"type":"string","enum":["PENDING","SUCCESSFUL","RETRYING","FAILED"]}}},"additionalProperties":false},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"webhook":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"}}},"AND":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEventFilter"}},"OR":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEventFilter"}}}},"CreateAuthLinkPayload":{"type":"object","properties":{"url":{"type":"string","description":"Authenticated URL the customer can use to access the portal.","example":"https://portal.example.com/al/abc123"}},"required":["url"],"description":"Response containing an authenticated customer portal link."},"UserError":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}},"required":["error"],"additionalProperties":false,"description":"Standard user-facing error response envelope."},"CreateAuthLinkArgs":{"type":"object","properties":{"input":{"type":"object","properties":{"url":{"type":"string","description":"Optional target URL to redirect the customer to after authentication.","example":"https://portal.example.com/pagos"},"customerId":{"type":"string","description":"Identifier of the customer to create an auth link for.","example":"cus_1234567890abcdefghij"}},"required":["customerId"]}},"required":["input"],"description":"Request body for creating an authenticated customer portal link."},"CreateCustomerPortalSessionPayload":{"type":"object","properties":{"url":{"type":"string","description":"Authenticated URL the customer can use to access the portal session.","example":"https://portal.example.com/l/abc123"}},"required":["url"],"description":"Response containing an authenticated customer portal session link."},"CreateCustomerPortalSessionArgs":{"type":"object","properties":{"input":{"oneOf":[{"type":"object","properties":{"destination":{"type":"string","enum":["home"],"description":"Sends the customer to the customer portal home page.","example":"home"},"customerId":{"type":"string","description":"Identifier of the customer to create a portal session for.","example":"cus_1234567890abcdefghij"}},"required":["destination","customerId"],"description":"Home"},{"type":"object","properties":{"destination":{"type":"string","enum":["preferences"],"description":"Sends the customer to the customer portal preferences page.","example":"preferences"},"customerId":{"type":"string","description":"Identifier of the customer to create a portal session for.","example":"cus_1234567890abcdefghij"}},"required":["destination","customerId"],"description":"Preferences"},{"type":"object","properties":{"destination":{"type":"string","enum":["invoice-checkout"],"description":"Sends the customer to the checkout page for a specific invoice.","example":"invoice-checkout"},"customerId":{"type":"string","description":"Identifier of the customer to create a portal session for.","example":"cus_1234567890abcdefghij"},"invoiceId":{"type":"string","description":"Identifier of the invoice to send the customer to.","example":"inv_1234567890abcdefghij"}},"required":["destination","customerId","invoiceId"],"description":"Invoice checkout"},{"type":"object","properties":{"destination":{"type":"string","enum":["subscription-home"],"description":"Sends the customer to the detail page for a specific subscription.","example":"subscription-home"},"customerId":{"type":"string","description":"Identifier of the customer to create a portal session for.","example":"cus_1234567890abcdefghij"},"subscriptionId":{"type":"string","description":"Identifier of the subscription to send the customer to.","example":"sub_1234567890abcdefghij"}},"required":["destination","customerId","subscriptionId"],"description":"Subscription home"}]}},"required":["input"],"description":"Request body for creating an authenticated customer portal session."},"GetInvoicesResponse":{"type":"array","items":{"$ref":"#/components/schemas/FullInvoice"},"description":"List of invoices returned by the query."},"FullInvoice":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the invoice.","example":"inv_1234567890abcdefghij"},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time when the invoice was created.","example":"2025-01-10T12:00:00.000Z"},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time when the invoice was last updated.","example":"2025-01-10T12:00:00.000Z"},"customerId":{"type":"string","description":"Identifier of the customer this invoice belongs to.","example":"cus_1234567890abcdefghij"},"subscriptionId":{"type":["string","null"],"description":"Identifier of the subscription that generated this invoice, if any.","example":"sub_1234567890abcdefghij"},"collectionMethod":{"type":"string","enum":["AUTOMATIC","SEND_REMINDER","NONE"],"description":"How payment is collected: AUTOMATIC, SEND_REMINDER, or NONE.","example":"SEND_REMINDER"},"totalAmount":{"type":"number","description":"Computed total amount of the invoice in minor units.","example":150000},"currency":{"type":"string","description":"ISO 4217 currency code for the invoice.","example":"MXN"},"dueDate":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time when payment is due.","example":"2025-02-01T06:00:00.000Z"},"expireDate":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when the invoice expires.","example":null},"organizationId":{"type":"string","description":"Identifier of the organization that owns this invoice.","example":"org_1234567890abcdefghij"},"isPaid":{"type":"boolean","description":"Whether the invoice has been fully paid.","example":false},"paidById":{"type":["string","null"],"description":"Identifier of the customer who paid the invoice.","example":null},"amountPaid":{"type":"number","description":"Total amount paid so far in minor units.","example":0},"beneficiaryId":{"type":["string","null"],"description":"Identifier of the beneficiary customer, if any.","example":null},"allowOfftimePayment":{"type":"boolean","description":"Whether payment is accepted outside the due window.","example":false},"paidWithId":{"type":["string","null"],"description":"Identifier of the payment that settled the invoice.","example":null},"canceledAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when the invoice was canceled.","example":null},"canceledById":{"type":["string","null"],"description":"Identifier of the user who canceled the invoice.","example":null},"items":{"type":"array","items":{"$ref":"#/components/schemas/FullInvoiceItem"}},"metadata":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"description":"Structured metadata entries attached to the invoice.","example":[]},"meta":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Flattened metadata map where each key maps to a string value.","example":{"Ciclo Escolar":"2025-1"}}},"required":["id","createdAt","updatedAt","customerId","subscriptionId","collectionMethod","totalAmount","currency","dueDate","expireDate","organizationId","isPaid","paidById","amountPaid","beneficiaryId","allowOfftimePayment","paidWithId","canceledAt","canceledById","items"],"description":"An invoice with fully expanded line items including concept and group details."},"FullInvoiceItem":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the invoice item.","example":"invi_1234567890abcdefghij"},"description":{"type":"string","description":"Human-readable description of the line item.","example":"Colegiatura Enero 2025"},"conceptId":{"type":["string","null"],"description":"Identifier of the payment concept for this item.","example":"pc_1234567890abcdefghij"},"quantity":{"type":"number","minimum":1,"description":"Quantity of units for this line item.","example":1},"concept":{"$ref":"#/components/schemas/InvoiceItemConcept"}},"required":["id","description","conceptId","quantity","concept"],"description":"An invoice line item including its full concept details."},"InvoiceItemConcept":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier of the payment concept.","example":"pc_1234567890abcdefghij"},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the concept was created.","example":"2025-01-01T00:00:00.000Z"},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the concept was last updated.","example":"2025-01-01T00:00:00.000Z"},"displayName":{"type":"string","description":"Name of the product or service shown to customers.","example":"Colegiatura"},"description":{"type":["string","null"],"description":"Optional longer description of the product or service.","example":"Colegiatura mensual de preparatoria"},"amount":{"type":"number","description":"Unit price in minor currency units (e.g. cents).","example":150000},"currency":{"type":"string","description":"ISO 4217 currency code.","example":"MXN"},"organizationId":{"type":"string","description":"Identifier of the owning organization.","example":"org_1234567890abcdefghij"},"active":{"type":"boolean","description":"Whether this concept is currently available for use.","example":true},"sku":{"type":["string","null"],"description":"Optional SKU for internal identification.","example":"COL-PREP-001"},"recurrentDetailId":{"type":["string","null"],"description":"Identifier of the recurrence configuration, if applicable.","example":null},"amountEditable":{"type":"boolean","description":"Whether customers can customize the price.","example":false},"quantityEditable":{"type":"boolean","description":"Whether customers can customize the quantity.","example":false},"archivedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when the concept was archived, if any.","example":null},"oneOff":{"type":"boolean","description":"Whether this concept is a one-time custom charge.","example":false},"groupId":{"type":["string","null"],"description":"Identifier of the group this concept belongs to, if any.","example":null},"recurrentDetail":{"type":["object","null"],"properties":{"collectionInterval":{"type":"string","enum":["DAY","WEEK","FORTNIGHT","MONTH","YEAR"],"description":"Time interval unit for recurring charges.","example":"MONTH"},"chargeEach":{"type":"number","description":"Number of intervals between charges.","example":1},"toleranceDays":{"type":["number","null"],"description":"Grace days after the due date before the invoice expires.","example":5}},"required":["collectionInterval","chargeEach"],"description":"Recurrence configuration when the concept is a recurring charge.","example":null},"metadata":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"description":"Structured metadata entries attached to the concept.","example":[]},"meta":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Flattened metadata map where each key maps to a string value.","example":{}},"group":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier of the payment concept group.","example":"pcg_1234567890abcdefghij"},"name":{"type":"string","description":"Display name of the group.","example":"Colegiaturas"}},"required":["id","name"],"description":"Group this concept belongs to, if any."}},"required":["id","createdAt","updatedAt","displayName","description","amount","currency","organizationId","active","sku","recurrentDetailId","amountEditable","quantityEditable","archivedAt","oneOff","groupId","group"],"description":"Payment concept associated with the invoice item, including its group."},"GetInvoiceResponse":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier of the invoice.","example":"inv_1234567890abcdefghij"},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time when the invoice was created.","example":"2025-01-10T12:00:00.000Z"},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time when the invoice was last updated.","example":"2025-01-10T12:00:00.000Z"},"customerId":{"type":"string","description":"Identifier of the customer this invoice belongs to.","example":"cus_1234567890abcdefghij"},"subscriptionId":{"type":["string","null"],"description":"Identifier of the subscription that generated this invoice, if any.","example":"sub_1234567890abcdefghij"},"collectionMethod":{"type":"string","enum":["AUTOMATIC","SEND_REMINDER","NONE"],"description":"How payment is collected: AUTOMATIC, SEND_REMINDER, or NONE.","example":"SEND_REMINDER"},"totalAmount":{"type":"number","description":"Computed total amount of the invoice in minor units.","example":150000},"currency":{"type":"string","description":"ISO 4217 currency code for the invoice.","example":"MXN"},"dueDate":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time when payment is due.","example":"2025-02-01T06:00:00.000Z"},"expireDate":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when the invoice expires.","example":null},"organizationId":{"type":"string","description":"Identifier of the organization that owns this invoice.","example":"org_1234567890abcdefghij"},"isPaid":{"type":"boolean","description":"Whether the invoice has been fully paid.","example":false},"paidById":{"type":["string","null"],"description":"Identifier of the customer who paid the invoice.","example":null},"amountPaid":{"type":"number","description":"Total amount paid so far in minor units.","example":0},"beneficiaryId":{"type":["string","null"],"description":"Identifier of the beneficiary customer, if any.","example":null},"allowOfftimePayment":{"type":"boolean","description":"Whether payment is accepted outside the due window.","example":false},"paidWithId":{"type":["string","null"],"description":"Identifier of the payment that settled the invoice.","example":null},"canceledAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when the invoice was canceled.","example":null},"canceledById":{"type":["string","null"],"description":"Identifier of the user who canceled the invoice.","example":null},"items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItem"},"description":"Line items included in this invoice.","example":[{"id":"invi_1234567890abcdefghij","description":"Colegiatura Enero 2025","conceptId":"pc_1234567890abcdefghij","concept":null,"quantity":1}]},"metadata":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"description":"Structured metadata entries attached to the invoice.","example":[]},"meta":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Flattened metadata map where each key maps to a string value.","example":{"Ciclo Escolar":"2025-1"}}},"required":["id","createdAt","updatedAt","customerId","subscriptionId","collectionMethod","totalAmount","currency","dueDate","expireDate","organizationId","isPaid","paidById","amountPaid","beneficiaryId","allowOfftimePayment","paidWithId","canceledAt","canceledById","items"],"description":"Invoice details response. Returns null if the invoice does not exist."},"InvoiceItem":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the invoice item.","example":"invi_1234567890abcdefghij"},"description":{"type":"string","description":"Human-readable description of the line item.","example":"Colegiatura Enero 2025"},"conceptId":{"type":["string","null"],"description":"Identifier of the payment concept for this item.","example":"pc_1234567890abcdefghij"},"quantity":{"type":"number","minimum":1,"description":"Quantity of units for this line item.","example":1}},"required":["id","description","conceptId","quantity"],"description":"A single line item within an invoice."},"CreateInvoicePayload":{"type":"object","properties":{"invoice":{"$ref":"#/components/schemas/Invoice"}},"required":["invoice"],"description":"Successful invoice creation response."},"Invoice":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the invoice.","example":"inv_1234567890abcdefghij"},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time when the invoice was created.","example":"2025-01-10T12:00:00.000Z"},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time when the invoice was last updated.","example":"2025-01-10T12:00:00.000Z"},"customerId":{"type":"string","description":"Identifier of the customer this invoice belongs to.","example":"cus_1234567890abcdefghij"},"subscriptionId":{"type":["string","null"],"description":"Identifier of the subscription that generated this invoice, if any.","example":"sub_1234567890abcdefghij"},"collectionMethod":{"type":"string","enum":["AUTOMATIC","SEND_REMINDER","NONE"],"description":"How payment is collected: AUTOMATIC, SEND_REMINDER, or NONE.","example":"SEND_REMINDER"},"totalAmount":{"type":"number","description":"Computed total amount of the invoice in minor units.","example":150000},"currency":{"type":"string","description":"ISO 4217 currency code for the invoice.","example":"MXN"},"dueDate":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time when payment is due.","example":"2025-02-01T06:00:00.000Z"},"expireDate":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when the invoice expires.","example":null},"organizationId":{"type":"string","description":"Identifier of the organization that owns this invoice.","example":"org_1234567890abcdefghij"},"isPaid":{"type":"boolean","description":"Whether the invoice has been fully paid.","example":false},"paidById":{"type":["string","null"],"description":"Identifier of the customer who paid the invoice.","example":null},"amountPaid":{"type":"number","description":"Total amount paid so far in minor units.","example":0},"beneficiaryId":{"type":["string","null"],"description":"Identifier of the beneficiary customer, if any.","example":null},"allowOfftimePayment":{"type":"boolean","description":"Whether payment is accepted outside the due window.","example":false},"paidWithId":{"type":["string","null"],"description":"Identifier of the payment that settled the invoice.","example":null},"canceledAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when the invoice was canceled.","example":null},"canceledById":{"type":["string","null"],"description":"Identifier of the user who canceled the invoice.","example":null},"items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItem"},"description":"Line items included in this invoice.","example":[{"id":"invi_1234567890abcdefghij","description":"Colegiatura Enero 2025","conceptId":"pc_1234567890abcdefghij","concept":null,"quantity":1}]},"metadata":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"description":"Structured metadata entries attached to the invoice.","example":[]},"meta":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Flattened metadata map where each key maps to a string value.","example":{"Ciclo Escolar":"2025-1"}}},"required":["id","createdAt","updatedAt","customerId","subscriptionId","collectionMethod","totalAmount","currency","dueDate","expireDate","organizationId","isPaid","paidById","amountPaid","beneficiaryId","allowOfftimePayment","paidWithId","canceledAt","canceledById","items"],"description":"Invoice record representing a payment request sent to a customer."},"CreateInvoiceArgs":{"type":"object","properties":{"input":{"type":"object","properties":{"dueDate":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date when the invoice is due for payment.","example":"2025-06-01T00:00:00.000Z"},"expireDate":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Optional date after which the invoice can no longer be paid. Must be after dueDate.","example":null},"collectionMethod":{"type":"string","enum":["AUTOMATIC","SEND_REMINDER","NONE"],"description":"How payment is collected: SEND_REMINDER sends a notification, AUTOMATIC charges a saved payment method, NONE does nothing.","example":"SEND_REMINDER"},"customerId":{"type":"string","description":"Identifier of the customer being invoiced.","example":"cus_1234567890abcdefghij"},"subscriptionId":{"type":["string","null"],"description":"Optional subscription this invoice belongs to.","example":null},"allowOfftimePayment":{"type":["boolean","null"],"description":"Whether the customer can pay before the due date.","example":null},"beneficiaryId":{"type":["string","null"],"description":"Optional identifier of a different customer who is the actual beneficiary of the invoice.","example":null},"modifiers":{"type":"array","items":{"type":"object","properties":{"modifierId":{"type":"string","description":"Identifier of the price modifier to attach.","example":"prm_1234567890abcdefghij"}},"required":["modifierId"],"additionalProperties":false},"description":"Price modifiers (early payment discounts or late payment interest) to apply to this invoice."},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string","description":"Identifier of the discount to apply.","example":"disc_1234567890abcdefghij"}},"required":["discountId"],"additionalProperties":false},"description":"Discounts to apply to this invoice."},"metadata":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string","description":"Metadata key.","example":"student_id"},"value":{"type":"string","description":"Metadata value.","example":"ALU-2025-001"}},"required":["key","value"],"additionalProperties":false},"description":"Deprecated: use meta instead. Custom key-value metadata to attach to the invoice.","deprecated":true},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata map attached to the invoice.","example":{"externalInvoiceId":"INV-2025-001"}},"items":{"type":"array","items":{"type":"object","properties":{"conceptId":{"type":["string","null"],"minLength":1,"description":"Identifier of an existing payment concept. Mutually exclusive with `concept`.","example":"pc_1234567890abcdefghij"},"concept":{"type":["object","null"],"properties":{"displayName":{"type":"string","description":"Display name shown on the invoice line item.","example":"Colegiatura Marzo"},"amount":{"type":"number","minimum":0,"maximum":99999999999,"description":"Unit price in minor currency units (e.g. cents).","example":150000},"currency":{"type":"string","description":"ISO 4217 currency code.","example":"MXN"}},"required":["displayName","amount","currency"],"additionalProperties":false,"description":"Inline concept definition. Mutually exclusive with `conceptId`."},"quantity":{"type":["number","null"],"minimum":1,"description":"Number of units. Defaults to 1.","example":1},"amount":{"type":["number","null"],"minimum":0,"maximum":99999999999,"description":"Override unit price in minor currency units. Uses the concept price when omitted.","example":null},"currency":{"type":["string","null"],"description":"Override ISO 4217 currency code. Uses the concept currency when omitted.","example":null},"description":{"type":["string","null"],"minLength":1,"description":"Override line-item description. Uses the concept display name when omitted.","example":null}},"additionalProperties":false},"minItems":1,"maxItems":100,"description":"Line items for the invoice. Each must reference an existing concept or provide an inline concept."}},"required":["dueDate","collectionMethod","customerId","items"],"additionalProperties":false}},"required":["input"],"additionalProperties":false,"description":"Request body for creating an invoice."},"UpdateInvoicePayload":{"type":"object","properties":{"invoice":{"$ref":"#/components/schemas/Invoice"}},"required":["invoice"],"description":"Successful invoice update response."},"UpdateInvoiceArgs":{"type":"object","properties":{"input":{"type":"object","properties":{"data":{"type":"object","properties":{"dueDate":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"New date when the invoice is due for payment."},"expireDate":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"New date after which the invoice can no longer be paid."},"collectionMethod":{"type":"string","enum":["AUTOMATIC","SEND_REMINDER","NONE"],"description":"How future payment collection for this invoice should be handled."},"beneficiaryId":{"type":["string","null"],"description":"Different customer who should be recorded as the invoice beneficiary, if applicable."},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":["string","null"]}},"required":["key"]},"deprecated":true,"description":"Deprecated: use meta instead."},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata entries to update on the invoice. Existing keys not included remain unchanged.","example":{"externalInvoiceId":"INV-2025-001"}},"items":{"type":"array","items":{"type":"object","properties":{"conceptId":{"type":["string","null"],"description":"Identifier of an existing payment concept. Mutually exclusive with `concept`."},"concept":{"type":["object","null"],"properties":{"displayName":{"type":"string","description":"Display name for an inline concept."},"amount":{"type":"number","description":"Unit price in minor currency units."},"currency":{"type":"string","description":"ISO 4217 currency code."}},"required":["displayName","amount","currency"],"description":"Inline concept definition. Mutually exclusive with `conceptId`."},"quantity":{"type":"number","minimum":1,"description":"Number of units for the line item."},"amount":{"type":["number","null"],"minimum":0,"maximum":99999999999,"description":"Override unit price in minor currency units."},"currency":{"type":["string","null"],"description":"Override ISO 4217 currency code."},"description":{"type":["string","null"],"minLength":1,"description":"Override line-item description."}},"required":["quantity"],"description":"Invoice line item to create or update."},"minItems":1,"maxItems":100,"description":"Replacement line items for the invoice."},"modifiers":{"type":"array","items":{"type":"object","properties":{"modifierId":{"type":"string","description":"Identifier of the price modifier to apply."}},"required":["modifierId"]},"description":"Price modifiers to apply to the invoice."},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string","description":"Identifier of the discount to apply."}},"required":["discountId"],"additionalProperties":false},"description":"Discounts to apply to the invoice."}},"additionalProperties":false}},"required":["data"]}},"required":["input"],"description":"Request body for updating an invoice (id is provided in the URL path)."},"CancelInvoicePayload":{"type":"object","properties":{"invoice":{"$ref":"#/components/schemas/Invoice"}},"required":["invoice"],"description":"Successful invoice cancellation response."},"GetPaymentLinkResponse":{"type":"object","properties":{"url":{"type":"string","description":"Authenticated URL the customer can use to pay the invoice."},"expiresAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time when the payment link expires."},"invoice":{"$ref":"#/components/schemas/Invoice"}},"required":["url","expiresAt","invoice"],"description":"Payment link details for an invoice."},"RetryInvoicePaymentPayload":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the payment attempt succeeded."},"payment":{"$ref":"#/components/schemas/Payment"},"invoice":{"$ref":"#/components/schemas/Invoice"}},"required":["success","payment","invoice"],"description":"Result of retrying a payment for an invoice."},"Payment":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the payment.","example":"p_1234567890abcdefghij"},"createdAt":{"type":"string","format":"date-time","description":"When the payment record was created.","example":"2025-01-15T18:30:00.000Z"},"updatedAt":{"type":"string","format":"date-time","description":"When the payment was last updated.","example":"2025-01-15T18:30:00.000Z"},"amount":{"type":"number","description":"Payment amount in minor currency units.","example":150000},"currency":{"type":"string","description":"ISO 4217 currency code.","example":"MXN"},"description":{"type":["string","null"],"description":"Human-readable description of the payment.","example":"Colegiatura Enero 2025"},"type":{"type":["string","null"],"enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT",null],"description":"Payment type.","example":"CARD"},"status":{"type":["string","null"],"enum":["INCOMPLETE","COMPLETE","CANCELED","INITIATED","REFUNDED","DISPUTED","REVERTED",null],"description":"Current payment status.","example":"COMPLETE"},"isCompleted":{"type":"boolean","description":"Whether the payment has been fully settled.","example":true},"paymentTime":{"type":["string","null"],"format":"date-time","description":"Date and time when the payment was completed.","example":"2025-01-15T18:30:00.000Z"},"customerId":{"type":"string","description":"Identifier of the customer who made the payment.","example":"cus_1234567890abcdefghij"},"paymentIntentId":{"type":["string","null"],"description":"Payment processor intent identifier, if any.","example":null},"paymentMethodId":{"type":["string","null"],"description":"Identifier of the payment method used, if any.","example":"pm_1234567890abcdefghij"},"organizationId":{"type":"string","description":"Identifier of the owning organization.","example":"org_1234567890abcdefghij"},"skipTaxInvoice":{"type":"boolean","description":"Whether tax invoice generation is skipped for this payment.","example":false},"monthlyInstallments":{"type":["integer","null"],"description":"Number of monthly installments, if any.","example":null},"processor":{"type":["string","null"],"enum":["FISERV","KUSHKI","QUENTLI","SANTANDER","STRIPE","TAPI",null],"description":"Processor that handled the payment, if any.","example":null},"processorFee":{"type":["integer","null"],"description":"Processor fee in minor currency units, if known.","example":null},"processorFeeTax":{"type":["integer","null"],"description":"Tax on the processor fee in minor currency units, if known.","example":null},"installmentsFee":{"type":["integer","null"],"description":"Installments fee in minor currency units, if any.","example":null},"installmentsFeeTax":{"type":["integer","null"],"description":"Tax on the installments fee in minor currency units, if any.","example":null},"externalPaymentTypeId":{"type":["string","null"],"description":"External payment type identifier when type is OTHER.","example":null},"sessionId":{"type":["string","null"],"description":"Payment session identifier associated with this payment, if any.","example":null},"metadata":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},"description":"Structured metadata entries.","example":null},"meta":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Flattened metadata key-value map.","example":null}},"required":["id","createdAt","updatedAt","amount","currency","description","type","status","isCompleted","paymentTime","customerId","paymentIntentId","organizationId","skipTaxInvoice","monthlyInstallments","processor","processorFee","processorFeeTax","installmentsFee","installmentsFeeTax","externalPaymentTypeId","sessionId"],"description":"A payment record for a completed or pending transaction."},"MarkInvoiceAsPaidPayload":{"type":"object","properties":{"invoice":{"$ref":"#/components/schemas/Invoice"}},"required":["invoice"],"description":"Response after marking an invoice as paid."},"MarkInvoiceAsPaidArgs":{"type":"object","properties":{"input":{"type":"object","properties":{"externalTypeId":{"type":["string","null"]},"paymentTime":{"type":"string","format":"date-time"}}}},"required":["input"],"description":"Optional body for marking an invoice as paid (id is in the URL path)."},"ObtainInvoicePaymentPayload":{"type":"object","properties":{"payment":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the pending payment.","example":"p_1234567890abcdefghij"},"amount":{"type":"integer","description":"Payment amount in minor currency units.","example":25000},"currency":{"type":"string","description":"ISO 4217 currency code.","example":"MXN"},"isCompleted":{"type":"boolean","enum":[false],"description":"Always false while the payment instructions are pending.","example":false},"type":{"type":"string","enum":["CASH"]},"cashPaymentInstructions":{"type":"object","properties":{"reference":{"type":"string","description":"Reference used to pay in cash.","example":"12345678901234567890"},"expiresAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"When the cash reference expires, if applicable.","example":null}},"required":["reference","expiresAt"],"additionalProperties":false}},"required":["id","amount","currency","isCompleted","type","cashPaymentInstructions"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the pending payment.","example":"p_1234567890abcdefghij"},"amount":{"type":"integer","description":"Payment amount in minor currency units.","example":25000},"currency":{"type":"string","description":"ISO 4217 currency code.","example":"MXN"},"isCompleted":{"type":"boolean","enum":[false],"description":"Always false while the payment instructions are pending.","example":false},"type":{"type":"string","enum":["TRANSFER"]},"transferInstruction":{"type":"object","properties":{"bankName":{"type":"string","description":"Receiving bank name.","example":"STP"},"clabe":{"type":"string","description":"Receiving CLABE for the transfer.","example":"646180157000000001"},"reference":{"type":["string","null"],"description":"Transfer reference, if required.","example":"123456"},"expiresAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"When the transfer instruction expires, if applicable.","example":null}},"required":["bankName","clabe","reference","expiresAt"],"additionalProperties":false}},"required":["id","amount","currency","isCompleted","type","transferInstruction"],"additionalProperties":false}]}},"required":["payment"],"additionalProperties":false,"description":"Pending invoice payment with the instructions required to complete it."},"ObtainInvoicePaymentRequest":{"type":"object","properties":{"input":{"type":"object","properties":{"paymentType":{"type":"string","enum":["CASH","TRANSFER"],"description":"Offline payment type to obtain for the invoice.","example":"TRANSFER"}},"required":["paymentType"],"additionalProperties":false}},"required":["input"],"additionalProperties":false,"description":"Request body for obtaining a CASH or TRANSFER payment. Invoice ID is provided in the URL path."},"ApplyInvoicePaymentPayload":{"type":"object","properties":{"invoice":{"$ref":"#/components/schemas/Invoice"}},"required":["invoice"],"description":"Response after applying a payment to an invoice."},"ApplyInvoicePaymentArgs":{"type":"object","properties":{"input":{"type":"object","properties":{"existingPayment":{"type":"object","properties":{"paymentId":{"type":"string","description":"Identifier of an existing payment to apply."},"settledAmount":{"type":"integer","exclusiveMinimum":0,"description":"Amount to settle against the invoice in minor units.","example":150000}},"required":["paymentId","settledAmount"]},"newPayment":{"type":"object","properties":{"amount":{"type":"integer","exclusiveMinimum":0,"description":"Payment amount in minor units.","example":150000},"externalTypeId":{"type":["string","null"],"description":"External payment type identifier.","example":null},"paymentTime":{"type":"string","format":"date-time","description":"When the external payment was received.","example":"2025-01-15T18:30:00.000Z"}},"required":["amount"]}},"additionalProperties":false}},"required":["input"],"additionalProperties":false,"description":"Request body for applying a full or partial payment to an invoice."},"SendPaymentReminderPayload":{"type":"object","properties":{"paymentReminder":{"$ref":"#/components/schemas/PaymentReminder"}},"required":["paymentReminder"],"description":"Response after sending a payment reminder."},"PaymentReminder":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier of the reminder.","example":"rem_1234567890abcdefghij"},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the reminder was created."},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the reminder was last updated."},"scheduledAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Scheduled sending time, if any.","example":null},"invoiceId":{"type":"string","description":"Invoice associated with this reminder.","example":"inv_1234567890abcdefghij"},"authLinkId":{"type":["string","null"],"description":"Auth link included in this reminder.","example":null},"type":{"type":["string","null"],"enum":["NEAR_DUE","DUE","NEAR_OVERDUE","FAILED_ATTEMPT","CUSTOM",null],"description":"Reminder type.","example":"DUE"},"outboundMessageId":{"type":["string","null"],"description":"Outbound message identifier.","example":null},"messageId":{"type":["string","null"],"description":"Conversation message identifier.","example":null},"templateId":{"type":["string","null"],"description":"Message template identifier.","example":null},"sentById":{"type":["string","null"],"description":"User that sent the reminder.","example":null}},"required":["id","createdAt","updatedAt","scheduledAt","invoiceId","authLinkId","type","outboundMessageId","messageId","templateId","sentById"],"description":"Payment reminder sent for an invoice."},"SendPaymentReminderArgs":{"type":"object","properties":{"input":{"type":"object","properties":{"channel":{"type":"string","enum":["EMAIL","SMS","WHATSAPP"],"description":"Channel used to send the reminder.","example":"WHATSAPP"}},"required":["channel"],"additionalProperties":false}},"required":["input"],"additionalProperties":false,"description":"Request body for sending a payment reminder (invoice id is provided in the URL path)."},"GetTaxInvoicesResponse":{"type":"array","items":{"$ref":"#/components/schemas/TaxInvoice"},"description":"List of tax invoices returned by the query."},"TaxInvoice":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the tax invoice.","example":"txi_1234567890abcdefghij"},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the tax invoice was created."},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the tax invoice was last updated."},"issueDate":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date when the tax invoice was issued.","example":null},"invoiceId":{"type":["string","null"],"description":"Related invoice identifier, if any.","example":null},"paymentId":{"type":["string","null"],"description":"Related payment identifier, if any.","example":null},"uuid":{"type":["string","null"],"description":"SAT UUID assigned to the tax invoice.","example":null},"verificationUrl":{"type":["string","null"],"description":"SAT verification URL.","example":null},"folio":{"type":["string","null"],"description":"Tax invoice folio.","example":null},"status":{"type":"string","enum":["VALID","CANCELED","PENDING","DRAFT","PENDING_CANCELLATION","FAILED"],"description":"Current tax invoice status.","example":"VALID"},"failureReason":{"type":["string","null"],"enum":["UNKNOWN","RFC_DOMICILE_MISMATCH","RFC_LEGAL_NAME_MISMATCH","CFDI_USAGE_MISMATCH","ISSUE_DATE_OUT_OF_RANGE",null],"description":"Normalized issuance failure reason, if any.","example":null},"cancellationStatus":{"type":["string","null"],"description":"SAT cancellation status.","example":"none"},"cancellationMotive":{"type":["string","null"],"description":"SAT cancellation motive code.","example":null},"cancelRequestedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when cancellation was requested.","example":null},"canceledAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when cancellation completed.","example":null},"canceledById":{"type":["string","null"],"description":"User that requested cancellation.","example":null},"cancellationSubstitution":{"type":["string","null"],"description":"Substitution UUID used for cancellation motive 01.","example":null},"satType":{"type":["string","null"],"description":"SAT invoice type code.","example":"I"},"customerId":{"type":"string","description":"Customer identifier.","example":"cus_1234567890abcdefghij"},"type":{"type":"string","enum":["TAX_RECEIPT","TAX_INVOICE_PPD","TAX_INVOICE_PUE"],"description":"Quentli tax invoice type.","example":"TAX_INVOICE_PUE"},"paymentForm":{"type":["string","null"],"description":"SAT payment form.","example":"03"},"paymentMethod":{"type":["string","null"],"description":"SAT payment method.","example":"PUE"},"usage":{"type":["string","null"],"description":"CFDI usage code.","example":"G03"},"currency":{"type":"string","description":"ISO 4217 currency code.","example":"MXN"},"exchangeRate":{"type":["number","null"],"description":"Exchange rate used for non-MXN invoices.","example":null},"totalAmount":{"type":"number","description":"Tax invoice total amount in minor units.","example":150000},"pdfId":{"type":["string","null"],"description":"PDF file identifier, if available.","example":null},"xmlId":{"type":["string","null"],"description":"XML file identifier, if available.","example":null},"createdByUserId":{"type":["string","null"],"description":"User who created this tax invoice.","example":null},"createdByCustomerId":{"type":["string","null"],"description":"Customer who created this tax invoice.","example":null},"organizationId":{"type":"string","description":"Owning organization identifier.","example":"org_1234567890abcdefghij"},"substituteTaxInvoiceId":{"type":["string","null"],"description":"Tax invoice that substituted this one, if any.","example":null}},"required":["id","createdAt","updatedAt","issueDate","invoiceId","paymentId","uuid","verificationUrl","folio","status","failureReason","cancellationStatus","cancellationMotive","cancelRequestedAt","canceledAt","canceledById","cancellationSubstitution","satType","customerId","type","paymentForm","paymentMethod","usage","currency","totalAmount","organizationId"],"description":"Mexican fiscal invoice generated for an invoice or payment."},"GetTaxInvoiceResponse":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier of the tax invoice.","example":"txi_1234567890abcdefghij"},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the tax invoice was created."},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the tax invoice was last updated."},"issueDate":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date when the tax invoice was issued.","example":null},"invoiceId":{"type":["string","null"],"description":"Related invoice identifier, if any.","example":null},"paymentId":{"type":["string","null"],"description":"Related payment identifier, if any.","example":null},"uuid":{"type":["string","null"],"description":"SAT UUID assigned to the tax invoice.","example":null},"verificationUrl":{"type":["string","null"],"description":"SAT verification URL.","example":null},"folio":{"type":["string","null"],"description":"Tax invoice folio.","example":null},"status":{"type":"string","enum":["VALID","CANCELED","PENDING","DRAFT","PENDING_CANCELLATION","FAILED"],"description":"Current tax invoice status.","example":"VALID"},"failureReason":{"type":["string","null"],"enum":["UNKNOWN","RFC_DOMICILE_MISMATCH","RFC_LEGAL_NAME_MISMATCH","CFDI_USAGE_MISMATCH","ISSUE_DATE_OUT_OF_RANGE",null],"description":"Normalized issuance failure reason, if any.","example":null},"cancellationStatus":{"type":["string","null"],"description":"SAT cancellation status.","example":"none"},"cancellationMotive":{"type":["string","null"],"description":"SAT cancellation motive code.","example":null},"cancelRequestedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when cancellation was requested.","example":null},"canceledAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when cancellation completed.","example":null},"canceledById":{"type":["string","null"],"description":"User that requested cancellation.","example":null},"cancellationSubstitution":{"type":["string","null"],"description":"Substitution UUID used for cancellation motive 01.","example":null},"satType":{"type":["string","null"],"description":"SAT invoice type code.","example":"I"},"customerId":{"type":"string","description":"Customer identifier.","example":"cus_1234567890abcdefghij"},"type":{"type":"string","enum":["TAX_RECEIPT","TAX_INVOICE_PPD","TAX_INVOICE_PUE"],"description":"Quentli tax invoice type.","example":"TAX_INVOICE_PUE"},"paymentForm":{"type":["string","null"],"description":"SAT payment form.","example":"03"},"paymentMethod":{"type":["string","null"],"description":"SAT payment method.","example":"PUE"},"usage":{"type":["string","null"],"description":"CFDI usage code.","example":"G03"},"currency":{"type":"string","description":"ISO 4217 currency code.","example":"MXN"},"exchangeRate":{"type":["number","null"],"description":"Exchange rate used for non-MXN invoices.","example":null},"totalAmount":{"type":"number","description":"Tax invoice total amount in minor units.","example":150000},"pdfId":{"type":["string","null"],"description":"PDF file identifier, if available.","example":null},"xmlId":{"type":["string","null"],"description":"XML file identifier, if available.","example":null},"createdByUserId":{"type":["string","null"],"description":"User who created this tax invoice.","example":null},"createdByCustomerId":{"type":["string","null"],"description":"Customer who created this tax invoice.","example":null},"organizationId":{"type":"string","description":"Owning organization identifier.","example":"org_1234567890abcdefghij"},"substituteTaxInvoiceId":{"type":["string","null"],"description":"Tax invoice that substituted this one, if any.","example":null}},"required":["id","createdAt","updatedAt","issueDate","invoiceId","paymentId","uuid","verificationUrl","folio","status","failureReason","cancellationStatus","cancellationMotive","cancelRequestedAt","canceledAt","canceledById","cancellationSubstitution","satType","customerId","type","paymentForm","paymentMethod","usage","currency","totalAmount","organizationId"],"description":"Tax invoice details response. Returns null if the tax invoice does not exist."},"CreateTaxInvoicePayload":{"type":"object","properties":{"createdTaxInvoice":{"$ref":"#/components/schemas/TaxInvoice"}},"required":["createdTaxInvoice"],"description":"Newly created tax invoice."},"CreateTaxInvoiceArgs":{"type":"object","properties":{"input":{"type":"object","properties":{"invoiceId":{"type":"string","description":"Invoice to fiscalize.","example":"inv_1234567890abcdefghij"},"paymentId":{"type":"string","description":"Payment to fiscalize.","example":"p_1234567890abcdefghij"},"date":{"type":"string","format":"date-time","description":"Tax invoice issue date.","example":"2025-01-15T18:30:00.000Z"},"isPublicInvoice":{"type":"boolean","description":"Whether this is a public/global invoice."},"substituteOfId":{"type":"string","description":"Tax invoice being substituted, if any.","example":"txi_1234567890abcdefghij"},"exchangeRate":{"type":"number","description":"Exchange rate for non-MXN invoices.","example":18.5},"type":{"type":"string","enum":["TAX_RECEIPT","TAX_INVOICE_PPD","TAX_INVOICE_PUE"],"description":"Tax invoice type.","example":"TAX_INVOICE_PUE"},"customerTaxInfoId":{"type":"string","description":"Customer tax profile to use.","example":"cti_1234567890abcdefghij"}},"additionalProperties":false}},"required":["input"],"additionalProperties":false,"description":"Request body for creating a tax invoice."},"CancelTaxInvoicePayload":{"type":"object","properties":{"canceledTaxInvoice":{"$ref":"#/components/schemas/TaxInvoice"}},"required":["canceledTaxInvoice"],"description":"Canceled tax invoice."},"CancelTaxInvoiceArgs":{"type":"object","properties":{"input":{"type":"object","properties":{"motive":{"type":"string","enum":["01","02","03","04"],"description":"SAT cancellation motive code.","example":"02"},"substituteTaxInvoiceId":{"type":"string","description":"Replacement tax invoice id for motive 01.","example":"txi_1234567890abcdefghij"}},"required":["motive"],"additionalProperties":false}},"required":["input"],"additionalProperties":false,"description":"Request body for canceling a tax invoice (id is provided in the URL path)."},"GetSubscriptionsResponse":{"type":"array","items":{"$ref":"#/components/schemas/Subscription"},"description":"List of subscriptions returned by the query."},"Subscription":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the subscription.","example":"sub_1234567890abcdefghij"},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time when the subscription was created.","example":"2025-01-01T06:00:00.000Z"},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time when the subscription was last updated.","example":"2025-01-01T06:00:00.000Z"},"description":{"type":["string","null"],"description":"Human-readable description of the subscription.","example":"Colegiatura mensual"},"customerId":{"type":"string","description":"Identifier of the customer this subscription belongs to.","example":"cus_1234567890abcdefghij"},"status":{"type":["string","null"],"enum":["INACTIVE","ACTIVE","CANCELED","COMPLETED",null],"description":"Current status: INACTIVE, ACTIVE, CANCELED, or COMPLETED.","example":"ACTIVE"},"collectionMethod":{"type":"string","enum":["AUTOMATIC","SEND_REMINDER","NONE"],"description":"How payment is collected: AUTOMATIC, SEND_REMINDER, or NONE.","example":"AUTOMATIC"},"paymentMethodId":{"type":["string","null"],"description":"Identifier of the payment method used for automatic collection.","example":"pm_1234567890abcdefghij"},"taxProfileId":{"type":["string","null"],"description":"Identifier of the tax profile used for invoice generation.","example":null},"nextCollectionDate":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time of the next scheduled collection.","example":"2025-02-01T06:00:00.000Z"},"firstCollectionDate":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time of the first collection.","example":"2025-01-01T06:00:00.000Z"},"lastCollectionDate":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time of the last collection, if set.","example":"2025-12-01T06:00:00.000Z"},"generationMode":{"type":"string","enum":["MANUAL","AUTO"],"description":"Whether invoices are generated manually or automatically.","example":"AUTO"},"metadata":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Flattened metadata map where each key maps to a string value.","example":{"Nivel":"Preparatoria"}},"meta":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Flattened metadata map where each key maps to a string value.","example":{"Nivel":"Preparatoria"}},"onlyAutomaticCollection":{"type":"boolean","description":"Whether only automatic collection is allowed.","example":false},"customCancelReason":{"type":["string","null"],"description":"Custom cancellation reason provided by the user.","example":null},"canceledAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when the subscription was canceled.","example":null},"canceledById":{"type":["string","null"],"description":"Identifier of the user who canceled the subscription.","example":null},"isActive":{"type":"boolean","description":"Whether the subscription is currently active.","example":true},"isCompleted":{"type":"boolean","description":"Whether the subscription has completed all scheduled collections.","example":false}},"required":["id","createdAt","updatedAt","description","customerId","collectionMethod","paymentMethodId","taxProfileId","nextCollectionDate","firstCollectionDate","lastCollectionDate","generationMode","onlyAutomaticCollection","customCancelReason","canceledAt","canceledById","isActive","isCompleted"],"description":"Recurring billing subscription tied to a customer."},"GetSubscriptionResponse":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier of the subscription.","example":"sub_1234567890abcdefghij"},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time when the subscription was created.","example":"2025-01-01T06:00:00.000Z"},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time when the subscription was last updated.","example":"2025-01-01T06:00:00.000Z"},"description":{"type":["string","null"],"description":"Human-readable description of the subscription.","example":"Colegiatura mensual"},"customerId":{"type":"string","description":"Identifier of the customer this subscription belongs to.","example":"cus_1234567890abcdefghij"},"status":{"type":["string","null"],"enum":["INACTIVE","ACTIVE","CANCELED","COMPLETED",null],"description":"Current status: INACTIVE, ACTIVE, CANCELED, or COMPLETED.","example":"ACTIVE"},"collectionMethod":{"type":"string","enum":["AUTOMATIC","SEND_REMINDER","NONE"],"description":"How payment is collected: AUTOMATIC, SEND_REMINDER, or NONE.","example":"AUTOMATIC"},"paymentMethodId":{"type":["string","null"],"description":"Identifier of the payment method used for automatic collection.","example":"pm_1234567890abcdefghij"},"taxProfileId":{"type":["string","null"],"description":"Identifier of the tax profile used for invoice generation.","example":null},"nextCollectionDate":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time of the next scheduled collection.","example":"2025-02-01T06:00:00.000Z"},"firstCollectionDate":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time of the first collection.","example":"2025-01-01T06:00:00.000Z"},"lastCollectionDate":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time of the last collection, if set.","example":"2025-12-01T06:00:00.000Z"},"generationMode":{"type":"string","enum":["MANUAL","AUTO"],"description":"Whether invoices are generated manually or automatically.","example":"AUTO"},"metadata":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Flattened metadata map where each key maps to a string value.","example":{"Nivel":"Preparatoria"}},"meta":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Flattened metadata map where each key maps to a string value.","example":{"Nivel":"Preparatoria"}},"onlyAutomaticCollection":{"type":"boolean","description":"Whether only automatic collection is allowed.","example":false},"customCancelReason":{"type":["string","null"],"description":"Custom cancellation reason provided by the user.","example":null},"canceledAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when the subscription was canceled.","example":null},"canceledById":{"type":["string","null"],"description":"Identifier of the user who canceled the subscription.","example":null},"isActive":{"type":"boolean","description":"Whether the subscription is currently active.","example":true},"isCompleted":{"type":"boolean","description":"Whether the subscription has completed all scheduled collections.","example":false}},"required":["id","createdAt","updatedAt","description","customerId","collectionMethod","paymentMethodId","taxProfileId","nextCollectionDate","firstCollectionDate","lastCollectionDate","generationMode","onlyAutomaticCollection","customCancelReason","canceledAt","canceledById","isActive","isCompleted"],"description":"Subscription details response. Returns null if the subscription does not exist."},"CreateSubscriptionPayload":{"type":"object","properties":{"subscription":{"$ref":"#/components/schemas/Subscription"}},"required":["subscription"],"description":"Successful subscription creation response."},"CreateSubscriptionArgs":{"type":"object","properties":{"input":{"type":"object","properties":{"description":{"type":"string","description":"Human-readable description of the subscription. Auto-generated from item names when omitted.","example":"Colegiatura mensual"},"nextCollectionDate":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date of the first (or next) charge. Required when using recurring `items`.","example":"2025-06-01T00:00:00.000Z"},"numberOfPayments":{"type":["number","null"],"minimum":1,"maximum":1000,"description":"Total number of invoices to generate before the subscription ends. Null means indefinite.","example":12},"onlyAutomaticCollection":{"type":"boolean","description":"Whether this subscription only allows automatic payment collection.","example":false},"beneficiaryId":{"type":["string","null"],"description":"Optional identifier of a different customer who is the actual beneficiary.","example":null},"taxProfileId":{"type":["string","null"],"description":"Optional tax profile to use for invoice generation.","example":null},"customerId":{"type":"string","description":"Identifier of the customer who will be charged.","example":"cus_1234567890abcdefghij"},"templateId":{"type":"string","description":"Optional template to use for subscription messaging.","example":null},"collectionMethod":{"type":"string","enum":["SEND_REMINDER","AUTOMATIC","NONE"],"description":"How payment is collected: SEND_REMINDER sends a notification, AUTOMATIC charges a saved payment method, NONE does nothing.","example":"SEND_REMINDER"},"paymentMethodId":{"type":["string","null"],"description":"Identifier of the payment method to use for automatic collection. Falls back to the customer's default method.","example":null},"recurrentDetail":{"type":"object","properties":{"chargeEach":{"type":"number","minimum":1,"maximum":999,"description":"Number of intervals between charges.","example":1},"collectionInterval":{"type":"string","enum":["DAY","WEEK","FORTNIGHT","MONTH","YEAR"],"description":"Time interval unit (e.g. MONTH, WEEK).","example":"MONTH"},"toleranceDays":{"type":["integer","null"],"minimum":0,"description":"Grace days after the due date before the invoice expires.","example":5}},"required":["chargeEach","collectionInterval"],"description":"Custom recurrence configuration. Inferred from the concepts when omitted."},"modifiers":{"type":"array","items":{"type":"object","properties":{"modifierId":{"type":"string","description":"Identifier of the price modifier to attach.","example":"prm_1234567890abcdefghij"}},"required":["modifierId"]},"description":"Price modifiers (early payment discounts or late payment interest) to apply to every generated invoice."},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string","description":"Identifier of the discount to apply.","example":"disc_1234567890abcdefghij"},"maxInvoices":{"type":["integer","null"],"minimum":1,"description":"Maximum number of invoices this discount applies to. Null means all invoices.","example":3}},"required":["discountId"]},"description":"Discounts to apply to generated invoices."},"metadata":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string","description":"Metadata key.","example":"student_id"},"value":{"type":"string","description":"Metadata value.","example":"ALU-2025-001"}},"required":["key","value"],"additionalProperties":false},"description":"Deprecated: use meta instead. Custom key-value metadata to attach to the subscription.","deprecated":true},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata map attached to the subscription.","example":{"externalSubscriptionId":"CRED-123"}},"invoices":{"type":"array","items":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"conceptId":{"type":"string","description":"Identifier of the payment concept.","example":"pc_1234567890abcdefghij"},"quantity":{"type":"number","minimum":1,"description":"Number of units.","example":1},"amount":{"type":["number","null"],"minimum":0,"maximum":99999999999,"description":"Optional unit price snapshot in minor currency units.","example":150000},"currency":{"type":["string","null"],"description":"Optional ISO 4217 currency snapshot.","example":"MXN"},"description":{"type":["string","null"],"minLength":1,"description":"Optional line-item description snapshot.","example":"Colegiatura Junio"}},"required":["conceptId","quantity"]},"minItems":1,"maxItems":100,"description":"Line items for this invoice."},"dueDate":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Due date for this invoice.","example":"2025-06-01T00:00:00.000Z"},"expireDate":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Optional expiration date for this invoice.","example":null},"metadata":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string","description":"Metadata key.","example":"student_id"},"value":{"type":"string","description":"Metadata value.","example":"ALU-2025-001"}},"required":["key","value"],"additionalProperties":false},"description":"Deprecated: use meta instead. Custom key-value metadata to attach to the invoice.","deprecated":true},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata map attached to the invoice."}},"required":["items","dueDate"]},"minItems":1,"maxItems":1000,"description":"Pre-defined invoices with explicit due dates and items. Mutually exclusive with `items`."},"items":{"type":"array","items":{"type":"object","properties":{"conceptId":{"type":"string","description":"Identifier of the payment concept.","example":"pc_1234567890abcdefghij"},"quantity":{"type":"number","minimum":1,"description":"Number of units.","example":1},"amount":{"type":["number","null"],"minimum":0,"maximum":99999999999,"description":"Optional unit price snapshot in minor currency units.","example":150000},"currency":{"type":["string","null"],"description":"Optional ISO 4217 currency snapshot.","example":"MXN"},"description":{"type":["string","null"],"minLength":1,"description":"Optional line-item description snapshot.","example":"Colegiatura mensual"}},"required":["conceptId","quantity"]},"minItems":1,"maxItems":100,"description":"Recurring items whose invoices are auto-generated on each collection date. Mutually exclusive with `invoices`."}},"required":["customerId","collectionMethod"]}},"required":["input"],"description":"Request body for creating a subscription."},"UpdateSubscriptionPayload":{"type":"object","properties":{"subscription":{"$ref":"#/components/schemas/Subscription"}},"required":["subscription"],"description":"Successful subscription update response."},"UpdateSubscriptionArgs":{"type":"object","properties":{"input":{"type":"object","properties":{"data":{"type":"object","properties":{"description":{"type":"string","description":"New human-readable description of the subscription."},"lastCollectionDate":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date of the final collection for the subscription."},"numberOfPayments":{"type":["number","null"],"description":"Total number of invoices to generate. Null means the subscription is indefinite."},"nextCollectionDate":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date of the next scheduled collection."},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1},"value":{"type":["string","null"]}},"required":["key"]},"deprecated":true,"description":"Deprecated: use meta instead."},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata entries to update on the subscription. Existing keys not included remain unchanged.","example":{"externalSubscriptionId":"SUB-2025-001"}},"onlyAutomaticCollection":{"type":"boolean","description":"Whether invoices generated by this subscription may only be paid automatically."},"isActive":{"type":"boolean","description":"Whether the subscription should remain active."},"beneficiaryId":{"type":["string","null"],"description":"Different customer who should be recorded as the beneficiary, if applicable."},"taxProfileId":{"type":["string","null"],"description":"Tax profile to use for generated invoices."},"collectionMethod":{"type":"string","enum":["AUTOMATIC","SEND_REMINDER","NONE"],"description":"How invoices generated by the subscription should be collected."},"items":{"type":"array","items":{"type":"object","properties":{"conceptId":{"type":"string","description":"Identifier of the payment concept to bill repeatedly."},"quantity":{"type":"number","minimum":1,"description":"Number of units per generated invoice."},"amount":{"type":"number","minimum":0,"maximum":99999999999,"description":"Override unit price in minor currency units."},"currency":{"type":"string","description":"Override ISO 4217 currency code."},"description":{"type":"string","minLength":1,"description":"Override generated line-item description."}},"required":["conceptId","quantity"],"description":"Recurring line item used to generate future invoices."},"minItems":1,"maxItems":100,"description":"Recurring items used to generate future invoices."},"invoices":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Existing invoice identifier to update, if applicable."},"items":{"type":"array","items":{"type":"object","properties":{"conceptId":{"type":"string","description":"Identifier of the payment concept."},"quantity":{"type":"number","minimum":1,"description":"Number of units on the invoice."},"amount":{"type":["number","null"],"minimum":0,"maximum":99999999999,"description":"Optional unit price snapshot in minor currency units."},"currency":{"type":["string","null"],"description":"Optional ISO 4217 currency snapshot."},"description":{"type":["string","null"],"minLength":1,"description":"Optional line-item description snapshot."}},"required":["conceptId","quantity"]},"description":"Line items for the generated invoice."},"dueDate":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Due date for the generated invoice."}},"required":["items","dueDate"],"description":"Pre-defined invoice to generate as part of the subscription."},"minItems":1,"maxItems":100,"description":"Pre-defined invoices to generate. Mutually exclusive with recurring `items`."},"modifiers":{"type":"array","items":{"type":"object","properties":{"modifierId":{"type":"string","description":"Identifier of the price modifier to apply."}},"required":["modifierId"]},"description":"Price modifiers to apply to generated invoices."},"discounts":{"type":"array","items":{"type":"object","properties":{"discountId":{"type":"string","description":"Identifier of the discount to apply."},"maxInvoices":{"type":["integer","null"],"minimum":1,"description":"Maximum number of generated invoices that can receive this discount."}},"required":["discountId"]},"description":"Discounts to apply to generated invoices."}}}},"required":["data"]}},"required":["input"],"description":"Request body for updating a subscription (id is provided in the URL path)."},"CancelSubscriptionPayload":{"type":"object","properties":{"subscription":{"$ref":"#/components/schemas/Subscription"}},"required":["subscription"],"description":"Successful subscription cancellation response."},"CancelSubscriptionArgs":{"type":"object","properties":{"input":{"type":"object","properties":{"customCancelReason":{"type":"string"}}}},"required":["input"],"description":"Optional body for canceling a subscription (id is in the URL path)."},"RestoreSubscriptionPayload":{"type":"object","properties":{"subscription":{"$ref":"#/components/schemas/Subscription"},"restoredInvoicesCount":{"type":"integer","minimum":0}},"required":["subscription","restoredInvoicesCount"],"description":"Successful subscription restoration response."},"RestoreSubscriptionArgs":{"type":"object","properties":{"input":{"type":"object","properties":{"nextCollectionDate":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}]},"restoreInvoices":{"type":"boolean","default":true}}}},"required":["input"],"description":"Restores a canceled subscription and, optionally, its subscription-canceled invoices."},"DeletePaymentMethodPayload":{"type":"object","properties":{"paymentMethod":{"$ref":"#/components/schemas/PaymentMethod"}},"required":["paymentMethod"],"description":"Response after deleting a payment method."},"PaymentMethod":{"type":"object","properties":{"id":{"type":"string","description":"Payment method identifier."},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time when payment method was created."},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time when payment method was last updated."},"customerId":{"type":"string","description":"Identifier of the customer that owns this payment method."},"type":{"type":"string","enum":["CARD","MEXICAN_BANK_ACCOUNT"],"description":"Type of payment method (card or Mexican bank account)."},"confirmed":{"type":"boolean","description":"Whether this payment method can be used to collect payments."},"default":{"type":"boolean","description":"Whether this is the default method used for automatic collections."},"deletedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when this payment method was deleted.","example":null},"bankAccountId":{"type":["string","null"],"description":"Related bank account identifier, when applicable.","example":null},"expired":{"type":"boolean","description":"Whether this payment method is no longer valid."},"cardDetail":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Card detail identifier."},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time when card details were created."},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time when card details were last updated."},"expiryMonth":{"type":"number","description":"Card expiration month (1-12)."},"expiryYear":{"type":"number","description":"Card expiration year (YYYY)."},"cardholder":{"type":["string","null"],"description":"Name printed on the card, if available."},"bin":{"type":"string","description":"Bank Identification Number (first 8 digits when available)."},"last4":{"type":"string","description":"Last four digits of the card."},"brand":{"type":["string","null"],"description":"Card brand (e.g. VISA, MASTERCARD)."},"issuer":{"type":["string","null"],"description":"Issuing bank or institution."},"isCorporate":{"type":["boolean","null"],"description":"Whether the card is a corporate card."},"country":{"type":["string","null"],"description":"ISO country code for the card issuer."},"funding":{"type":["string","null"],"description":"Funding category (for example, CREDIT or DEBIT)."}},"required":["id","createdAt","updatedAt","expiryMonth","expiryYear","bin","last4"],"description":"Card details when `type` is `CARD`."},"bankAccount":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Bank account identifier."},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time when bank account was created."},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time when bank account was last updated."},"bankCode":{"type":"string","description":"Bank institution code."},"bankName":{"type":"string","description":"Bank institution name."},"customerId":{"type":["string","null"],"description":"Owner customer identifier."},"deletedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when this bank account was deleted."},"country":{"type":"string","description":"ISO country code where the account is registered."},"verified":{"type":"boolean","description":"Whether bank account ownership was verified."},"clabeLast":{"type":"string","description":"Last visible digits of the CLABE/account number."},"clabeFirst":{"type":"string","description":"First visible digits of the CLABE/account number."}},"required":["id","createdAt","updatedAt","bankCode","bankName","country","verified","clabeLast","clabeFirst"],"description":"Bank account details when `type` is `MEXICAN_BANK_ACCOUNT`."}},"required":["id","createdAt","updatedAt","customerId","type","confirmed","default","deletedAt","bankAccountId","expired"],"description":"Saved payment method associated with a customer."},"GetPaymentConceptsResponse":{"type":"array","items":{"$ref":"#/components/schemas/PaymentConcept"},"description":"List of payment concepts returned by the query."},"PaymentConcept":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the payment concept.","example":"pc_1234567890abcdefghij"},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the concept was created.","example":"2025-01-01T00:00:00.000Z"},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the concept was last updated.","example":"2025-01-01T00:00:00.000Z"},"displayName":{"type":"string","description":"Name of the product or service shown to customers.","example":"Colegiatura"},"description":{"type":["string","null"],"description":"Optional longer description of the product or service.","example":"Colegiatura mensual de preparatoria"},"amount":{"type":"number","description":"Unit price in minor currency units (e.g. cents).","example":150000},"currency":{"type":"string","description":"ISO 4217 currency code.","example":"MXN"},"organizationId":{"type":"string","description":"Identifier of the owning organization.","example":"org_1234567890abcdefghij"},"active":{"type":"boolean","description":"Whether this concept is currently available for use.","example":true},"sku":{"type":["string","null"],"description":"Optional SKU for internal identification.","example":"COL-PREP-001"},"recurrentDetailId":{"type":["string","null"],"description":"Identifier of the recurrence configuration, if applicable.","example":null},"amountEditable":{"type":"boolean","description":"Whether customers can customize the price.","example":false},"quantityEditable":{"type":"boolean","description":"Whether customers can customize the quantity.","example":false},"archivedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when the concept was archived, if any.","example":null},"oneOff":{"type":"boolean","description":"Whether this concept is a one-time custom charge.","example":false},"groupId":{"type":["string","null"],"description":"Identifier of the group this concept belongs to, if any.","example":null},"recurrentDetail":{"type":["object","null"],"properties":{"collectionInterval":{"type":"string","enum":["DAY","WEEK","FORTNIGHT","MONTH","YEAR"],"description":"Time interval unit for recurring charges.","example":"MONTH"},"chargeEach":{"type":"number","description":"Number of intervals between charges.","example":1},"toleranceDays":{"type":["number","null"],"description":"Grace days after the due date before the invoice expires.","example":5}},"required":["collectionInterval","chargeEach"],"description":"Recurrence configuration when the concept is a recurring charge.","example":null},"metadata":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"description":"Structured metadata entries attached to the concept.","example":[]},"meta":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Flattened metadata map where each key maps to a string value.","example":{}}},"required":["id","createdAt","updatedAt","displayName","description","amount","currency","organizationId","active","sku","recurrentDetailId","amountEditable","quantityEditable","archivedAt","oneOff","groupId"],"description":"A product or service template used to define invoice line items."},"GetPaymentConceptResponse":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier of the payment concept.","example":"pc_1234567890abcdefghij"},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the concept was created.","example":"2025-01-01T00:00:00.000Z"},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the concept was last updated.","example":"2025-01-01T00:00:00.000Z"},"displayName":{"type":"string","description":"Name of the product or service shown to customers.","example":"Colegiatura"},"description":{"type":["string","null"],"description":"Optional longer description of the product or service.","example":"Colegiatura mensual de preparatoria"},"amount":{"type":"number","description":"Unit price in minor currency units (e.g. cents).","example":150000},"currency":{"type":"string","description":"ISO 4217 currency code.","example":"MXN"},"organizationId":{"type":"string","description":"Identifier of the owning organization.","example":"org_1234567890abcdefghij"},"active":{"type":"boolean","description":"Whether this concept is currently available for use.","example":true},"sku":{"type":["string","null"],"description":"Optional SKU for internal identification.","example":"COL-PREP-001"},"recurrentDetailId":{"type":["string","null"],"description":"Identifier of the recurrence configuration, if applicable.","example":null},"amountEditable":{"type":"boolean","description":"Whether customers can customize the price.","example":false},"quantityEditable":{"type":"boolean","description":"Whether customers can customize the quantity.","example":false},"archivedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when the concept was archived, if any.","example":null},"oneOff":{"type":"boolean","description":"Whether this concept is a one-time custom charge.","example":false},"groupId":{"type":["string","null"],"description":"Identifier of the group this concept belongs to, if any.","example":null},"recurrentDetail":{"type":["object","null"],"properties":{"collectionInterval":{"type":"string","enum":["DAY","WEEK","FORTNIGHT","MONTH","YEAR"],"description":"Time interval unit for recurring charges.","example":"MONTH"},"chargeEach":{"type":"number","description":"Number of intervals between charges.","example":1},"toleranceDays":{"type":["number","null"],"description":"Grace days after the due date before the invoice expires.","example":5}},"required":["collectionInterval","chargeEach"],"description":"Recurrence configuration when the concept is a recurring charge.","example":null},"metadata":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"description":"Structured metadata entries attached to the concept.","example":[]},"meta":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Flattened metadata map where each key maps to a string value.","example":{}}},"required":["id","createdAt","updatedAt","displayName","description","amount","currency","organizationId","active","sku","recurrentDetailId","amountEditable","quantityEditable","archivedAt","oneOff","groupId"],"description":"Payment concept details. Returns null if not found."},"CreatePaymentConceptPayload":{"type":"object","properties":{"paymentConcept":{"$ref":"#/components/schemas/PaymentConcept"}},"required":["paymentConcept"],"description":"Newly created payment concept."},"CreatePaymentConceptArgs":{"type":"object","properties":{"input":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"maxLength":140,"description":"Display name of the concept shown to customers.","example":"Colegiatura"},"sku":{"type":["string","null"],"minLength":1,"description":"Optional unique SKU for internal identification.","example":"COL-PREP-001"},"description":{"type":["string","null"],"minLength":1,"description":"Optional longer description of the product or service.","example":"Colegiatura mensual de preparatoria"},"amount":{"type":"number","minimum":0,"maximum":99999999999,"description":"Unit price in minor currency units (e.g. cents).","example":150000},"amountEditable":{"type":"boolean","description":"Whether customers can customize the price.","example":false},"currency":{"type":["string","null"],"description":"ISO 4217 currency code. Defaults to the organization currency.","example":"MXN"},"quantityEditable":{"type":"boolean","description":"Whether customers can customize the quantity.","example":false},"oneOff":{"type":"boolean","description":"Whether this concept is a one-time custom charge.","example":false},"active":{"type":"boolean","description":"Whether this concept is immediately available for use.","example":true},"groupId":{"type":["string","null"],"description":"Optional identifier of the group to assign this concept to.","example":null},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Metadata key name."},"value":{"type":"string","minLength":1,"description":"Metadata value."}},"required":["key","value"]},"description":"Deprecated: use meta instead. Optional key-value metadata entries to attach to the concept.","example":[],"deprecated":true},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata map attached to the concept.","example":{"externalConceptId":"COL-PREP-001"}},"collectionInterval":{"type":["string","null"],"enum":["DAY","WEEK","FORTNIGHT","MONTH","YEAR"],"description":"Time interval unit for recurring charges (deprecated: use recurrentDetail instead).","example":"MONTH"},"chargeEach":{"type":["number","null"],"minimum":0,"description":"Number of intervals between charges (deprecated: use recurrentDetail instead).","example":1},"toleranceDays":{"type":["number","null"],"minimum":0,"description":"Grace days after due date (deprecated: use recurrentDetail instead).","example":null},"recurrentDetail":{"type":"object","properties":{"collectionInterval":{"type":"string","enum":["DAY","WEEK","FORTNIGHT","MONTH","YEAR"],"description":"Time interval unit for recurring charges.","example":"MONTH"},"chargeEach":{"type":"number","minimum":0,"description":"Number of intervals between charges.","example":1},"toleranceDays":{"type":["number","null"],"minimum":0,"description":"Grace days after the due date before the invoice expires.","example":5}},"required":["collectionInterval","chargeEach"],"additionalProperties":false,"description":"Recurrence configuration for a recurring concept.","example":null},"taxInfo":{"type":"object","properties":{"description":{"type":"string","description":"Tax description override."},"productKey":{"type":"string","description":"SAT product key."},"unitKey":{"type":"string","description":"SAT unit key."},"unitName":{"type":"string","description":"Unit name override."},"taxRate":{"type":"number","minimum":0,"maximum":1,"description":"Tax rate as a decimal between 0 and 1."},"taxability":{"type":"string","description":"SAT taxability code."}},"additionalProperties":false,"description":"Optional tax configuration for organizations with tax invoice generation enabled."}},"required":["displayName","amount"],"additionalProperties":false}},"required":["input"],"additionalProperties":false,"description":"Request body for creating a payment concept."},"UpdatePaymentConceptPayload":{"type":"object","properties":{"paymentConcept":{"$ref":"#/components/schemas/PaymentConcept"}},"required":["paymentConcept"],"description":"Updated payment concept."},"UpdatePaymentConceptArgs":{"type":"object","properties":{"input":{"type":"object","properties":{"data":{"type":"object","properties":{"displayName":{"type":"string","minLength":1,"description":"Updated display name of the concept.","example":"Colegiatura Preparatoria"},"sku":{"type":["string","null"],"minLength":1,"description":"Updated SKU. Pass null to clear.","example":"COL-PREP-001"},"description":{"type":["string","null"],"description":"Updated description. Pass null to clear.","example":null},"active":{"type":"boolean","description":"Whether the concept should be active.","example":true},"amount":{"type":"number","minimum":0,"description":"Updated unit price in minor currency units.","example":150000},"amountEditable":{"type":"boolean","description":"Whether customers can customize the price.","example":false},"archivedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Set to a date to archive, null to unarchive.","example":null},"archivedById":{"type":["string","null"],"description":"Identifier of the user archiving the concept.","example":null},"currency":{"type":["string","null"],"description":"Updated ISO 4217 currency code.","example":"MXN"},"groupId":{"type":["string","null"],"description":"Updated group identifier. Pass null to remove from group.","example":null},"quantityEditable":{"type":"boolean","description":"Whether customers can customize the quantity.","example":false},"recurrentDetail":{"type":"object","properties":{"collectionInterval":{"type":"string","enum":["DAY","WEEK","FORTNIGHT","MONTH","YEAR"],"description":"Time interval unit for recurring charges.","example":"MONTH"},"chargeEach":{"type":"number","minimum":0,"description":"Number of intervals between charges.","example":1},"toleranceDays":{"type":["number","null"],"minimum":0,"description":"Grace days after the due date before the invoice expires.","example":5}},"required":["collectionInterval","chargeEach"],"additionalProperties":false,"description":"Updated recurrence configuration.","example":null},"chargeEach":{"type":["number","null"],"description":"Deprecated: use recurrentDetail instead.","example":null},"collectionInterval":{"type":["string","null"],"enum":["DAY","WEEK","FORTNIGHT","MONTH","YEAR"],"description":"Deprecated: use recurrentDetail instead.","example":null},"toleranceDays":{"type":["number","null"],"description":"Deprecated: use recurrentDetail instead.","example":null},"taxInfo":{"type":"object","properties":{"description":{"type":"string","description":"Tax description override."},"productKey":{"type":"string","description":"SAT product key."},"unitKey":{"type":"string","description":"SAT unit key."},"unitName":{"type":"string","description":"Unit name override."},"taxRate":{"type":"number","minimum":0,"maximum":1,"description":"Tax rate as a decimal between 0 and 1."},"taxability":{"type":"string","description":"SAT taxability code."}},"description":"Optional tax configuration update.","example":null},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","description":"Metadata key name."},"value":{"type":["string","null"],"description":"Metadata value. Pass null to delete the key."}},"required":["key"]},"description":"Deprecated: use meta instead. Metadata entries to upsert or delete.","example":[],"deprecated":true},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata map to upsert.","example":{"externalConceptId":"COL-PREP-001"}}}}},"required":["data"]}},"required":["input"],"description":"Request body for updating a payment concept (id is provided in the URL path)."},"GetDiscountsResponse":{"type":"array","items":{"$ref":"#/components/schemas/Discount"},"description":"List of discounts returned by the query."},"Discount":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the discount.","example":"disc_1234567890abcdefghij"},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the discount was created.","example":"2025-01-01T00:00:00.000Z"},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the discount was last updated.","example":"2025-01-01T00:00:00.000Z"},"deletedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"When the discount was deleted, if applicable.","example":null},"name":{"type":"string","description":"Display name of the discount.","example":"Buen Fin 20%"},"description":{"type":["string","null"],"description":"Optional description of the discount.","example":null},"organizationId":{"type":"string","description":"Identifier of the owning organization.","example":"org_1234567890abcdefghij"},"type":{"type":"string","enum":["FIXED","PERCENTAGE"],"description":"Whether the discount is a fixed amount (FIXED) or a percentage (PERCENTAGE).","example":"PERCENTAGE"},"amountOff":{"type":["integer","null"],"description":"Fixed discount amount in minor currency units. Only set when type is FIXED.","example":30000},"percentageOff":{"type":["number","null"],"description":"Percentage to discount. Only set when type is PERCENTAGE.","example":20},"active":{"type":"boolean","description":"Whether the discount is currently available for new applications.","example":true},"oneOff":{"type":"boolean","description":"Whether this discount was created for a single-use custom charge.","example":false},"expiresAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Optional date after which the discount can no longer be applied.","example":null},"maxApplications":{"type":["integer","null"],"description":"Maximum total number of times this discount can be applied across all customers.","example":3}},"required":["id","createdAt","updatedAt","deletedAt","name","description","organizationId","type","amountOff","percentageOff","active","oneOff","expiresAt","maxApplications"],"description":"A reusable discount that can be applied to invoices or subscriptions."},"GetDiscountResponse":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier of the discount.","example":"disc_1234567890abcdefghij"},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the discount was created.","example":"2025-01-01T00:00:00.000Z"},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the discount was last updated.","example":"2025-01-01T00:00:00.000Z"},"deletedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"When the discount was deleted, if applicable.","example":null},"name":{"type":"string","description":"Display name of the discount.","example":"Buen Fin 20%"},"description":{"type":["string","null"],"description":"Optional description of the discount.","example":null},"organizationId":{"type":"string","description":"Identifier of the owning organization.","example":"org_1234567890abcdefghij"},"type":{"type":"string","enum":["FIXED","PERCENTAGE"],"description":"Whether the discount is a fixed amount (FIXED) or a percentage (PERCENTAGE).","example":"PERCENTAGE"},"amountOff":{"type":["integer","null"],"description":"Fixed discount amount in minor currency units. Only set when type is FIXED.","example":30000},"percentageOff":{"type":["number","null"],"description":"Percentage to discount. Only set when type is PERCENTAGE.","example":20},"active":{"type":"boolean","description":"Whether the discount is currently available for new applications.","example":true},"oneOff":{"type":"boolean","description":"Whether this discount was created for a single-use custom charge.","example":false},"expiresAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Optional date after which the discount can no longer be applied.","example":null},"maxApplications":{"type":["integer","null"],"description":"Maximum total number of times this discount can be applied across all customers.","example":3}},"required":["id","createdAt","updatedAt","deletedAt","name","description","organizationId","type","amountOff","percentageOff","active","oneOff","expiresAt","maxApplications"],"description":"Discount details. Returns null if not found."},"CreateDiscountPayload":{"type":"object","properties":{"discount":{"$ref":"#/components/schemas/Discount"}},"required":["discount"],"description":"Newly created discount."},"CreateDiscountArgs":{"type":"object","properties":{"input":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":140,"description":"Display name of the discount.","example":"Buen Fin 20%"},"description":{"type":["string","null"],"description":"Optional description.","example":null},"codes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":140},"description":"Redeemable codes that grant this discount. Codes are uppercased automatically.","example":["BUEN-FIN-2025"]},"type":{"type":"string","enum":["FIXED","PERCENTAGE"],"description":"Whether the discount is a fixed amount (FIXED) or a percentage (PERCENTAGE).","example":"PERCENTAGE"},"amountOff":{"type":["integer","null"],"minimum":0,"maximum":99999999999,"description":"Fixed discount amount in minor currency units. Required when type is FIXED.","example":null},"percentageOff":{"type":["number","null"],"minimum":0,"maximum":100,"description":"Percentage to discount (0-100). Required when type is PERCENTAGE.","example":20},"active":{"type":"boolean","description":"Whether the discount is active.","example":true},"oneOff":{"type":"boolean","description":"Whether this discount is single-use.","example":false},"expiresAt":{"type":["string","null"],"format":"date-time","description":"Optional expiration date.","example":null},"maxApplications":{"type":["integer","null"],"minimum":1,"description":"Maximum number of times this discount can be applied.","example":null}},"required":["name","type"],"additionalProperties":false}},"required":["input"],"additionalProperties":false,"description":"Request body for creating a discount."},"UpdateDiscountPayload":{"type":"object","properties":{"discount":{"$ref":"#/components/schemas/Discount"}},"required":["discount"],"description":"Updated discount."},"UpdateDiscountArgs":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Display name of the discount.","example":"Buen Fin 25%"},"description":{"type":["string","null"],"description":"Optional description.","example":null},"codes":{"type":"array","items":{"type":"string","minLength":1,"maxLength":140},"description":"Replaces all existing codes with this list. Codes are uppercased automatically.","example":["BUEN-FIN-2025"]},"type":{"type":"string","enum":["FIXED","PERCENTAGE"],"description":"Whether the discount is a fixed amount (FIXED) or a percentage (PERCENTAGE).","example":"PERCENTAGE"},"amountOff":{"type":["integer","null"],"minimum":0,"maximum":99999999999,"description":"Fixed discount amount in minor currency units. Required when type is FIXED.","example":null},"percentageOff":{"type":["number","null"],"minimum":0,"maximum":100,"description":"Percentage to discount (0-100). Required when type is PERCENTAGE.","example":25},"active":{"type":"boolean","description":"Whether the discount is active.","example":true},"oneOff":{"type":"boolean","description":"Whether this discount is single-use.","example":false},"expiresAt":{"type":["string","null"],"format":"date-time","description":"Optional expiration date.","example":null},"maxApplications":{"type":["integer","null"],"minimum":1,"description":"Maximum number of times this discount can be applied.","example":null}},"additionalProperties":false,"description":"Request body for updating a discount. All fields are optional."},"DeleteDiscountPayload":{"type":"object","properties":{"success":{"type":"boolean","description":"Whether the discount was successfully deleted.","example":true}},"required":["success"],"description":"Result of the discount deletion."},"GetCustomersResponse":{"type":"array","items":{"$ref":"#/components/schemas/Customer"},"description":"List of customers returned by the query."},"Customer":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the customer.","example":"cus_1234567890abcdefghij"},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time when the customer was created.","example":"2025-01-10T12:00:00.000Z"},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time when the customer was last updated.","example":"2025-01-10T12:00:00.000Z"},"name":{"type":"string","description":"Name of the customer.","example":"Juan Pérez"},"username":{"type":"string","description":"Username used for customer login and customer identification.","example":"juan_perez_01"},"email":{"type":["string","null"],"description":"Email address of the customer.","example":"juan@example.com"},"phoneNumber":{"type":["string","null"],"description":"Primary WhatsApp phone number of the customer, usually in E.164 format.","example":"+525512345678"},"organizationId":{"type":"string","description":"Identifier of the organization this customer belongs to.","example":"org_1234567890abcdefghij"},"secondaryPhoneNumber":{"type":["string","null"],"description":"Secondary phone number used for reminders and announcements.","example":null},"archivedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when the customer was archived.","example":null},"archivedById":{"type":["string","null"],"description":"Identifier of the user who archived this customer.","example":"u_1234567890abcdefghij"},"acceptedServiceAgreement":{"type":"boolean","description":"Whether the customer has accepted the service agreement.","example":true},"skipTaxInvoice":{"type":"boolean","description":"Whether tax invoice generation is skipped for this customer.","example":false},"emailVerified":{"type":"boolean","description":"Whether the customer has verified their email address.","example":false},"phoneNumberVerified":{"type":"boolean","description":"Whether the customer has verified their phone number.","example":true},"hasChangedPassword":{"type":"boolean","description":"Whether the customer has set a non-default password.","example":true},"signatureAcceptedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when recurring charges terms were accepted via signature.","example":"2025-01-10T12:00:00.000Z"},"optedOutWhatsappAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when the customer opted out of WhatsApp reminders.","example":null},"optedInWhatsappAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when the customer opted in to WhatsApp reminders.","example":"2025-01-05T10:00:00.000Z"},"startedWhatsappAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when WhatsApp opt-in flow was started for this customer.","example":"2025-01-05T09:55:00.000Z"},"replyWithAssistant":{"type":["boolean","null"],"description":"Whether to reply to this customer using the assistant.","example":false},"metadata":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},"description":"Custom metadata entries attached to this customer as key-value pairs.","example":[{"key":"studentId","value":"A-1029"}]},"meta":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Flattened metadata map where each key maps to a string value.","example":{"studentId":"A-1029"}}},"required":["id","createdAt","updatedAt","name","username","email","phoneNumber","organizationId","secondaryPhoneNumber","archivedAt","archivedById","acceptedServiceAgreement","skipTaxInvoice","emailVerified","phoneNumberVerified","hasChangedPassword","signatureAcceptedAt","optedOutWhatsappAt","optedInWhatsappAt","startedWhatsappAt","replyWithAssistant"],"description":"Customer record including identity, contact details, and messaging preferences."},"ValidationError":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string"},"issues":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["message","issues"]}},"required":["error"],"additionalProperties":false,"description":"Validation error response with field-level issues."},"GetCustomerResponse":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier of the customer.","example":"cus_1234567890abcdefghij"},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time when the customer was created.","example":"2025-01-10T12:00:00.000Z"},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time when the customer was last updated.","example":"2025-01-10T12:00:00.000Z"},"name":{"type":"string","description":"Name of the customer.","example":"Juan Pérez"},"username":{"type":"string","description":"Username used for customer login and customer identification.","example":"juan_perez_01"},"email":{"type":["string","null"],"description":"Email address of the customer.","example":"juan@example.com"},"phoneNumber":{"type":["string","null"],"description":"Primary WhatsApp phone number of the customer, usually in E.164 format.","example":"+525512345678"},"organizationId":{"type":"string","description":"Identifier of the organization this customer belongs to.","example":"org_1234567890abcdefghij"},"secondaryPhoneNumber":{"type":["string","null"],"description":"Secondary phone number used for reminders and announcements.","example":null},"archivedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when the customer was archived.","example":null},"archivedById":{"type":["string","null"],"description":"Identifier of the user who archived this customer.","example":"u_1234567890abcdefghij"},"acceptedServiceAgreement":{"type":"boolean","description":"Whether the customer has accepted the service agreement.","example":true},"skipTaxInvoice":{"type":"boolean","description":"Whether tax invoice generation is skipped for this customer.","example":false},"emailVerified":{"type":"boolean","description":"Whether the customer has verified their email address.","example":false},"phoneNumberVerified":{"type":"boolean","description":"Whether the customer has verified their phone number.","example":true},"hasChangedPassword":{"type":"boolean","description":"Whether the customer has set a non-default password.","example":true},"signatureAcceptedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when recurring charges terms were accepted via signature.","example":"2025-01-10T12:00:00.000Z"},"optedOutWhatsappAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when the customer opted out of WhatsApp reminders.","example":null},"optedInWhatsappAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when the customer opted in to WhatsApp reminders.","example":"2025-01-05T10:00:00.000Z"},"startedWhatsappAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when WhatsApp opt-in flow was started for this customer.","example":"2025-01-05T09:55:00.000Z"},"replyWithAssistant":{"type":["boolean","null"],"description":"Whether to reply to this customer using the assistant.","example":false},"metadata":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},"description":"Custom metadata entries attached to this customer as key-value pairs.","example":[{"key":"studentId","value":"A-1029"}]},"meta":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Flattened metadata map where each key maps to a string value.","example":{"studentId":"A-1029"}}},"required":["id","createdAt","updatedAt","name","username","email","phoneNumber","organizationId","secondaryPhoneNumber","archivedAt","archivedById","acceptedServiceAgreement","skipTaxInvoice","emailVerified","phoneNumberVerified","hasChangedPassword","signatureAcceptedAt","optedOutWhatsappAt","optedInWhatsappAt","startedWhatsappAt","replyWithAssistant"],"description":"Customer details response. Returns null if the customer does not exist."},"CreateCustomerPayload":{"type":"object","properties":{"customer":{"$ref":"#/components/schemas/Customer"}},"required":["customer"],"description":"Successful customer creation response."},"CreateCustomerArgs":{"type":"object","properties":{"input":{"$ref":"#/components/schemas/CreateCustomerInput"}},"required":["input"],"additionalProperties":false,"description":"Request body for creating a customer."},"CreateCustomerInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Name of the customer.","example":"Juan Perez"},"username":{"type":["string","null"],"minLength":1,"description":"Optional username used for login and identification. If omitted and auto-increment usernames are enabled, one is generated.","example":"juan_perez_01"},"password":{"type":["string","null"],"description":"Deprecated legacy field accepted for backwards compatibility and ignored.","deprecated":true},"email":{"type":["string","null"],"format":"email","description":"Email address of the customer.","example":"juan@example.com"},"phoneNumber":{"type":["string","null"],"description":"Primary WhatsApp phone number of the customer, preferably E.164.","example":"+525512345678"},"secondaryPhoneNumber":{"type":["string","null"],"description":"Secondary phone number for reminders and announcements.","example":"+525598765432"},"acceptedServiceAgreement":{"type":"boolean","description":"Whether the customer has accepted the service agreement.","example":true},"skipTaxInvoice":{"type":"boolean","description":"Whether tax invoice generation should be skipped for this customer.","example":false},"assigneeId":{"type":["string","null"],"description":"Member id assigned to manage this customer.","example":"cmab12cd3000x1a2b3c4d5e6f"},"optedOutWhatsappAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Date and time when the customer opted out of WhatsApp reminders.","example":"2025-01-15T10:30:00.000Z"},"metadata":{"type":"array","items":{"$ref":"#/components/schemas/CreateCustomerMetadataItemInput"},"description":"Deprecated: use meta instead. Custom metadata entries attached to the customer.","example":[{"key":"studentId","value":"A-1029"}],"deprecated":true},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata map attached to the customer.","example":{"externalCustomerId":"A-1029"}},"tags":{"type":"array","items":{"type":"string"},"description":"Tag names to associate with this customer.","example":["VIP","Colegiatura"]}},"required":["name"],"description":"Customer creation payload."},"CreateCustomerMetadataItemInput":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Metadata key name.","example":"studentId"},"value":{"type":"string","minLength":1,"description":"Metadata value.","example":"A-1029"}},"required":["key","value"],"description":"Custom metadata key-value pair attached to the customer."},"UpdateCustomerPayload":{"type":"object","properties":{"customer":{"$ref":"#/components/schemas/Customer"}},"required":["customer"],"description":"Successful customer update response."},"UpdateCustomerArgs":{"type":"object","properties":{"input":{"$ref":"#/components/schemas/UpdateCustomerInput"}},"required":["input"],"description":"Request body for updating a customer."},"UpdateCustomerInput":{"type":"object","properties":{"otp":{"type":"string","description":"Verification code required for sensitive changes.","example":"123456"},"data":{"$ref":"#/components/schemas/UpdateCustomerDataInput"}},"required":["data"],"description":"Client payload used to update a customer."},"UpdateCustomerDataInput":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Updated customer name.","example":"Juan Perez"},"email":{"type":["string","null"],"format":"email","description":"Updated email address.","example":"juan@example.com"},"phoneNumber":{"type":["string","null"],"description":"Updated primary WhatsApp phone number (E.164).","example":"+525512345678"},"username":{"type":"string","minLength":1,"description":"Updated username.","example":"juan_perez_01"},"tags":{"type":"array","items":{"type":"string"},"description":"Updated tag list.","example":["VIP","Colegiatura"]},"secondaryPhoneNumber":{"type":["string","null"],"description":"Updated secondary phone number (E.164).","example":"+525598765432"},"acceptedServiceAgreement":{"type":"boolean","description":"Whether service agreement is accepted.","example":true},"skipTaxInvoice":{"type":"boolean","description":"Whether to skip tax invoices.","example":false},"signature":{"type":["string","null"],"description":"Base64 or URL signature payload.","example":"signed-by-customer"},"assigneeId":{"type":["string","null"],"description":"Member id assigned to this customer.","example":"cmab12cd3000x1a2b3c4d5e6f"},"optedOutWhatsappAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Date and time when customer opted out from WhatsApp.","example":"2025-01-15T10:30:00.000Z"},"phoneNumberVerified":{"type":"boolean","description":"Whether phone number is verified.","example":true},"emailVerified":{"type":"boolean","description":"Whether email is verified.","example":true},"replyWithAssistant":{"type":["boolean","null"],"description":"Whether assistant replies are enabled for this customer.","example":false},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string","minLength":1,"description":"Metadata key name.","example":"studentId"},"value":{"type":["string","null"],"description":"Metadata value.","example":"A-1029"}},"required":["key"]},"description":"Deprecated: use meta instead. Metadata entries to upsert. Null values delete keys.","example":[{"key":"studentId","value":"A-1029"}],"deprecated":true},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata map to upsert.","example":{"grade":"5A"}}},"description":"Fields that can be updated on a customer."},"GetCustomerPaymentMethodsResponse":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethod"},"description":"Confirmed and non-deleted payment methods for the customer."},"SetCustomerTaxInfoPayload":{"type":"object","properties":{"customerTaxInfo":{"$ref":"#/components/schemas/CustomerTaxInfo"}},"required":["customerTaxInfo"],"description":"Created or updated customer tax profile."},"CustomerTaxInfo":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the tax profile.","example":"cti_1234567890abcdefghij"},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the tax profile was created."},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the tax profile was last updated."},"customerId":{"type":"string","description":"Customer that owns this tax profile.","example":"cus_1234567890abcdefghij"},"legalName":{"type":"string","description":"Legal name from the Constancia de Situacion Fiscal."},"default":{"type":"boolean","description":"Whether this is the default tax profile.","example":true},"defaultUsage":{"type":"string","description":"Default CFDI usage code.","example":"G03"},"taxId":{"type":"string","description":"RFC.","example":"XAXX010101000"},"taxSystem":{"type":"string","description":"SAT tax regime code.","example":"601"},"zip":{"type":"string","description":"Fiscal address ZIP code.","example":"06100"},"city":{"type":["string","null"],"description":"Fiscal address city.","example":"Ciudad de Mexico"},"state":{"type":["string","null"],"description":"Fiscal address state.","example":"Ciudad de Mexico"},"country":{"type":["string","null"],"description":"Fiscal address country.","example":"MEX"},"neighborhood":{"type":["string","null"],"description":"Fiscal address neighborhood.","example":null},"street":{"type":["string","null"],"description":"Fiscal address street.","example":null},"outerNumber":{"type":["string","null"],"description":"Fiscal address exterior number.","example":null},"innerNumber":{"type":["string","null"],"description":"Fiscal address interior number.","example":null}},"required":["id","createdAt","updatedAt","customerId","legalName","default","defaultUsage","taxId","taxSystem","zip","city","state","country","neighborhood","street","outerNumber","innerNumber"],"description":"Fiscal profile used to issue tax invoices for a customer."},"CreateCustomerTaxInfoArgs":{"type":"object","properties":{"input":{"type":"object","properties":{"taxInfo":{"type":"object","properties":{"legalName":{"type":"string","description":"Legal name from the Constancia de Situacion Fiscal."},"taxId":{"type":"string","minLength":1,"description":"RFC.","example":"XAXX010101000"},"taxSystem":{"type":"string","minLength":1,"description":"SAT tax regime code.","example":"601"},"zip":{"type":"string","minLength":1,"maxLength":5,"description":"Fiscal address ZIP code.","example":"06100"},"default":{"type":"boolean","description":"Whether this should become the default tax profile."},"defaultUsage":{"type":"string","minLength":3,"maxLength":4,"description":"Default CFDI usage code.","example":"G03"},"neighborhood":{"type":"string","description":"Fiscal address neighborhood."},"street":{"type":"string","description":"Fiscal address street."},"outerNumber":{"type":"string","description":"Fiscal address exterior number."},"innerNumber":{"type":"string","description":"Fiscal address interior number."},"city":{"type":"string","description":"Fiscal address city."},"state":{"type":"string","description":"Fiscal address state."}},"required":["legalName","taxId","taxSystem","zip","defaultUsage"],"additionalProperties":false}},"required":["taxInfo"],"additionalProperties":false}},"required":["input"],"additionalProperties":false,"description":"Request body for creating a customer tax profile (customer id is provided in the URL path)."},"UpdateCustomerTaxInfoArgs":{"type":"object","properties":{"input":{"type":"object","properties":{"data":{"type":"object","properties":{"legalName":{"type":"string","description":"Legal name from the Constancia de Situacion Fiscal."},"taxId":{"type":"string","minLength":1,"description":"RFC.","example":"XAXX010101000"},"taxSystem":{"type":"string","minLength":1,"description":"SAT tax regime code.","example":"601"},"zip":{"type":"string","minLength":1,"maxLength":5,"description":"Fiscal address ZIP code.","example":"06100"},"default":{"type":"boolean","description":"Whether this should become the default tax profile."},"defaultUsage":{"type":"string","minLength":3,"maxLength":4,"description":"Default CFDI usage code.","example":"G03"},"neighborhood":{"type":"string","description":"Fiscal address neighborhood."},"street":{"type":"string","description":"Fiscal address street."},"outerNumber":{"type":"string","description":"Fiscal address exterior number."},"innerNumber":{"type":"string","description":"Fiscal address interior number."},"city":{"type":"string","description":"Fiscal address city."},"state":{"type":"string","description":"Fiscal address state."}},"required":["legalName","taxId","taxSystem","zip","defaultUsage"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}},"required":["input"],"additionalProperties":false,"description":"Request body for updating a customer tax profile (ids are provided in the URL path)."},"DeleteCustomerTaxInfoPayload":{"type":"object","properties":{"customerId":{"type":"string","description":"Customer whose tax profile was deleted."}},"required":["customerId"],"description":"Response after deleting a customer tax profile."},"GetPaymentsResponse":{"type":"array","items":{"$ref":"#/components/schemas/PaymentWithItems"},"description":"List of payments with expanded line items."},"PaymentWithItems":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the payment.","example":"p_1234567890abcdefghij"},"createdAt":{"type":"string","format":"date-time","description":"When the payment record was created.","example":"2025-01-15T18:30:00.000Z"},"updatedAt":{"type":"string","format":"date-time","description":"When the payment was last updated.","example":"2025-01-15T18:30:00.000Z"},"amount":{"type":"number","description":"Payment amount in minor currency units.","example":150000},"currency":{"type":"string","description":"ISO 4217 currency code.","example":"MXN"},"description":{"type":["string","null"],"description":"Human-readable description of the payment.","example":"Colegiatura Enero 2025"},"type":{"type":["string","null"],"enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT",null],"description":"Payment type.","example":"CARD"},"status":{"type":["string","null"],"enum":["INCOMPLETE","COMPLETE","CANCELED","INITIATED","REFUNDED","DISPUTED","REVERTED",null],"description":"Current payment status.","example":"COMPLETE"},"isCompleted":{"type":"boolean","description":"Whether the payment has been fully settled.","example":true},"paymentTime":{"type":["string","null"],"format":"date-time","description":"Date and time when the payment was completed.","example":"2025-01-15T18:30:00.000Z"},"customerId":{"type":"string","description":"Identifier of the customer who made the payment.","example":"cus_1234567890abcdefghij"},"paymentIntentId":{"type":["string","null"],"description":"Payment processor intent identifier, if any.","example":null},"paymentMethodId":{"type":["string","null"],"description":"Identifier of the payment method used, if any.","example":"pm_1234567890abcdefghij"},"organizationId":{"type":"string","description":"Identifier of the owning organization.","example":"org_1234567890abcdefghij"},"skipTaxInvoice":{"type":"boolean","description":"Whether tax invoice generation is skipped for this payment.","example":false},"monthlyInstallments":{"type":["integer","null"],"description":"Number of monthly installments, if any.","example":null},"processor":{"type":["string","null"],"enum":["FISERV","KUSHKI","QUENTLI","SANTANDER","STRIPE","TAPI",null],"description":"Processor that handled the payment, if any.","example":null},"processorFee":{"type":["integer","null"],"description":"Processor fee in minor currency units, if known.","example":null},"processorFeeTax":{"type":["integer","null"],"description":"Tax on the processor fee in minor currency units, if known.","example":null},"installmentsFee":{"type":["integer","null"],"description":"Installments fee in minor currency units, if any.","example":null},"installmentsFeeTax":{"type":["integer","null"],"description":"Tax on the installments fee in minor currency units, if any.","example":null},"externalPaymentTypeId":{"type":["string","null"],"description":"External payment type identifier when type is OTHER.","example":null},"sessionId":{"type":["string","null"],"description":"Payment session identifier associated with this payment, if any.","example":null},"metadata":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},"description":"Structured metadata entries.","example":null},"meta":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Flattened metadata key-value map.","example":null},"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"Line item description."},"amount":{"type":"number","description":"Unit amount in minor currency units."},"currency":{"type":"string","description":"ISO 4217 currency code."},"quantity":{"type":"number","description":"Quantity of units."},"conceptId":{"type":["string","null"],"description":"Identifier of the related payment concept, if any."},"concept":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Payment concept identifier."},"displayName":{"type":"string","description":"Concept display name."},"description":{"type":["string","null"],"description":"Concept description."},"createdAt":{"type":"string","format":"date-time","description":"When the concept was created."},"updatedAt":{"type":"string","format":"date-time","description":"When the concept was last updated."},"metadata":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},"description":"Structured concept metadata entries."},"meta":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Flattened concept metadata map.","example":{}}},"required":["id","displayName","description","createdAt","updatedAt"],"description":"Resolved payment concept for the line item."}},"required":["description","amount","currency","quantity","conceptId","concept"]}}},"required":["id","createdAt","updatedAt","amount","currency","description","type","status","isCompleted","paymentTime","customerId","paymentIntentId","organizationId","skipTaxInvoice","monthlyInstallments","processor","processorFee","processorFeeTax","installmentsFee","installmentsFeeTax","externalPaymentTypeId","sessionId","items"],"description":"Payment with expanded line items."},"GetPaymentResponse":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier of the payment.","example":"p_1234567890abcdefghij"},"createdAt":{"type":"string","format":"date-time","description":"When the payment record was created.","example":"2025-01-15T18:30:00.000Z"},"updatedAt":{"type":"string","format":"date-time","description":"When the payment was last updated.","example":"2025-01-15T18:30:00.000Z"},"amount":{"type":"number","description":"Payment amount in minor currency units.","example":150000},"currency":{"type":"string","description":"ISO 4217 currency code.","example":"MXN"},"description":{"type":["string","null"],"description":"Human-readable description of the payment.","example":"Colegiatura Enero 2025"},"type":{"type":["string","null"],"enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT",null],"description":"Payment type.","example":"CARD"},"status":{"type":["string","null"],"enum":["INCOMPLETE","COMPLETE","CANCELED","INITIATED","REFUNDED","DISPUTED","REVERTED",null],"description":"Current payment status.","example":"COMPLETE"},"isCompleted":{"type":"boolean","description":"Whether the payment has been fully settled.","example":true},"paymentTime":{"type":["string","null"],"format":"date-time","description":"Date and time when the payment was completed.","example":"2025-01-15T18:30:00.000Z"},"customerId":{"type":"string","description":"Identifier of the customer who made the payment.","example":"cus_1234567890abcdefghij"},"paymentIntentId":{"type":["string","null"],"description":"Payment processor intent identifier, if any.","example":null},"paymentMethodId":{"type":["string","null"],"description":"Identifier of the payment method used, if any.","example":"pm_1234567890abcdefghij"},"organizationId":{"type":"string","description":"Identifier of the owning organization.","example":"org_1234567890abcdefghij"},"skipTaxInvoice":{"type":"boolean","description":"Whether tax invoice generation is skipped for this payment.","example":false},"monthlyInstallments":{"type":["integer","null"],"description":"Number of monthly installments, if any.","example":null},"processor":{"type":["string","null"],"enum":["FISERV","KUSHKI","QUENTLI","SANTANDER","STRIPE","TAPI",null],"description":"Processor that handled the payment, if any.","example":null},"processorFee":{"type":["integer","null"],"description":"Processor fee in minor currency units, if known.","example":null},"processorFeeTax":{"type":["integer","null"],"description":"Tax on the processor fee in minor currency units, if known.","example":null},"installmentsFee":{"type":["integer","null"],"description":"Installments fee in minor currency units, if any.","example":null},"installmentsFeeTax":{"type":["integer","null"],"description":"Tax on the installments fee in minor currency units, if any.","example":null},"externalPaymentTypeId":{"type":["string","null"],"description":"External payment type identifier when type is OTHER.","example":null},"sessionId":{"type":["string","null"],"description":"Payment session identifier associated with this payment, if any.","example":null},"metadata":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},"description":"Structured metadata entries.","example":null},"meta":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Flattened metadata key-value map.","example":null},"items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","description":"Line item description."},"amount":{"type":"number","description":"Unit amount in minor currency units."},"currency":{"type":"string","description":"ISO 4217 currency code."},"quantity":{"type":"number","description":"Quantity of units."},"conceptId":{"type":["string","null"],"description":"Identifier of the related payment concept, if any."},"concept":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Payment concept identifier."},"displayName":{"type":"string","description":"Concept display name."},"description":{"type":["string","null"],"description":"Concept description."},"createdAt":{"type":"string","format":"date-time","description":"When the concept was created."},"updatedAt":{"type":"string","format":"date-time","description":"When the concept was last updated."},"metadata":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},"description":"Structured concept metadata entries."},"meta":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Flattened concept metadata map.","example":{}}},"required":["id","displayName","description","createdAt","updatedAt"],"description":"Resolved payment concept for the line item."}},"required":["description","amount","currency","quantity","conceptId","concept"]}}},"required":["id","createdAt","updatedAt","amount","currency","description","type","status","isCompleted","paymentTime","customerId","paymentIntentId","organizationId","skipTaxInvoice","monthlyInstallments","processor","processorFee","processorFeeTax","installmentsFee","installmentsFeeTax","externalPaymentTypeId","sessionId","items"],"description":"Payment details response. Returns null if the payment does not exist."},"CreatePaymentPayload":{"type":"object","properties":{"payment":{"$ref":"#/components/schemas/Payment"},"attempt":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier of the payment attempt.","example":"pa_1234567890abcdefghij"},"createdAt":{"type":"string","format":"date-time","description":"When the attempt was made.","example":"2025-01-15T18:30:00.000Z"},"type":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"],"description":"Payment type used for the attempt.","example":"CARD"},"success":{"type":"boolean","description":"Whether the attempt succeeded.","example":true},"scheduled":{"type":"boolean","description":"Whether the attempt was scheduled.","example":false},"automatic":{"type":"boolean","description":"Whether the attempt was triggered automatically.","example":true},"errorType":{"type":["string","null"],"description":"Error classification if the attempt failed.","example":null}},"required":["id","createdAt","type","success","scheduled","automatic","errorType"],"description":"The payment attempt result, if makeAttempt was true."},"customer":{"$ref":"#/components/schemas/Customer","description":"The customer details."}},"required":["payment","attempt","customer"],"description":"Created payment with optional attempt result and customer details."},"CreatePaymentArgs":{"type":"object","properties":{"input":{"type":"object","properties":{"amount":{"type":"number","minimum":1,"maximum":100000000,"description":"Payment amount in minor currency units.","example":150000},"currency":{"type":"string","description":"ISO 4217 currency code.","example":"MXN"},"description":{"type":"string","description":"Human-readable description of the payment.","example":"Colegiatura Enero 2025"},"customerId":{"type":"string","description":"Identifier of the customer to charge.","example":"cus_1234567890abcdefghij"},"paymentMethodId":{"type":"string","description":"Identifier of the payment method to use.","example":"pm_1234567890abcdefghij"},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Optional metadata map.","example":{"externalPaymentId":"PAY-123"}},"makeAttempt":{"type":"boolean","description":"Whether to immediately attempt to process the payment.","example":true}},"required":["amount","currency","description","customerId","paymentMethodId"],"additionalProperties":false}},"required":["input"],"description":"Request body for creating a direct payment."},"CompleteSandboxPaymentPayload":{"type":"object","properties":{"payment":{"type":"object","properties":{"id":{"type":"string","description":"Identifier of the payment submitted to the sandbox webhook flow."},"type":{"type":"string","enum":["CASH","TRANSFER"],"description":"Payment type completed in sandbox."}},"required":["id","type"],"additionalProperties":false}},"required":["payment"],"additionalProperties":false,"description":"Payment accepted for completion through the sandbox webhook flow."},"CompleteSandboxPaymentRequest":{"type":"object","properties":{"input":{"type":"object","properties":{"outcome":{"type":"string","enum":["SUCCEEDED"],"description":"Successful sandbox outcome.","example":"SUCCEEDED"}},"required":["outcome"],"additionalProperties":false}},"required":["input"],"additionalProperties":false,"description":"Request body for completing a pending CASH or TRANSFER payment in sandbox."},"SendPaymentReceiptPayload":{"type":"object","properties":{"paymentReceipt":{"$ref":"#/components/schemas/PaymentReceipt"}},"required":["paymentReceipt"],"description":"Response after sending a payment receipt."},"PaymentReceipt":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier of the payment receipt."},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the receipt record was created."},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the receipt record was last updated."},"paymentId":{"type":"string","description":"Payment associated with this receipt.","example":"p_1234567890abcdefghij"},"messageId":{"type":"string","description":"Outbound message associated with this receipt."}},"required":["id","createdAt","updatedAt","paymentId","messageId"],"description":"Receipt message created for a payment."},"SendPaymentReceiptArgs":{"type":"object","properties":{"input":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"Email address to send the receipt to."},"channels":{"type":"array","items":{"type":"string","enum":["EMAIL","SMS","WHATSAPP"]},"description":"Channels used to send the receipt."}},"required":["channels"],"additionalProperties":false}},"required":["input"],"additionalProperties":false,"description":"Request body for sending a payment receipt (payment id is provided in the URL path)."},"CreatePaymentSessionPayload":{"type":"object","properties":{"url":{"type":"string","description":"Authenticated payment URL for the customer.","example":"https://pagos.ejemplo.com/pay/ps_1234567890abcdefghij"},"session":{"type":"object","properties":{"accessToken":{"type":"string","description":"JWT access token."},"csrfToken":{"type":"string","description":"CSRF token for form submissions."},"refreshToken":{"type":"string","description":"Token used to obtain a new access token."},"accessTokenExpiresAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the access token expires."},"expiresAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the session expires entirely."}},"required":["accessToken","csrfToken","refreshToken","accessTokenExpiresAt","expiresAt"],"description":"Customer session tokens, if a customer was resolved."},"paymentSession":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the payment session.","example":"ps_1234567890abcdefghij"},"createdAt":{"type":"string","format":"date-time","description":"When the session was created.","example":"2025-01-15T18:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","description":"When the session was last updated.","example":"2025-01-15T18:00:00.000Z"},"status":{"type":"string","enum":["PENDING","FINALIZED","CANCELED","EXPIRED"],"description":"Current session status.","example":"PENDING"},"displayMode":{"type":"string","enum":["CUSTOMER_PORTAL","CUSTOM","EMBEDDED"],"description":"How the payment UI is presented.","example":"CUSTOMER_PORTAL"},"origin":{"type":"string","enum":["API","INVOICE","LISTING"],"description":"How the session was created.","example":"API"},"expiresAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Optional expiration date of the session.","example":null},"totalAmount":{"type":"number","description":"Total amount in minor currency units.","example":150000},"currency":{"type":"string","description":"ISO 4217 currency code.","example":"MXN"},"customerId":{"type":["string","null"],"description":"Identifier of the customer associated with the session, if any.","example":null},"returnUrl":{"type":["string","null"],"description":"URL to redirect to after successful payment.","example":null},"cancelUrl":{"type":["string","null"],"description":"URL to redirect to if the payer cancels.","example":null},"organizationId":{"type":"string","description":"Identifier of the owning organization.","example":"org_1234567890abcdefghij"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PaymentSessionItem"},"description":"Line items in the session."},"customer":{"oneOf":[{"$ref":"#/components/schemas/Customer"},{"type":"null"}],"description":"Customer associated with the session, if any."},"metadata":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},"description":"Session-level metadata entries."},"meta":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Flattened session metadata map.","example":{}}},"required":["id","createdAt","updatedAt","status","displayMode","origin","expiresAt","totalAmount","currency","customerId","returnUrl","cancelUrl","organizationId","items","customer","metadata"],"description":"The created payment session."}},"required":["url","paymentSession"],"additionalProperties":false,"description":"Created payment session with an authenticated URL."},"PaymentSessionItem":{"type":"object","properties":{"description":{"type":"string","description":"Line item description.","example":"Colegiatura Enero 2025"},"amount":{"type":"number","description":"Unit price in minor currency units.","example":150000},"quantity":{"type":"number","description":"Quantity of units.","example":1},"currency":{"type":"string","description":"ISO 4217 currency code.","example":"MXN"}},"required":["description","amount","quantity","currency"],"description":"A line item within a payment session."},"CreatePaymentSessionArgs":{"type":"object","properties":{"input":{"oneOf":[{"type":"object","properties":{"returnUrl":{"type":"string","description":"URL to redirect to after successful payment.","example":"https://example.com/success"},"cancelUrl":{"type":"string","description":"URL to redirect to if the payer cancels.","example":"https://example.com/cancel"},"displayMode":{"type":"string","enum":["CUSTOMER_PORTAL","CUSTOM","EMBEDDED"],"default":"CUSTOMER_PORTAL","description":"How the payment UI is presented.","example":"CUSTOMER_PORTAL"},"expiresAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Optional expiration time for the session."},"customer":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Customer full name.","example":"Juan Pérez"},"externalId":{"type":"string","description":"External ID used to match or create the customer.","example":"A-1029"},"phoneNumber":{"type":"string","description":"Customer phone number in E.164 format.","example":"+5215512345678"},"email":{"type":"string","format":"email","description":"Customer email address.","example":"juan@example.com"},"forceUpdate":{"type":"boolean","description":"Whether to treat the provided customer contact fields as authoritative. If another customer in the organization has the provided email or phone number, that field is unset from the other customer and set on the resolved customer.","example":false},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"description":"Deprecated: use meta instead. Metadata entries to attach to the customer.","example":[],"deprecated":true},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata map to attach to the customer.","example":{"externalCustomerId":"A-1029"}}},"required":["name"],"additionalProperties":false},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},"description":"Deprecated: use meta instead. Metadata entries to attach to the session.","example":[],"deprecated":true},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata map to attach to the session.","example":{"externalSessionId":"CHK-123"}},"invoiceIds":{"type":"array","items":{"type":"string"},"minItems":1,"description":"Existing invoice IDs to include in the session. Cannot be combined with items, amount, currency, or description.","example":["inv_1234567890abcdefghij","inv_abcdefghij1234567890"]}},"required":["customer","invoiceIds"],"additionalProperties":false,"description":"Pay existing invoices"},{"type":"object","properties":{"returnUrl":{"type":"string","description":"URL to redirect to after successful payment.","example":"https://example.com/success"},"cancelUrl":{"type":"string","description":"URL to redirect to if the payer cancels.","example":"https://example.com/cancel"},"displayMode":{"type":"string","enum":["CUSTOMER_PORTAL","CUSTOM","EMBEDDED"],"default":"CUSTOMER_PORTAL","description":"How the payment UI is presented.","example":"CUSTOMER_PORTAL"},"expiresAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Optional expiration time for the session."},"customer":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Customer full name.","example":"Juan Pérez"},"externalId":{"type":"string","description":"External ID used to match or create the customer.","example":"A-1029"},"phoneNumber":{"type":"string","description":"Customer phone number in E.164 format.","example":"+5215512345678"},"email":{"type":"string","format":"email","description":"Customer email address.","example":"juan@example.com"},"forceUpdate":{"type":"boolean","description":"Whether to treat the provided customer contact fields as authoritative. If another customer in the organization has the provided email or phone number, that field is unset from the other customer and set on the resolved customer.","example":false},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"description":"Deprecated: use meta instead. Metadata entries to attach to the customer.","example":[],"deprecated":true},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata map to attach to the customer.","example":{"externalCustomerId":"A-1029"}}},"required":["name"],"additionalProperties":false},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},"description":"Deprecated: use meta instead. Metadata entries to attach to the session.","example":[],"deprecated":true},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata map to attach to the session.","example":{"externalSessionId":"CHK-123"}},"description":{"type":"string","description":"Payment description (used when items are not provided).","example":"Colegiatura Enero 2025"},"amount":{"type":"number","minimum":1,"description":"Total amount in minor currency units (used when items are not provided).","example":150000},"currency":{"type":"string","description":"ISO 4217 currency code (used when items are not provided).","example":"MXN"},"items":{"type":"array","items":{"type":"object","properties":{"conceptId":{"type":["string","null"],"description":"Catalog payment concept to use for this item.","example":"pc_123"},"description":{"type":["string","null"],"description":"Line item description.","example":"Colegiatura"},"quantity":{"type":"number","minimum":1,"description":"Quantity of units.","example":1},"amount":{"type":["number","null"],"minimum":1,"description":"Unit price in minor currency units.","example":150000},"currency":{"type":["string","null"],"description":"ISO 4217 currency code.","example":"MXN"}},"required":["quantity"],"additionalProperties":false,"description":"Line item with either an ad hoc description, amount, and currency, or a catalog conceptId. These forms cannot be combined."},"minItems":1,"description":"Line items to include in the session. Cannot be combined with amount, currency, or description.","example":[{"description":"Colegiatura","quantity":1,"amount":150000,"currency":"MXN"}]}},"required":["customer","items"],"additionalProperties":false,"description":"Create an itemized payment"},{"type":"object","properties":{"returnUrl":{"type":"string","description":"URL to redirect to after successful payment.","example":"https://example.com/success"},"cancelUrl":{"type":"string","description":"URL to redirect to if the payer cancels.","example":"https://example.com/cancel"},"displayMode":{"type":"string","enum":["CUSTOMER_PORTAL","CUSTOM","EMBEDDED"],"default":"CUSTOMER_PORTAL","description":"How the payment UI is presented.","example":"CUSTOMER_PORTAL"},"expiresAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"Optional expiration time for the session."},"customer":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Customer full name.","example":"Juan Pérez"},"externalId":{"type":"string","description":"External ID used to match or create the customer.","example":"A-1029"},"phoneNumber":{"type":"string","description":"Customer phone number in E.164 format.","example":"+5215512345678"},"email":{"type":"string","format":"email","description":"Customer email address.","example":"juan@example.com"},"forceUpdate":{"type":"boolean","description":"Whether to treat the provided customer contact fields as authoritative. If another customer in the organization has the provided email or phone number, that field is unset from the other customer and set on the resolved customer.","example":false},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"description":"Deprecated: use meta instead. Metadata entries to attach to the customer.","example":[],"deprecated":true},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata map to attach to the customer.","example":{"externalCustomerId":"A-1029"}}},"required":["name"],"additionalProperties":false},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},"description":"Deprecated: use meta instead. Metadata entries to attach to the session.","example":[],"deprecated":true},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata map to attach to the session.","example":{"externalSessionId":"CHK-123"}},"description":{"type":"string"},"amount":{"type":"number","minimum":1},"currency":{"type":"string"}},"required":["customer","description","amount","currency"],"additionalProperties":false,"description":"Create an amount-based payment"}]}},"required":["input"],"description":"Request body for creating a payment session."},"GetPaymentSessionResponse":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier of the payment session.","example":"ps_1234567890abcdefghij"},"createdAt":{"type":"string","format":"date-time","description":"When the session was created.","example":"2025-01-15T18:00:00.000Z"},"updatedAt":{"type":"string","format":"date-time","description":"When the session was last updated.","example":"2025-01-15T18:00:00.000Z"},"status":{"type":"string","enum":["PENDING","FINALIZED","CANCELED","EXPIRED"],"description":"Current session status.","example":"PENDING"},"displayMode":{"type":"string","enum":["CUSTOMER_PORTAL","CUSTOM","EMBEDDED"],"description":"How the payment UI is presented.","example":"CUSTOMER_PORTAL"},"origin":{"type":"string","enum":["API","INVOICE","LISTING"],"description":"How the session was created.","example":"API"},"expiresAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Optional expiration date of the session.","example":null},"totalAmount":{"type":"number","description":"Total amount in minor currency units.","example":150000},"currency":{"type":"string","description":"ISO 4217 currency code.","example":"MXN"},"customerId":{"type":["string","null"],"description":"Identifier of the customer associated with the session, if any.","example":null},"returnUrl":{"type":["string","null"],"description":"URL to redirect to after successful payment.","example":null},"cancelUrl":{"type":["string","null"],"description":"URL to redirect to if the payer cancels.","example":null},"organizationId":{"type":"string","description":"Identifier of the owning organization.","example":"org_1234567890abcdefghij"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PaymentSessionItem"},"description":"Line items in the session."},"customer":{"oneOf":[{"$ref":"#/components/schemas/Customer"},{"type":"null"}],"description":"Customer associated with the session, if any."},"metadata":{"type":["array","null"],"items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"],"additionalProperties":false},"description":"Session-level metadata entries."},"meta":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Flattened session metadata map.","example":{}}},"required":["id","createdAt","updatedAt","status","displayMode","origin","expiresAt","totalAmount","currency","customerId","returnUrl","cancelUrl","organizationId","items","customer","metadata"],"description":"Payment session details. Returns null if not found."},"CreateSetupSessionPayload":{"type":"object","properties":{"url":{"type":"string","description":"Authenticated setup URL for the customer."},"session":{"type":"object","properties":{"accessToken":{"type":"string","description":"JWT access token."},"csrfToken":{"type":"string","description":"CSRF token for form submissions."},"refreshToken":{"type":"string","description":"Token used to obtain a new access token."},"accessTokenExpiresAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the access token expires."},"expiresAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the session expires entirely."}},"required":["accessToken","csrfToken","refreshToken","accessTokenExpiresAt","expiresAt"],"description":"Customer session tokens."}},"required":["url"],"additionalProperties":false,"description":"Created setup session with an authenticated URL."},"CreateSetupSessionArgs":{"type":"object","properties":{"input":{"type":"object","properties":{"returnUrl":{"type":"string","description":"URL to redirect to after successful setup.","example":"https://example.com/success"},"cancelUrl":{"type":"string","description":"URL to redirect to if the customer cancels.","example":"https://example.com/cancel"},"displayMode":{"type":"string","enum":["CUSTOMER_PORTAL","CUSTOM","EMBEDDED"],"default":"CUSTOMER_PORTAL","description":"How the setup UI is presented.","example":"CUSTOMER_PORTAL"},"customer":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"Customer full name.","example":"Juan Pérez"},"externalId":{"type":"string","description":"External ID used to match or create the customer.","example":"A-1029"},"phoneNumber":{"type":"string","description":"Customer phone number in E.164 format.","example":"+5215512345678"},"email":{"type":"string","format":"email","description":"Customer email address.","example":"juan@example.com"},"forceUpdate":{"type":"boolean","description":"Whether to overwrite existing customer fields.","example":false},"metadata":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"description":"Deprecated: use meta instead. Metadata entries to attach to the customer.","example":[],"deprecated":true},"meta":{"type":"object","additionalProperties":{"type":"string"},"description":"Metadata map to attach to the customer.","example":{"externalCustomerId":"A-1029"}}},"required":["name"],"additionalProperties":false}},"required":["customer"],"additionalProperties":false}},"required":["input"],"description":"Request body for creating a setup session to enroll a payment method."},"CreateRefundPayload":{"type":"object","properties":{"payment":{"$ref":"#/components/schemas/Payment"},"refund":{"$ref":"#/components/schemas/Refund"}},"required":["payment","refund"],"description":"Created refund and its payment."},"Refund":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the refund.","example":"ref_1234567890abcdefghij"},"createdAt":{"type":"string","format":"date-time","description":"When the refund was created.","example":"2025-01-15T18:30:00.000Z"},"updatedAt":{"type":"string","format":"date-time","description":"When the refund was last updated.","example":"2025-01-15T18:30:00.000Z"},"amount":{"type":"integer","description":"Refund amount in minor currency units.","example":150000},"currency":{"type":"string","description":"ISO 4217 currency code.","example":"MXN"},"status":{"type":"string","enum":["REQUESTED","APPROVED","DECLINED"],"description":"Current refund status.","example":"REQUESTED"},"statusUpdatedAt":{"type":"string","format":"date-time","description":"When the refund status was last updated.","example":"2025-01-15T18:30:00.000Z"},"paymentId":{"type":"string","description":"Identifier of the refunded payment.","example":"p_1234567890abcdefghij"},"madeById":{"type":["string","null"],"description":"Identifier of the user who created the refund, if any.","example":"u_1234567890abcdefghij"},"payoutId":{"type":["string","null"],"description":"Identifier of the related payout, if any.","example":null},"customRefundReason":{"type":["string","null"],"description":"Optional reason for the refund.","example":null}},"required":["id","createdAt","updatedAt","amount","currency","status","statusUpdatedAt","paymentId","madeById","payoutId","customRefundReason"],"description":"A refund created for a payment."},"CreateRefundArgs":{"type":"object","properties":{"input":{"type":"object","properties":{"paymentId":{"type":"string","description":"Identifier of the payment to refund.","example":"p_1234567890abcdefghij"},"amount":{"type":"number","exclusiveMinimum":0,"description":"Refund amount in minor currency units.","example":150000},"customRefundReason":{"type":["string","null"],"description":"Optional reason for the refund.","example":null}},"required":["paymentId","amount"]}},"required":["input"],"description":"Request body for creating a refund."},"GetWebhooksResponse":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"},"description":"List of webhook endpoints."},"Webhook":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the webhook.","example":"w_1234567890abcdefghij"},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the webhook was created."},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the webhook was last updated."},"url":{"type":"string","description":"Destination URL."},"description":{"type":["string","null"],"description":"Optional user-defined description.","example":null},"status":{"type":"string","enum":["ENABLED","DISABLED","BROKEN","DELETED"],"description":"Current webhook status.","example":"ENABLED"},"organizationId":{"type":"string","description":"Owning organization identifier.","example":"org_1234567890abcdefghij"},"enabledEvents":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEnabledEvent"},"description":"Event types currently enabled for this webhook."},"deletedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"When this webhook was deleted, if any.","example":null},"deletedById":{"type":["string","null"],"description":"User who deleted this webhook.","example":null}},"required":["id","createdAt","updatedAt","url","status","organizationId"],"description":"Webhook endpoint configured by the organization."},"WebhookEnabledEvent":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the enabled event row."},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When this enabled event was created."},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When this enabled event was last updated."},"webhookId":{"type":"string","description":"Webhook identifier.","example":"w_1234567890abcdefghij"},"type":{"type":"string","enum":["INVOICE_CREATED","INVOICE_CANCELED","INVOICE_PAID","INVOICE_PAID_OTHER","INVOICE_UPDATED","PAYMENT_COMPLETED","PAYMENT_REFUNDED","PAYMENT_ATTEMPT_FAILED","PAYMENT_ATTEMPT_SUCCEEDED","DISPUTE_CREATED","DISPUTE_RESPONSE_CREATED","DISPUTE_RESOLVED","CUSTOMER_CREATED","CUSTOMER_UPDATED","CUSTOMER_ARCHIVED","SUBSCRIPTION_CREATED","SUBSCRIPTION_UPDATED","SUBSCRIPTION_CANCELED","PAYMENT_METHOD_CREATED"],"description":"Enabled webhook event type."}},"required":["id","createdAt","updatedAt","webhookId","type"],"description":"Event type enabled for a webhook endpoint."},"CreateWebhookArgs":{"type":"object","properties":{"input":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Destination URL that will receive webhook calls."},"description":{"type":"string","description":"Optional user-defined description."},"enabledEvents":{"type":"array","items":{"type":"string","enum":["INVOICE_CREATED","INVOICE_CANCELED","INVOICE_PAID","INVOICE_PAID_OTHER","INVOICE_UPDATED","PAYMENT_COMPLETED","PAYMENT_REFUNDED","PAYMENT_ATTEMPT_FAILED","PAYMENT_ATTEMPT_SUCCEEDED","DISPUTE_CREATED","DISPUTE_RESPONSE_CREATED","DISPUTE_RESOLVED","CUSTOMER_CREATED","CUSTOMER_UPDATED","CUSTOMER_ARCHIVED","SUBSCRIPTION_CREATED","SUBSCRIPTION_UPDATED","SUBSCRIPTION_CANCELED","PAYMENT_METHOD_CREATED"]},"description":"Event types to send to this webhook."}},"required":["url","enabledEvents"],"additionalProperties":false}},"required":["input"],"additionalProperties":false,"description":"Request body for creating a webhook."},"GetWebhookResponse":{"type":["object","null"],"properties":{"id":{"type":"string","description":"Unique identifier of the webhook.","example":"w_1234567890abcdefghij"},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the webhook was created."},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the webhook was last updated."},"url":{"type":"string","description":"Destination URL."},"description":{"type":["string","null"],"description":"Optional user-defined description.","example":null},"status":{"type":"string","enum":["ENABLED","DISABLED","BROKEN","DELETED"],"description":"Current webhook status.","example":"ENABLED"},"organizationId":{"type":"string","description":"Owning organization identifier.","example":"org_1234567890abcdefghij"},"enabledEvents":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEnabledEvent"},"description":"Event types currently enabled for this webhook."},"deletedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"When this webhook was deleted, if any.","example":null},"deletedById":{"type":["string","null"],"description":"User who deleted this webhook.","example":null}},"required":["id","createdAt","updatedAt","url","status","organizationId"],"description":"Webhook details response. Returns null if the webhook does not exist."},"UpdateWebhookArgs":{"type":"object","properties":{"input":{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Updated destination URL."},"description":{"type":"string","description":"Updated description."},"status":{"type":"string","enum":["ENABLED","DISABLED","BROKEN","DELETED"],"description":"Updated webhook status."},"enabledEvents":{"type":"array","items":{"type":"string","enum":["INVOICE_CREATED","INVOICE_CANCELED","INVOICE_PAID","INVOICE_PAID_OTHER","INVOICE_UPDATED","PAYMENT_COMPLETED","PAYMENT_REFUNDED","PAYMENT_ATTEMPT_FAILED","PAYMENT_ATTEMPT_SUCCEEDED","DISPUTE_CREATED","DISPUTE_RESPONSE_CREATED","DISPUTE_RESOLVED","CUSTOMER_CREATED","CUSTOMER_UPDATED","CUSTOMER_ARCHIVED","SUBSCRIPTION_CREATED","SUBSCRIPTION_UPDATED","SUBSCRIPTION_CANCELED","PAYMENT_METHOD_CREATED"]},"description":"Replacement enabled events."}},"additionalProperties":false}},"required":["data"],"additionalProperties":false}},"required":["input"],"additionalProperties":false,"description":"Request body for updating a webhook."},"WebhookSecretPayload":{"type":"object","properties":{"webhook":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the webhook.","example":"w_1234567890abcdefghij"},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the webhook was created."},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the webhook was last updated."},"url":{"type":"string","description":"Destination URL."},"description":{"type":["string","null"],"description":"Optional user-defined description.","example":null},"status":{"type":"string","enum":["ENABLED","DISABLED","BROKEN","DELETED"],"description":"Current webhook status.","example":"ENABLED"},"organizationId":{"type":"string","description":"Owning organization identifier.","example":"org_1234567890abcdefghij"},"enabledEvents":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEnabledEvent"},"description":"Event types currently enabled for this webhook."},"deletedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"When this webhook was deleted, if any.","example":null},"deletedById":{"type":["string","null"],"description":"User who deleted this webhook.","example":null}},"required":["id","createdAt","updatedAt","url","status","organizationId"],"description":"Webhook whose signing secret was returned."},"secret":{"type":"string","description":"Generated webhook signing secret."}},"required":["webhook","secret"],"description":"Webhook signing secret response."},"GetWebhookEventsResponse":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEvent"},"description":"List of webhook delivery events."},"WebhookEvent":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the webhook event.","example":"we_1234567890abcdefghij"},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the webhook event was created."},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the webhook event was last updated."},"webhookId":{"type":"string","description":"Webhook that receives this event.","example":"w_1234567890abcdefghij"},"type":{"type":"string","enum":["INVOICE_CREATED","INVOICE_CANCELED","INVOICE_PAID","INVOICE_PAID_OTHER","INVOICE_UPDATED","PAYMENT_COMPLETED","PAYMENT_REFUNDED","PAYMENT_ATTEMPT_FAILED","PAYMENT_ATTEMPT_SUCCEEDED","DISPUTE_CREATED","DISPUTE_RESPONSE_CREATED","DISPUTE_RESOLVED","CUSTOMER_CREATED","CUSTOMER_UPDATED","CUSTOMER_ARCHIVED","SUBSCRIPTION_CREATED","SUBSCRIPTION_UPDATED","SUBSCRIPTION_CANCELED","PAYMENT_METHOD_CREATED"],"description":"Webhook event type."},"status":{"type":"string","enum":["PENDING","SUCCESSFUL","RETRYING","FAILED"],"description":"Current delivery status.","example":"SUCCESSFUL"},"payload":{"type":"string","description":"Serialized event payload."},"nextCallAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Next scheduled retry time, if any.","example":null},"connectionId":{"type":"string","description":"Webhook connection identifier."}},"required":["id","createdAt","updatedAt","webhookId","type","status","payload","connectionId"],"description":"Webhook delivery event."},"RetryWebhookEventPayload":{"type":"object","properties":{"id":{"type":"string","description":"Unique identifier of the webhook event.","example":"we_1234567890abcdefghij"},"createdAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the webhook event was created."},"updatedAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"}],"description":"When the webhook event was last updated."},"webhookId":{"type":"string","description":"Webhook that receives this event.","example":"w_1234567890abcdefghij"},"type":{"type":"string","enum":["INVOICE_CREATED","INVOICE_CANCELED","INVOICE_PAID","INVOICE_PAID_OTHER","INVOICE_UPDATED","PAYMENT_COMPLETED","PAYMENT_REFUNDED","PAYMENT_ATTEMPT_FAILED","PAYMENT_ATTEMPT_SUCCEEDED","DISPUTE_CREATED","DISPUTE_RESPONSE_CREATED","DISPUTE_RESOLVED","CUSTOMER_CREATED","CUSTOMER_UPDATED","CUSTOMER_ARCHIVED","SUBSCRIPTION_CREATED","SUBSCRIPTION_UPDATED","SUBSCRIPTION_CANCELED","PAYMENT_METHOD_CREATED"],"description":"Webhook event type."},"status":{"type":"string","enum":["PENDING","SUCCESSFUL","RETRYING","FAILED"],"description":"Current delivery status.","example":"SUCCESSFUL"},"payload":{"type":"string","description":"Serialized event payload."},"nextCallAt":{"anyOf":[{"type":"string","description":"Date string"},{"type":"string","format":"date-time","description":"Date object"},{"type":"null"}],"description":"Next scheduled retry time, if any.","example":null},"connectionId":{"type":"string","description":"Webhook connection identifier."}},"required":["id","createdAt","updatedAt","webhookId","type","status","payload","connectionId"],"description":"Webhook event after queuing or attempting a manual retry."}},"parameters":{}},"paths":{"/v1/auth-links":{"post":{"operationId":"auth_links_create","tags":["Auth"],"summary":"Create auth link","description":"Generates a one-time authenticated URL that signs the customer into the payment portal.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAuthLinkArgs"}}}},"responses":{"200":{"description":"Auth link created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAuthLinkPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/customer-portal-session":{"post":{"operationId":"customer_portal_session_create","tags":["Auth"],"summary":"Create customer portal session","description":"Generates a one-time authenticated URL that signs the customer into the portal at a supported destination.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomerPortalSessionArgs"}}}},"responses":{"200":{"description":"Customer portal session created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomerPortalSessionPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/invoices":{"get":{"operationId":"invoices_list","tags":["Invoices"],"summary":"List invoices","description":"Returns invoices.","parameters":[{"schema":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"isPaid":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"canceledAt":{"$ref":"#/components/schemas/NullableDateTimeFilter"},"canceledById":{"$ref":"#/components/schemas/StringFilter"},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"items":{"type":"object","properties":{"some":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"concept":{"$ref":"#/components/schemas/ConceptFilter"},"amount":{"type":"object","properties":{"equals":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"in":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"notIn":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"lt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"lte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"description":{"$ref":"#/components/schemas/StringFilter"}},"additionalProperties":false},"every":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"concept":{"$ref":"#/components/schemas/ConceptFilter"},"amount":{"type":"object","properties":{"equals":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"in":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"notIn":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"lt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"lte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"description":{"$ref":"#/components/schemas/StringFilter"}},"additionalProperties":false},"none":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"concept":{"$ref":"#/components/schemas/ConceptFilter"},"amount":{"type":"object","properties":{"equals":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"in":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"notIn":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"lt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"lte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"description":{"$ref":"#/components/schemas/StringFilter"}},"additionalProperties":false}},"additionalProperties":false},"dueDate":{"$ref":"#/components/schemas/DateTimeFilter"},"expireDate":{"$ref":"#/components/schemas/NullableDateTimeFilter"},"subscriptionId":{"$ref":"#/components/schemas/StringFilter"},"customerId":{"$ref":"#/components/schemas/StringFilter"},"refundedAt":{"$ref":"#/components/schemas/NullableDateTimeFilter"},"refundedById":{"$ref":"#/components/schemas/StringFilter"},"collectionMethod":{"type":"string","enum":["AUTOMATIC","SEND_REMINDER","NONE"]},"metadata":{"type":"object","properties":{"some":{"type":"object","properties":{"key":{"type":"object","properties":{"name":{"type":"string"}}},"value":{"type":"string"}},"required":["key","value"]},"none":{"type":"object","properties":{"key":{"type":"object","properties":{"name":{"type":"string"}}},"value":{"type":"string"}},"required":["key","value"]},"every":{"type":"object","properties":{"key":{"type":"object","properties":{"name":{"type":"string"}}},"value":{"type":"string"}},"required":["key","value"]}}},"createdBy":{"$ref":"#/components/schemas/UserFilter"},"AND":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceFilter"}},"OR":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceFilter"}},"customer":{"$ref":"#/components/schemas/CustomerFilter"},"beneficiary":{"$ref":"#/components/schemas/CustomerFilter"},"paidWith":{"$ref":"#/components/schemas/PaymentFilter"}},"additionalProperties":false,"description":"Filter fields encoded with `qs` bracket notation."},"required":false,"description":"Filter fields encoded with `qs` bracket notation.","style":"deepObject","explode":true,"name":"filter","in":"query"},{"schema":{"type":"number","minimum":0,"default":0,"description":"Pagination offset.","example":0},"required":false,"description":"Pagination offset.","name":"skip","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"Pagination limit.","example":20},"required":false,"description":"Pagination limit.","name":"take","in":"query"},{"schema":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"createdAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"updatedAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"allowOfftimePayment":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"amountDue":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"amountPaid":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"dueDate":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"expireDate":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"canceledAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"paidWith":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"amount":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"isCompleted":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"paymentTime":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"createdAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"updatedAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"type":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"customer":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"createdAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"updatedAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"name":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"email":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"phoneNumber":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"username":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]}},"additionalProperties":false}},"additionalProperties":false},"customer":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"createdAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"updatedAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"name":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"email":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"phoneNumber":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"username":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]}},"additionalProperties":false}},"additionalProperties":false,"description":"Sort fields encoded with `qs` bracket notation."},"required":false,"description":"Sort fields encoded with `qs` bracket notation.","style":"deepObject","explode":true,"name":"orderBy","in":"query"}],"responses":{"200":{"description":"Invoices list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetInvoicesResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}},"post":{"operationId":"invoices_create","tags":["Invoices"],"summary":"Create invoice","description":"Creates a new invoice for a customer.","requestBody":{"required":true,"content":{"application/json":{"example":{"input":{"customerId":"cus_1234567890abcdefghij","dueDate":"2026-09-01T00:00:00.000Z","collectionMethod":"SEND_REMINDER","items":[{"concept":{"displayName":"Colegiatura septiembre","amount":150000,"currency":"MXN"}}]}},"schema":{"$ref":"#/components/schemas/CreateInvoiceArgs"}}}},"responses":{"200":{"description":"Invoice created","content":{"application/json":{"example":{"invoice":{"id":"inv_1234567890abcdefghij","customerId":"cus_1234567890abcdefghij","totalAmount":150000,"currency":"MXN","isPaid":false}},"schema":{"$ref":"#/components/schemas/CreateInvoicePayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/invoices/{id}":{"get":{"operationId":"invoices_get_by_id","tags":["Invoices"],"summary":"Get invoice","description":"Returns an invoice by id.","parameters":[{"schema":{"type":"string","description":"Identifier of the invoice."},"required":true,"description":"Identifier of the invoice.","name":"id","in":"path"}],"responses":{"200":{"description":"Invoice details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetInvoiceResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Invoice not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}},"patch":{"operationId":"invoices_update","tags":["Invoices"],"summary":"Update invoice","description":"Updates editable fields of an existing invoice by id.","parameters":[{"schema":{"type":"string","description":"Identifier of the invoice."},"required":true,"description":"Identifier of the invoice.","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInvoiceArgs"}}}},"responses":{"200":{"description":"Invoice updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateInvoicePayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Invoice not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}},"delete":{"operationId":"invoices_cancel","tags":["Invoices"],"summary":"Cancel invoice","description":"Cancels an unpaid invoice by id.","parameters":[{"schema":{"type":"string","description":"Identifier of the invoice."},"required":true,"description":"Identifier of the invoice.","name":"id","in":"path"}],"responses":{"200":{"description":"Invoice canceled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelInvoicePayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Invoice not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/invoices/{id}/payment-link":{"get":{"operationId":"invoices_get_payment_link","tags":["Invoices"],"summary":"Get payment link","description":"Returns an authenticated payment link for the invoice.","parameters":[{"schema":{"type":"string","description":"Identifier of the invoice."},"required":true,"description":"Identifier of the invoice.","name":"id","in":"path"}],"responses":{"200":{"description":"Payment link details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPaymentLinkResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Invoice not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/invoices/{id}/try-payment":{"post":{"operationId":"invoices_try_payment","tags":["Invoices"],"summary":"Retry invoice payment","description":"Attempts to charge the invoice using the associated payment method.","parameters":[{"schema":{"type":"string","description":"Identifier of the invoice."},"required":true,"description":"Identifier of the invoice.","name":"id","in":"path"}],"responses":{"200":{"description":"Payment attempt result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetryInvoicePaymentPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Invoice not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/invoices/{id}/mark-paid":{"post":{"operationId":"invoices_mark_paid","tags":["Invoices"],"summary":"Mark invoice as paid","description":"Manually marks an invoice as paid, creating a payment record.","parameters":[{"schema":{"type":"string","description":"Identifier of the invoice."},"required":true,"description":"Identifier of the invoice.","name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkInvoiceAsPaidArgs"}}}},"responses":{"200":{"description":"Invoice marked as paid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkInvoiceAsPaidPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Invoice not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/invoices/{id}/payments":{"post":{"operationId":"invoices_obtain_payment","tags":["Invoices"],"summary":"Obtain invoice payment instructions","description":"Creates or reuses a pending CASH or TRANSFER payment and returns its payment instructions.","parameters":[{"schema":{"type":"string","description":"Identifier of the invoice."},"required":true,"description":"Identifier of the invoice.","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObtainInvoicePaymentRequest"}}}},"responses":{"200":{"description":"Invoice payment instructions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObtainInvoicePaymentPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Invoice not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/invoices/{id}/payments/apply":{"post":{"operationId":"invoices_apply_payment","tags":["Invoices"],"summary":"Apply invoice payment","description":"Applies a full or partial existing or external payment to an invoice.","parameters":[{"schema":{"type":"string","description":"Identifier of the invoice."},"required":true,"description":"Identifier of the invoice.","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyInvoicePaymentArgs"}}}},"responses":{"200":{"description":"Payment applied to invoice","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplyInvoicePaymentPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Invoice or payment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/invoices/{id}/reminders":{"post":{"operationId":"invoices_send_reminder","tags":["Invoices"],"summary":"Send invoice reminder","description":"Sends a payment reminder for an invoice through the requested channel.","parameters":[{"schema":{"type":"string","description":"Identifier of the invoice."},"required":true,"description":"Identifier of the invoice.","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendPaymentReminderArgs"}}}},"responses":{"200":{"description":"Invoice reminder sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendPaymentReminderPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Invoice not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/tax-invoices":{"get":{"operationId":"tax_invoices_list","tags":["Tax Invoices"],"summary":"List tax invoices","description":"Returns tax invoices for the organization.","parameters":[{"schema":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"issueDate":{"$ref":"#/components/schemas/DateTimeFilter"},"customerId":{"$ref":"#/components/schemas/StringFilter"},"taxId":{"$ref":"#/components/schemas/StringFilter"},"isPublicInvoice":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"folio":{"$ref":"#/components/schemas/StringFilter"},"canceledAt":{"$ref":"#/components/schemas/DateTimeFilter"},"canceledById":{"$ref":"#/components/schemas/StringFilter"},"uuid":{"$ref":"#/components/schemas/StringFilter"},"status":{"type":"string","enum":["VALID","CANCELED","PENDING","DRAFT","PENDING_CANCELLATION","FAILED"]},"cancellationStatus":{"$ref":"#/components/schemas/StringFilter"},"usage":{"$ref":"#/components/schemas/StringFilter"},"paymentMethod":{"$ref":"#/components/schemas/StringFilter"},"paymentForm":{"$ref":"#/components/schemas/StringFilter"},"type":{"type":"string","enum":["TAX_RECEIPT","TAX_INVOICE_PPD","TAX_INVOICE_PUE"]},"AND":{"type":"array","items":{"$ref":"#/components/schemas/TaxInvoiceFilter"}},"OR":{"type":"array","items":{"$ref":"#/components/schemas/TaxInvoiceFilter"}},"customer":{"$ref":"#/components/schemas/CustomerFilter"},"paidWith":{"$ref":"#/components/schemas/PaymentFilter"}},"additionalProperties":false,"description":"Filter fields encoded with `qs` bracket notation."},"required":false,"description":"Filter fields encoded with `qs` bracket notation.","style":"deepObject","explode":true,"name":"filter","in":"query"},{"schema":{"type":"number","minimum":0,"default":0,"description":"Pagination offset.","example":0},"required":false,"description":"Pagination offset.","name":"skip","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"Pagination limit.","example":20},"required":false,"description":"Pagination limit.","name":"take","in":"query"},{"schema":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"createdAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"updatedAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"canceledAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"paidWith":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"amount":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"isCompleted":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"paymentTime":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"createdAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"updatedAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"type":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"customer":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"createdAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"updatedAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"name":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"email":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"phoneNumber":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"username":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]}},"additionalProperties":false}},"additionalProperties":false},"customer":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"createdAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"updatedAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"name":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"email":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"phoneNumber":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"username":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]}},"additionalProperties":false}},"additionalProperties":false,"description":"Sort fields encoded with `qs` bracket notation."},"required":false,"description":"Sort fields encoded with `qs` bracket notation.","style":"deepObject","explode":true,"name":"orderBy","in":"query"}],"responses":{"200":{"description":"Tax invoices list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTaxInvoicesResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}},"post":{"operationId":"tax_invoices_create","tags":["Tax Invoices"],"summary":"Create tax invoice","description":"Creates a tax invoice for an invoice or payment.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTaxInvoiceArgs"}}}},"responses":{"200":{"description":"Tax invoice created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTaxInvoicePayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/tax-invoices/{id}":{"get":{"operationId":"tax_invoices_get_by_id","tags":["Tax Invoices"],"summary":"Get tax invoice","description":"Returns a tax invoice by id.","parameters":[{"schema":{"type":"string","description":"Identifier of the tax invoice."},"required":true,"description":"Identifier of the tax invoice.","name":"id","in":"path"}],"responses":{"200":{"description":"Tax invoice details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTaxInvoiceResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Tax invoice not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/tax-invoices/{id}/cancel":{"post":{"operationId":"tax_invoices_cancel","tags":["Tax Invoices"],"summary":"Cancel tax invoice","description":"Requests cancellation of an issued tax invoice.","parameters":[{"schema":{"type":"string","description":"Identifier of the tax invoice."},"required":true,"description":"Identifier of the tax invoice.","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelTaxInvoiceArgs"}}}},"responses":{"200":{"description":"Tax invoice canceled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelTaxInvoicePayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Tax invoice not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/subscriptions":{"get":{"operationId":"subscriptions_list","tags":["Subscriptions"],"summary":"List subscriptions","description":"Returns subscriptions.","parameters":[{"schema":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"description":{"$ref":"#/components/schemas/StringFilter"},"customerId":{"$ref":"#/components/schemas/StringFilter"},"collectionMethod":{"type":"string","enum":["AUTOMATIC","SEND_REMINDER","NONE"]},"paymentMethodId":{"$ref":"#/components/schemas/StringFilter"},"nextCollectionDate":{"$ref":"#/components/schemas/NullableDateTimeFilter"},"firstCollectionDate":{"$ref":"#/components/schemas/DateTimeFilter"},"lastCollectionDate":{"$ref":"#/components/schemas/NullableDateTimeFilter"},"generationMode":{"type":"string","enum":["MANUAL","AUTO"]},"onlyAutomaticCollection":{"type":"object","properties":{"equals":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]}}},"isActive":{"type":"object","properties":{"equals":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]}}},"isCompleted":{"type":"object","properties":{"equals":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]}}},"status":{"type":"string","enum":["INACTIVE","ACTIVE","CANCELED","COMPLETED"]},"customCancelReason":{"$ref":"#/components/schemas/StringFilter"},"metadata":{"type":"object","properties":{"some":{"type":"object","properties":{"key":{"type":"object","properties":{"name":{"type":"string"}}},"value":{"type":"string"}},"required":["key","value"]},"none":{"type":"object","properties":{"key":{"type":"object","properties":{"name":{"type":"string"}}},"value":{"type":"string"}},"required":["key","value"]},"every":{"type":"object","properties":{"key":{"type":"object","properties":{"name":{"type":"string"}}},"value":{"type":"string"}},"required":["key","value"]}}},"AND":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionFilter"}},"OR":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionFilter"}},"customer":{"$ref":"#/components/schemas/CustomerFilter"},"paymentMethod":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"customerId":{"$ref":"#/components/schemas/StringFilter"},"type":{"type":"object","properties":{"equals":{"type":"string","enum":["CARD","MEXICAN_BANK_ACCOUNT"]},"in":{"type":"array","items":{"type":"string","enum":["CARD","MEXICAN_BANK_ACCOUNT"]}},"notIn":{"type":"array","items":{"type":"string","enum":["CARD","MEXICAN_BANK_ACCOUNT"]}}},"additionalProperties":false},"confirmed":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"default":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"expired":{"type":"object","properties":{"equals":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]}}},"cardDetail":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"bin":{"$ref":"#/components/schemas/StringFilter"},"last4":{"$ref":"#/components/schemas/StringFilter"},"expiryMonth":{"type":"object","properties":{"equals":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"in":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"notIn":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"lt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"lte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"expiryYear":{"type":"object","properties":{"equals":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"in":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"notIn":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"lt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"lte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"isExpired":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]}},"additionalProperties":false},"null":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]}},"additionalProperties":false}},"additionalProperties":false,"description":"Filter fields encoded with `qs` bracket notation."},"required":false,"description":"Filter fields encoded with `qs` bracket notation.","style":"deepObject","explode":true,"name":"filter","in":"query"},{"schema":{"type":"number","minimum":0,"default":0,"description":"Pagination offset.","example":0},"required":false,"description":"Pagination offset.","name":"skip","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"Pagination limit.","example":20},"required":false,"description":"Pagination limit.","name":"take","in":"query"},{"schema":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"createdAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"updatedAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"description":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"firstCollectionDate":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"nextCollectionDate":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"lastCollectionDate":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"isActive":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"isCompleted":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"status":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"customer":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"createdAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"updatedAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"name":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"email":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"phoneNumber":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"username":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]}},"additionalProperties":false}},"additionalProperties":false,"description":"Sort fields encoded with `qs` bracket notation."},"required":false,"description":"Sort fields encoded with `qs` bracket notation.","style":"deepObject","explode":true,"name":"orderBy","in":"query"}],"responses":{"200":{"description":"Subscriptions list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSubscriptionsResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}},"post":{"operationId":"subscriptions_create","tags":["Subscriptions"],"summary":"Create subscription","description":"Creates a new recurring subscription for a customer.","requestBody":{"required":true,"content":{"application/json":{"example":{"input":{"customerId":"cus_1234567890abcdefghij","description":"Colegiatura mensual","collectionMethod":"SEND_REMINDER","nextCollectionDate":"2026-09-01T00:00:00.000Z","recurrentDetail":{"chargeEach":1,"collectionInterval":"MONTH"},"items":[{"conceptId":"pc_1234567890abcdefghij","quantity":1,"amount":150000,"currency":"MXN"}]}},"schema":{"$ref":"#/components/schemas/CreateSubscriptionArgs"}}}},"responses":{"200":{"description":"Subscription created","content":{"application/json":{"example":{"subscription":{"id":"sub_1234567890abcdefghij","customerId":"cus_1234567890abcdefghij","status":"ACTIVE","collectionMethod":"SEND_REMINDER","isActive":true}},"schema":{"$ref":"#/components/schemas/CreateSubscriptionPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/subscriptions/{id}":{"get":{"operationId":"subscriptions_get_by_id","tags":["Subscriptions"],"summary":"Get subscription","description":"Returns a subscription by id.","parameters":[{"schema":{"type":"string","description":"Identifier of the subscription."},"required":true,"description":"Identifier of the subscription.","name":"id","in":"path"}],"responses":{"200":{"description":"Subscription details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSubscriptionResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Subscription not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}},"patch":{"operationId":"subscriptions_update","tags":["Subscriptions"],"summary":"Update subscription","description":"Updates editable fields of an existing subscription by id.","parameters":[{"schema":{"type":"string","description":"Identifier of the subscription."},"required":true,"description":"Identifier of the subscription.","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionArgs"}}}},"responses":{"200":{"description":"Subscription updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriptionPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Subscription not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}},"delete":{"operationId":"subscriptions_cancel","tags":["Subscriptions"],"summary":"Cancel subscription","description":"Cancels an active subscription by id.","parameters":[{"schema":{"type":"string","description":"Identifier of the subscription."},"required":true,"description":"Identifier of the subscription.","name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelSubscriptionArgs"}}}},"responses":{"200":{"description":"Subscription canceled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelSubscriptionPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Subscription not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/subscriptions/{id}/restore":{"post":{"operationId":"subscriptions_restore","tags":["Subscriptions"],"summary":"Restore subscription","description":"Restores a canceled subscription and optionally restores invoices canceled with it.","parameters":[{"schema":{"type":"string","description":"Identifier of the subscription."},"required":true,"description":"Identifier of the subscription.","name":"id","in":"path"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreSubscriptionArgs"}}}},"responses":{"200":{"description":"Subscription restored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreSubscriptionPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Subscription not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/payment-methods/{id}":{"delete":{"operationId":"payment_methods_delete","tags":["Payment Methods"],"summary":"Delete payment method","description":"Deletes a payment method by id.","parameters":[{"schema":{"type":"string","description":"Identifier of the payment method."},"required":true,"description":"Identifier of the payment method.","name":"id","in":"path"}],"responses":{"200":{"description":"Payment method deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletePaymentMethodPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Payment method not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/payment-concepts":{"get":{"operationId":"payment_concepts_list","tags":["Catalog"],"summary":"List payment concepts","description":"Returns payment concepts for the organization. One-off concepts are excluded.","parameters":[{"schema":{"type":"object","properties":{"term":{"type":"string"},"id":{"$ref":"#/components/schemas/StringFilter"},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"displayName":{"$ref":"#/components/schemas/StringFilter"},"sku":{"$ref":"#/components/schemas/StringFilter"},"description":{"$ref":"#/components/schemas/StringFilter"},"active":{"type":"object","properties":{"equals":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]}}},"amount":{"type":"object","properties":{"equals":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"in":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"notIn":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"lt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"lte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"archivedAt":{"$ref":"#/components/schemas/NullableDateTimeFilter"},"archivedById":{"$ref":"#/components/schemas/StringFilter"},"metadataItem":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"recurrentDetailId":{"$ref":"#/components/schemas/NullableStringFilter"},"groupId":{"$ref":"#/components/schemas/NullableStringFilter"},"group":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"name":{"$ref":"#/components/schemas/StringFilter"},"null":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]}},"additionalProperties":false},"AND":{"type":"array","items":{"$ref":"#/components/schemas/ConceptFilter"}},"OR":{"type":"array","items":{"$ref":"#/components/schemas/ConceptFilter"}}},"additionalProperties":false,"description":"Filter fields encoded with `qs` bracket notation."},"required":false,"description":"Filter fields encoded with `qs` bracket notation.","style":"deepObject","explode":true,"name":"filter","in":"query"},{"schema":{"type":"number","minimum":0,"default":0,"description":"Pagination offset.","example":0},"required":false,"description":"Pagination offset.","name":"skip","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"Pagination limit.","example":20},"required":false,"description":"Pagination limit.","name":"take","in":"query"},{"schema":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"createdAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"updatedAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"displayName":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"sku":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"active":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"amount":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"archivedAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"groupId":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]}},"additionalProperties":false,"description":"Sort fields encoded with `qs` bracket notation."},"required":false,"description":"Sort fields encoded with `qs` bracket notation.","style":"deepObject","explode":true,"name":"orderBy","in":"query"}],"responses":{"200":{"description":"Payment concepts list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPaymentConceptsResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}},"post":{"operationId":"payment_concepts_create","tags":["Catalog"],"summary":"Create payment concept","description":"Creates a new product or service in the catalog.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentConceptArgs"}}}},"responses":{"200":{"description":"Payment concept created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentConceptPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/payment-concepts/{id}":{"get":{"operationId":"payment_concepts_get_by_id","tags":["Catalog"],"summary":"Get payment concept","description":"Returns a single payment concept by id.","parameters":[{"schema":{"type":"string","description":"Identifier of the payment concept."},"required":true,"description":"Identifier of the payment concept.","name":"id","in":"path"}],"responses":{"200":{"description":"Payment concept details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPaymentConceptResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Payment concept not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}},"patch":{"operationId":"payment_concepts_update","tags":["Catalog"],"summary":"Update payment concept","description":"Updates editable fields of an existing payment concept by id.","parameters":[{"schema":{"type":"string","description":"Identifier of the payment concept."},"required":true,"description":"Identifier of the payment concept.","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePaymentConceptArgs"}}}},"responses":{"200":{"description":"Payment concept updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePaymentConceptPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Payment concept not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/discounts":{"get":{"operationId":"discounts_list","tags":["Catalog"],"summary":"List discounts","description":"Returns reusable discounts for the organization. One-off discounts are excluded.","parameters":[{"schema":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"deletedAt":{"$ref":"#/components/schemas/NullableDateTimeFilter"},"name":{"$ref":"#/components/schemas/StringFilter"},"description":{"$ref":"#/components/schemas/NullableStringFilter"},"type":{"$ref":"#/components/schemas/StringFilter"},"amountOff":{"type":"object","properties":{"equals":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"in":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"notIn":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"lt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"lte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"percentageOff":{"type":"object","properties":{"equals":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"in":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"notIn":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"lt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"lte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"active":{"type":"object","properties":{"equals":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]}}},"oneOff":{"type":"object","properties":{"equals":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]}}},"expiresAt":{"$ref":"#/components/schemas/NullableDateTimeFilter"},"AND":{"type":"array","items":{"$ref":"#/components/schemas/DiscountFilter"}},"OR":{"type":"array","items":{"$ref":"#/components/schemas/DiscountFilter"}}},"additionalProperties":false,"description":"Filter fields encoded with `qs` bracket notation."},"required":false,"description":"Filter fields encoded with `qs` bracket notation.","style":"deepObject","explode":true,"name":"filter","in":"query"},{"schema":{"type":"number","minimum":0,"default":0,"description":"Pagination offset.","example":0},"required":false,"description":"Pagination offset.","name":"skip","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"Pagination limit.","example":20},"required":false,"description":"Pagination limit.","name":"take","in":"query"},{"schema":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"createdAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"updatedAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"name":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"type":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"amountOff":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"percentageOff":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"active":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"expiresAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]}},"additionalProperties":false,"description":"Sort fields encoded with `qs` bracket notation."},"required":false,"description":"Sort fields encoded with `qs` bracket notation.","style":"deepObject","explode":true,"name":"orderBy","in":"query"}],"responses":{"200":{"description":"Discounts list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDiscountsResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}},"post":{"operationId":"discounts_create","tags":["Catalog"],"summary":"Create discount","description":"Creates a new reusable discount.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDiscountArgs"}}}},"responses":{"200":{"description":"Discount created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDiscountPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/discounts/{id}":{"get":{"operationId":"discounts_get_by_id","tags":["Catalog"],"summary":"Get discount","description":"Returns a single discount by id.","parameters":[{"schema":{"type":"string","description":"Identifier of the discount."},"required":true,"description":"Identifier of the discount.","name":"id","in":"path"}],"responses":{"200":{"description":"Discount details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDiscountResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Discount not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}},"patch":{"operationId":"discounts_update","tags":["Catalog"],"summary":"Update discount","description":"Updates editable fields of an existing discount by id.","parameters":[{"schema":{"type":"string","description":"Identifier of the discount."},"required":true,"description":"Identifier of the discount.","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDiscountArgs"}}}},"responses":{"200":{"description":"Discount updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDiscountPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Discount not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}},"delete":{"operationId":"discounts_delete","tags":["Catalog"],"summary":"Delete discount","description":"Deletes a discount and all associated discount codes.","parameters":[{"schema":{"type":"string","description":"Identifier of the discount."},"required":true,"description":"Identifier of the discount.","name":"id","in":"path"}],"responses":{"200":{"description":"Discount deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteDiscountPayload"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Discount not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/customers":{"get":{"operationId":"customers_list","tags":["Customers"],"summary":"List customers","description":"Returns customers.","parameters":[{"schema":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"name":{"$ref":"#/components/schemas/StringFilter"},"archivedAt":{"$ref":"#/components/schemas/NullableDateTimeFilter"},"email":{"$ref":"#/components/schemas/StringFilter"},"phoneNumber":{"$ref":"#/components/schemas/StringFilter"},"secondaryPhoneNumber":{"$ref":"#/components/schemas/StringFilter"},"username":{"$ref":"#/components/schemas/StringFilter"},"tags":{"type":"object","properties":{"some":{"$ref":"#/components/schemas/TagFilter"},"every":{"$ref":"#/components/schemas/TagFilter"},"none":{"$ref":"#/components/schemas/TagFilter"}},"additionalProperties":false},"invoices":{"type":"object","properties":{"some":{"$ref":"#/components/schemas/InvoiceFilter"},"every":{"$ref":"#/components/schemas/InvoiceFilter"},"none":{"$ref":"#/components/schemas/InvoiceFilter"}},"additionalProperties":false},"receivedAnnouncements":{"type":"object","properties":{"some":{"type":"object","properties":{"announcementId":{"$ref":"#/components/schemas/StringFilter"}},"additionalProperties":false},"every":{"type":"object","properties":{"announcementId":{"$ref":"#/components/schemas/StringFilter"}},"additionalProperties":false},"none":{"type":"object","properties":{"announcementId":{"$ref":"#/components/schemas/StringFilter"}},"additionalProperties":false}},"additionalProperties":false},"metadataItem":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]},"metadata":{"type":"object","properties":{"some":{"type":"object","properties":{"key":{"type":"object","properties":{"name":{"type":"string"}}},"value":{"type":"string"}},"required":["key","value"]},"none":{"type":"object","properties":{"key":{"type":"object","properties":{"name":{"type":"string"}}},"value":{"type":"string"}},"required":["key","value"]},"every":{"type":"object","properties":{"key":{"type":"object","properties":{"name":{"type":"string"}}},"value":{"type":"string"}},"required":["key","value"]}}},"assignee":{"$ref":"#/components/schemas/MemberFilter"},"noPayments":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"hasTaxProfiles":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"AND":{"type":"array","items":{"$ref":"#/components/schemas/CustomerFilter"}},"OR":{"type":"array","items":{"$ref":"#/components/schemas/CustomerFilter"}}},"additionalProperties":false,"description":"Filter fields encoded with `qs` bracket notation."},"required":false,"description":"Filter fields encoded with `qs` bracket notation.","style":"deepObject","explode":true,"name":"filter","in":"query"},{"schema":{"type":"number","minimum":0,"default":0,"description":"Pagination offset.","example":0},"required":false,"description":"Pagination offset.","name":"skip","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"Pagination limit.","example":20},"required":false,"description":"Pagination limit.","name":"take","in":"query"},{"schema":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"createdAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"updatedAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"name":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"email":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"phoneNumber":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"username":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]}},"additionalProperties":false,"description":"Sort fields encoded with `qs` bracket notation."},"required":false,"description":"Sort fields encoded with `qs` bracket notation.","style":"deepObject","explode":true,"name":"orderBy","in":"query"}],"responses":{"200":{"description":"Customers list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCustomersResponse"}}}},"400":{"description":"Invalid query parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}},"post":{"operationId":"customers_create","tags":["Customers"],"summary":"Create customer","description":"Creates a new customer.","requestBody":{"required":true,"content":{"application/json":{"example":{"input":{"name":"Alicia Pérez","username":"12873","email":"alicia@ejemplo.com","phoneNumber":"+528444191046"}},"schema":{"$ref":"#/components/schemas/CreateCustomerArgs"}}}},"responses":{"200":{"description":"Customer created","content":{"application/json":{"example":{"customer":{"id":"cus_1234567890abcdefghij","name":"Alicia Pérez","username":"12873","email":"alicia@ejemplo.com","phoneNumber":"+528444191046"}},"schema":{"$ref":"#/components/schemas/CreateCustomerPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/customers/{id}":{"get":{"operationId":"customers_get_by_id","tags":["Customers"],"summary":"Get customer","description":"Returns a customer by id.","parameters":[{"schema":{"type":"string","description":"Identifier of the customer."},"required":true,"description":"Identifier of the customer.","name":"id","in":"path"}],"responses":{"200":{"description":"Customer details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCustomerResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Customer not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}},"patch":{"operationId":"customers_update","tags":["Customers"],"summary":"Update customer","description":"Updates editable fields of an existing customer by id.","parameters":[{"schema":{"type":"string","description":"Identifier of the customer."},"required":true,"description":"Identifier of the customer.","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerArgs"}}}},"responses":{"200":{"description":"Customer updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Customer not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/customers/{customerId}/payment_methods":{"get":{"operationId":"customers_get_payment_methods","tags":["Customers"],"summary":"Get customer payment methods","description":"Returns confirmed, non-deleted payment methods for a customer.","parameters":[{"schema":{"type":"string","description":"Identifier of the customer."},"required":true,"description":"Identifier of the customer.","name":"customerId","in":"path"}],"responses":{"200":{"description":"Confirmed payment methods","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCustomerPaymentMethodsResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Customer not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/customers/{customerId}/tax-profiles":{"post":{"operationId":"customers_create_tax_profile","tags":["Customers"],"summary":"Create customer tax profile","description":"Creates a fiscal profile for a customer.","parameters":[{"schema":{"type":"string","description":"Identifier of the customer."},"required":true,"description":"Identifier of the customer.","name":"customerId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomerTaxInfoArgs"}}}},"responses":{"200":{"description":"Customer tax profile created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetCustomerTaxInfoPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Customer not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/customers/{customerId}/tax-profiles/{id}":{"patch":{"operationId":"customers_update_tax_profile","tags":["Customers"],"summary":"Update customer tax profile","description":"Updates a fiscal profile for a customer.","parameters":[{"schema":{"type":"string","description":"Identifier of the customer."},"required":true,"description":"Identifier of the customer.","name":"customerId","in":"path"},{"schema":{"type":"string","description":"Identifier of the customer tax profile."},"required":true,"description":"Identifier of the customer tax profile.","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerTaxInfoArgs"}}}},"responses":{"200":{"description":"Customer tax profile updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetCustomerTaxInfoPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Customer tax profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}},"delete":{"operationId":"customers_delete_tax_profile","tags":["Customers"],"summary":"Delete customer tax profile","description":"Soft-deletes a fiscal profile for a customer.","parameters":[{"schema":{"type":"string","description":"Identifier of the customer."},"required":true,"description":"Identifier of the customer.","name":"customerId","in":"path"},{"schema":{"type":"string","description":"Identifier of the customer tax profile."},"required":true,"description":"Identifier of the customer tax profile.","name":"id","in":"path"}],"responses":{"200":{"description":"Customer tax profile deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteCustomerTaxInfoPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Customer tax profile not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/payments":{"get":{"operationId":"payments_list","tags":["Payments"],"summary":"List payments","description":"Returns payments for the organization.","parameters":[{"schema":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"amount":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"status":{"type":"object","properties":{"equals":{"type":"string","enum":["INCOMPLETE","COMPLETE","CANCELED","INITIATED","REFUNDED","DISPUTED","REVERTED"]},"not":{"type":"string","enum":["INCOMPLETE","COMPLETE","CANCELED","INITIATED","REFUNDED","DISPUTED","REVERTED"]},"in":{"type":"array","items":{"type":"string","enum":["INCOMPLETE","COMPLETE","CANCELED","INITIATED","REFUNDED","DISPUTED","REVERTED"]}},"notIn":{"type":"array","items":{"type":"string","enum":["INCOMPLETE","COMPLETE","CANCELED","INITIATED","REFUNDED","DISPUTED","REVERTED"]}}},"additionalProperties":false},"isCompleted":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"skipTaxInvoice":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"paymentTime":{"$ref":"#/components/schemas/DateTimeFilter"},"type":{"type":"object","properties":{"equals":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]},"not":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]},"in":{"type":"array","items":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]}},"notIn":{"type":"array","items":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]}}},"additionalProperties":false},"processor":{"type":"object","properties":{"equals":{"type":"string","enum":["FISERV","KUSHKI","QUENTLI","SANTANDER","STRIPE","TAPI"]},"not":{"type":"string","enum":["FISERV","KUSHKI","QUENTLI","SANTANDER","STRIPE","TAPI"]},"in":{"type":"array","items":{"type":"string","enum":["FISERV","KUSHKI","QUENTLI","SANTANDER","STRIPE","TAPI"]}},"notIn":{"type":"array","items":{"type":"string","enum":["FISERV","KUSHKI","QUENTLI","SANTANDER","STRIPE","TAPI"]}}},"additionalProperties":false},"refunds":{"type":"object","properties":{"some":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"amount":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"}},"additionalProperties":false},"none":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"amount":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"}},"additionalProperties":false},"every":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"amount":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"}},"additionalProperties":false}},"additionalProperties":false},"taxInvoices":{"type":"object","properties":{"some":{"$ref":"#/components/schemas/TaxInvoiceFilter"},"none":{"$ref":"#/components/schemas/TaxInvoiceFilter"},"every":{"$ref":"#/components/schemas/TaxInvoiceFilter"}},"additionalProperties":false},"payoutId":{"$ref":"#/components/schemas/StringFilter"},"customerId":{"$ref":"#/components/schemas/StringFilter"},"cardDetail":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"bin":{"$ref":"#/components/schemas/StringFilter"},"last4":{"$ref":"#/components/schemas/StringFilter"},"expiryMonth":{"type":"object","properties":{"equals":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"in":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"notIn":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"lt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"lte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"expiryYear":{"type":"object","properties":{"equals":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"in":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"notIn":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"lt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"lte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"isExpired":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]}},"additionalProperties":false},"authorizationCode":{"$ref":"#/components/schemas/StringFilter"},"hasRelatedInvoice":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"payout":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"settleDate":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"grossAmount":{"type":"object","properties":{"equals":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"in":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"notIn":{"type":"array","items":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"lt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"lte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gt":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]},"gte":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"inconsistent":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"payer":{"type":"object","properties":{"equals":{"type":"string","enum":["AMEX","FISERV","STRIPE","KUSHKI","SANTANDER","TAPI","QUENTLI"]},"in":{"type":"array","items":{"type":"string","enum":["AMEX","FISERV","STRIPE","KUSHKI","SANTANDER","TAPI","QUENTLI"]}},"notIn":{"type":"array","items":{"type":"string","enum":["AMEX","FISERV","STRIPE","KUSHKI","SANTANDER","TAPI","QUENTLI"]}}},"additionalProperties":false},"null":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]}},"additionalProperties":false},"attempts":{"type":"object","properties":{"every":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"paymentId":{"$ref":"#/components/schemas/StringFilter"},"success":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"type":{"type":"object","properties":{"equals":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]},"not":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]},"in":{"type":"array","items":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]}},"notIn":{"type":"array","items":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]}}},"additionalProperties":false},"attemptedBy":{"allOf":[{"$ref":"#/components/schemas/UserFilter"},{"type":["object","null"]}]},"automatic":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"scheduled":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"authenticated":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"monthlyInstallments":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"none":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"paymentId":{"$ref":"#/components/schemas/StringFilter"},"success":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"type":{"type":"object","properties":{"equals":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]},"not":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]},"in":{"type":"array","items":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]}},"notIn":{"type":"array","items":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]}}},"additionalProperties":false},"attemptedBy":{"allOf":[{"$ref":"#/components/schemas/UserFilter"},{"type":["object","null"]}]},"automatic":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"scheduled":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"authenticated":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"monthlyInstallments":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false},"some":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"paymentId":{"$ref":"#/components/schemas/StringFilter"},"success":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"type":{"type":"object","properties":{"equals":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]},"not":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]},"in":{"type":"array","items":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]}},"notIn":{"type":"array","items":{"type":"string","enum":["TRANSFER","CARD","OXXO","OTHER","CASH","DIRECT_DEBIT"]}}},"additionalProperties":false},"attemptedBy":{"allOf":[{"$ref":"#/components/schemas/UserFilter"},{"type":["object","null"]}]},"automatic":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"scheduled":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"authenticated":{"anyOf":[{"type":"boolean","description":"Boolean"},{"type":"string","description":"Boolean string"}]},"monthlyInstallments":{"anyOf":[{"type":"number","description":"Number"},{"type":"string","description":"Numeric string"}]}},"additionalProperties":false}},"additionalProperties":false},"paymentConceptId":{"type":"string"},"paymentConceptGroupIds":{"type":"array","items":{"type":"string"}},"origin":{"type":"object","properties":{"equals":{"type":"string","enum":["INVOICE","LISTING","API"]},"in":{"type":"array","items":{"type":"string","enum":["INVOICE","LISTING","API"]}},"notIn":{"type":"array","items":{"type":"string","enum":["INVOICE","LISTING","API"]}}},"additionalProperties":false},"disputes":{"type":"object","properties":{"some":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"status":{"type":"object","properties":{"equals":{"type":"string","enum":["PENDING_RESPONSE","IN_REVIEW","CLOSED","LOST","WON"]},"in":{"type":"array","items":{"type":"string","enum":["PENDING_RESPONSE","IN_REVIEW","CLOSED","LOST","WON"]}},"notIn":{"type":"array","items":{"type":"string","enum":["PENDING_RESPONSE","IN_REVIEW","CLOSED","LOST","WON"]}}},"additionalProperties":false},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"resolvedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"respondBy":{"$ref":"#/components/schemas/DateTimeFilter"},"resolvedBy":{"$ref":"#/components/schemas/UserFilter"},"lostReason":{"$ref":"#/components/schemas/StringFilter"}}},"none":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"status":{"type":"object","properties":{"equals":{"type":"string","enum":["PENDING_RESPONSE","IN_REVIEW","CLOSED","LOST","WON"]},"in":{"type":"array","items":{"type":"string","enum":["PENDING_RESPONSE","IN_REVIEW","CLOSED","LOST","WON"]}},"notIn":{"type":"array","items":{"type":"string","enum":["PENDING_RESPONSE","IN_REVIEW","CLOSED","LOST","WON"]}}},"additionalProperties":false},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"resolvedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"respondBy":{"$ref":"#/components/schemas/DateTimeFilter"},"resolvedBy":{"$ref":"#/components/schemas/UserFilter"},"lostReason":{"$ref":"#/components/schemas/StringFilter"}}},"every":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"status":{"type":"object","properties":{"equals":{"type":"string","enum":["PENDING_RESPONSE","IN_REVIEW","CLOSED","LOST","WON"]},"in":{"type":"array","items":{"type":"string","enum":["PENDING_RESPONSE","IN_REVIEW","CLOSED","LOST","WON"]}},"notIn":{"type":"array","items":{"type":"string","enum":["PENDING_RESPONSE","IN_REVIEW","CLOSED","LOST","WON"]}}},"additionalProperties":false},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"resolvedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"respondBy":{"$ref":"#/components/schemas/DateTimeFilter"},"resolvedBy":{"$ref":"#/components/schemas/UserFilter"},"lostReason":{"$ref":"#/components/schemas/StringFilter"}}}},"additionalProperties":false},"response":{"type":"object","properties":{"fieldName":{"type":"string"},"answer":{"type":"string"}},"required":["fieldName","answer"]},"transferInstruction":{"type":"object","properties":{"reference":{"$ref":"#/components/schemas/StringFilter"},"clabe":{"$ref":"#/components/schemas/StringFilter"}}},"cashPaymentInstructions":{"type":"object","properties":{"reference":{"$ref":"#/components/schemas/StringFilter"}}},"oxxoInstruction":{"type":"object","properties":{"reference":{"$ref":"#/components/schemas/StringFilter"}}},"externalPaymentType":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"name":{"$ref":"#/components/schemas/StringFilter"},"taxPaymentForm":{"$ref":"#/components/schemas/StringFilter"}}},"AND":{"type":"array","items":{"$ref":"#/components/schemas/PaymentFilter"}},"OR":{"type":"array","items":{"$ref":"#/components/schemas/PaymentFilter"}},"customer":{"$ref":"#/components/schemas/CustomerFilter"}},"additionalProperties":false,"description":"Filter fields encoded with `qs` bracket notation."},"required":false,"description":"Filter fields encoded with `qs` bracket notation.","style":"deepObject","explode":true,"name":"filter","in":"query"},{"schema":{"type":"number","minimum":0,"default":0,"description":"Pagination offset.","example":0},"required":false,"description":"Pagination offset.","name":"skip","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"Pagination limit.","example":20},"required":false,"description":"Pagination limit.","name":"take","in":"query"},{"schema":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"amount":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"isCompleted":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"paymentTime":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"createdAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"updatedAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"type":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"customer":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"createdAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"updatedAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"name":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"email":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"phoneNumber":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"username":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]}},"additionalProperties":false}},"additionalProperties":false,"description":"Sort fields encoded with `qs` bracket notation."},"required":false,"description":"Sort fields encoded with `qs` bracket notation.","style":"deepObject","explode":true,"name":"orderBy","in":"query"}],"responses":{"200":{"description":"Payments list","content":{"application/json":{"example":[{"id":"p_1234567890abcdefghij","amount":150000,"currency":"MXN","type":"CARD","status":"COMPLETE","customerId":"cus_1234567890abcdefghij"}],"schema":{"$ref":"#/components/schemas/GetPaymentsResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}},"post":{"operationId":"payments_create","tags":["Payments"],"summary":"Create payment","description":"Creates a direct payment against a saved payment method. Optionally attempts to process it immediately.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentArgs"}}}},"responses":{"200":{"description":"Payment created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Customer or payment method not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/payments/{id}":{"get":{"operationId":"payments_get_by_id","tags":["Payments"],"summary":"Get payment","description":"Returns a payment by id.","parameters":[{"schema":{"type":"string","description":"Identifier of the payment."},"required":true,"description":"Identifier of the payment.","name":"id","in":"path"}],"responses":{"200":{"description":"Payment details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPaymentResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Payment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/sandbox/payments/{id}/complete":{"post":{"operationId":"sandbox_payments_complete","tags":["Sandbox"],"summary":"Complete a sandbox payment","description":"Submits a pending CASH or TRANSFER payment to the sandbox webhook flow. This endpoint is unavailable in production.","parameters":[{"schema":{"type":"string","description":"Identifier of the payment."},"required":true,"description":"Identifier of the payment.","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteSandboxPaymentRequest"}}}},"responses":{"200":{"description":"Sandbox payment submitted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteSandboxPaymentPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Payment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/payments/{id}/receipt":{"post":{"operationId":"payments_send_receipt","tags":["Payments"],"summary":"Send payment receipt","description":"Sends a payment receipt through the requested channels.","parameters":[{"schema":{"type":"string","description":"Identifier of the payment."},"required":true,"description":"Identifier of the payment.","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendPaymentReceiptArgs"}}}},"responses":{"200":{"description":"Payment receipt sent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendPaymentReceiptPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Payment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/payment-sessions":{"post":{"operationId":"payment_sessions_create","tags":["Payment Sessions"],"summary":"Create payment session","description":"Creates a hosted payment session. Resolves or creates the customer and returns an authenticated payment URL.","requestBody":{"required":true,"content":{"application/json":{"examples":{"invoiceSession":{"summary":"Pay existing invoices","value":{"input":{"invoiceIds":["inv_1234567890abcdefghij","inv_abcdefghij1234567890"],"customer":{"name":"Juan Pérez","externalId":"A-1029"},"returnUrl":"https://example.com/payments/success"}}},"adHocSession":{"summary":"Create an ad hoc payment","value":{"input":{"amount":150000,"currency":"MXN","description":"Colegiatura Enero 2026","customer":{"name":"Ana Rodríguez","externalId":"cliente-123"},"returnUrl":"https://example.com/payments/success"}}}},"schema":{"$ref":"#/components/schemas/CreatePaymentSessionArgs"}}}},"responses":{"200":{"description":"Payment session created","content":{"application/json":{"example":{"url":"https://pagos.ejemplo.com/pay/ps_1234567890abcdefghij","paymentSession":{"id":"ps_1234567890abcdefghij","status":"PENDING","totalAmount":150000,"currency":"MXN"}},"schema":{"$ref":"#/components/schemas/CreatePaymentSessionPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/payment-sessions/{id}":{"get":{"operationId":"payment_sessions_get_by_id","tags":["Payment Sessions"],"summary":"Get payment session","description":"Returns a public payment session by id, or null when it does not exist.","security":[],"parameters":[{"schema":{"type":"string","description":"Identifier of the payment session."},"required":true,"description":"Identifier of the payment session.","name":"id","in":"path"}],"responses":{"200":{"description":"Payment session details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetPaymentSessionResponse"}}}}}}},"/v1/setup-sessions":{"post":{"operationId":"setup_sessions_create","tags":["Payment Sessions"],"summary":"Create setup session","description":"Creates a hosted session for enrolling a payment method. Resolves or creates the customer and returns an authenticated setup URL.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSetupSessionArgs"}}}},"responses":{"200":{"description":"Setup session created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSetupSessionPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/refunds":{"post":{"operationId":"refunds_create","tags":["Payments"],"summary":"Create refund","description":"Refunds a completed payment, fully or partially.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRefundArgs"}}}},"responses":{"200":{"description":"Refund created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRefundPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Payment not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/webhooks":{"get":{"operationId":"webhooks_list","tags":["Webhooks"],"summary":"List webhooks","description":"Returns webhook endpoints for the organization.","parameters":[{"schema":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"url":{"$ref":"#/components/schemas/StringFilter"},"status":{"type":"string","enum":["ENABLED","DISABLED","BROKEN","DELETED"]},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"}},"description":"Filter fields encoded with `qs` bracket notation."},"required":false,"description":"Filter fields encoded with `qs` bracket notation.","style":"deepObject","explode":true,"name":"filter","in":"query"},{"schema":{"type":"number","minimum":0,"default":0,"description":"Pagination offset.","example":0},"required":false,"description":"Pagination offset.","name":"skip","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"Pagination limit.","example":20},"required":false,"description":"Pagination limit.","name":"take","in":"query"},{"schema":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"createdAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"updatedAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"url":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"status":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]}},"description":"Sort fields encoded with `qs` bracket notation."},"required":false,"description":"Sort fields encoded with `qs` bracket notation.","style":"deepObject","explode":true,"name":"orderBy","in":"query"}],"responses":{"200":{"description":"Webhooks list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWebhooksResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}},"post":{"operationId":"webhooks_create","tags":["Webhooks"],"summary":"Create webhook","description":"Creates a webhook endpoint for the organization.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookArgs"}}}},"responses":{"200":{"description":"Webhook created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/webhooks/{id}":{"get":{"operationId":"webhooks_get_by_id","tags":["Webhooks"],"summary":"Get webhook","description":"Returns a webhook by id.","parameters":[{"schema":{"type":"string","description":"Identifier of the webhook."},"required":true,"description":"Identifier of the webhook.","name":"id","in":"path"}],"responses":{"200":{"description":"Webhook details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWebhookResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Webhook not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}},"patch":{"operationId":"webhooks_update","tags":["Webhooks"],"summary":"Update webhook","description":"Updates a webhook endpoint.","parameters":[{"schema":{"type":"string","description":"Identifier of the webhook."},"required":true,"description":"Identifier of the webhook.","name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookArgs"}}}},"responses":{"200":{"description":"Webhook updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Webhook not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}},"delete":{"operationId":"webhooks_delete","tags":["Webhooks"],"summary":"Delete webhook","description":"Soft-deletes a webhook endpoint.","parameters":[{"schema":{"type":"string","description":"Identifier of the webhook."},"required":true,"description":"Identifier of the webhook.","name":"id","in":"path"}],"responses":{"200":{"description":"Webhook deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Webhook not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/webhooks/{id}/secret":{"get":{"operationId":"webhooks_reveal_secret","tags":["Webhooks"],"summary":"Reveal webhook signing secret","description":"Returns the generated signing secret for a webhook endpoint.","parameters":[{"schema":{"type":"string","description":"Identifier of the webhook."},"required":true,"description":"Identifier of the webhook.","name":"id","in":"path"}],"responses":{"200":{"description":"Webhook signing secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSecretPayload"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Webhook not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/webhooks/{id}/secret/rotate":{"post":{"operationId":"webhooks_rotate_secret","tags":["Webhooks"],"summary":"Rotate webhook signing secret","description":"Regenerates and returns the signing secret for a webhook endpoint.","parameters":[{"schema":{"type":"string","description":"Identifier of the webhook."},"required":true,"description":"Identifier of the webhook.","name":"id","in":"path"}],"responses":{"200":{"description":"Rotated webhook signing secret","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSecretPayload"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Webhook not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/webhook-events":{"get":{"operationId":"webhook_events_list","tags":["Webhooks"],"summary":"List webhook events","description":"Returns webhook delivery events for the organization.","parameters":[{"schema":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"},"type":{"type":"object","properties":{"equals":{"type":"string","enum":["INVOICE_CREATED","INVOICE_CANCELED","INVOICE_PAID","INVOICE_PAID_OTHER","INVOICE_UPDATED","PAYMENT_COMPLETED","PAYMENT_REFUNDED","PAYMENT_ATTEMPT_FAILED","PAYMENT_ATTEMPT_SUCCEEDED","DISPUTE_CREATED","DISPUTE_RESPONSE_CREATED","DISPUTE_RESOLVED","CUSTOMER_CREATED","CUSTOMER_UPDATED","CUSTOMER_ARCHIVED","SUBSCRIPTION_CREATED","SUBSCRIPTION_UPDATED","SUBSCRIPTION_CANCELED","PAYMENT_METHOD_CREATED"]},"not":{"type":"string","enum":["INVOICE_CREATED","INVOICE_CANCELED","INVOICE_PAID","INVOICE_PAID_OTHER","INVOICE_UPDATED","PAYMENT_COMPLETED","PAYMENT_REFUNDED","PAYMENT_ATTEMPT_FAILED","PAYMENT_ATTEMPT_SUCCEEDED","DISPUTE_CREATED","DISPUTE_RESPONSE_CREATED","DISPUTE_RESOLVED","CUSTOMER_CREATED","CUSTOMER_UPDATED","CUSTOMER_ARCHIVED","SUBSCRIPTION_CREATED","SUBSCRIPTION_UPDATED","SUBSCRIPTION_CANCELED","PAYMENT_METHOD_CREATED"]},"in":{"type":"array","items":{"type":"string","enum":["INVOICE_CREATED","INVOICE_CANCELED","INVOICE_PAID","INVOICE_PAID_OTHER","INVOICE_UPDATED","PAYMENT_COMPLETED","PAYMENT_REFUNDED","PAYMENT_ATTEMPT_FAILED","PAYMENT_ATTEMPT_SUCCEEDED","DISPUTE_CREATED","DISPUTE_RESPONSE_CREATED","DISPUTE_RESOLVED","CUSTOMER_CREATED","CUSTOMER_UPDATED","CUSTOMER_ARCHIVED","SUBSCRIPTION_CREATED","SUBSCRIPTION_UPDATED","SUBSCRIPTION_CANCELED","PAYMENT_METHOD_CREATED"]}},"notIn":{"type":"array","items":{"type":"string","enum":["INVOICE_CREATED","INVOICE_CANCELED","INVOICE_PAID","INVOICE_PAID_OTHER","INVOICE_UPDATED","PAYMENT_COMPLETED","PAYMENT_REFUNDED","PAYMENT_ATTEMPT_FAILED","PAYMENT_ATTEMPT_SUCCEEDED","DISPUTE_CREATED","DISPUTE_RESPONSE_CREATED","DISPUTE_RESOLVED","CUSTOMER_CREATED","CUSTOMER_UPDATED","CUSTOMER_ARCHIVED","SUBSCRIPTION_CREATED","SUBSCRIPTION_UPDATED","SUBSCRIPTION_CANCELED","PAYMENT_METHOD_CREATED"]}}},"additionalProperties":false},"status":{"type":"object","properties":{"equals":{"type":"string","enum":["PENDING","SUCCESSFUL","RETRYING","FAILED"]},"not":{"type":"string","enum":["PENDING","SUCCESSFUL","RETRYING","FAILED"]},"in":{"type":"array","items":{"type":"string","enum":["PENDING","SUCCESSFUL","RETRYING","FAILED"]}},"notIn":{"type":"array","items":{"type":"string","enum":["PENDING","SUCCESSFUL","RETRYING","FAILED"]}}},"additionalProperties":false},"createdAt":{"$ref":"#/components/schemas/DateTimeFilter"},"updatedAt":{"$ref":"#/components/schemas/DateTimeFilter"},"webhook":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/StringFilter"}}},"AND":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEventFilter"}},"OR":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEventFilter"}}},"description":"Filter fields encoded with `qs` bracket notation."},"required":false,"description":"Filter fields encoded with `qs` bracket notation.","style":"deepObject","explode":true,"name":"filter","in":"query"},{"schema":{"type":"number","minimum":0,"default":0,"description":"Pagination offset.","example":0},"required":false,"description":"Pagination offset.","name":"skip","in":"query"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"Pagination limit.","example":20},"required":false,"description":"Pagination limit.","name":"take","in":"query"},{"schema":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"createdAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"updatedAt":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"type":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]},"status":{"anyOf":[{"type":"string","enum":["asc"],"description":"Ascending"},{"type":"string","enum":["desc"],"description":"Descending"}]}},"description":"Sort fields encoded with `qs` bracket notation."},"required":false,"description":"Sort fields encoded with `qs` bracket notation.","style":"deepObject","explode":true,"name":"orderBy","in":"query"}],"responses":{"200":{"description":"Webhook events list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWebhookEventsResponse"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}},"/v1/webhook-events/{id}/retry":{"post":{"operationId":"webhook_events_retry","tags":["Webhooks"],"summary":"Retry webhook event","description":"Manually retries delivery for a webhook event.","parameters":[{"schema":{"type":"string","description":"Identifier of the webhook event."},"required":true,"description":"Identifier of the webhook event.","name":"id","in":"path"}],"responses":{"200":{"description":"Webhook event retried","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RetryWebhookEventPayload"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}},"404":{"description":"Webhook event not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserError"}}}}}}}},"webhooks":{"invoiceCreated":{"post":{"operationId":"invoiceCreatedWebhook","summary":"Invoice created","description":"Quentli sends this event with `eventType` set to `INVOICE_CREATED`.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","description":"Unique webhook delivery identifier."},"eventType":{"type":"string","enum":["INVOICE_CREATED"],"description":"Event type represented by this webhook delivery."},"data":{"$ref":"#/components/schemas/InvoiceWebhookData"}},"required":["eventId","eventType","data"]}}}},"responses":{"2XX":{"description":"Webhook accepted by the receiver."}}}},"invoiceUpdated":{"post":{"operationId":"invoiceUpdatedWebhook","summary":"Invoice updated","description":"Quentli sends this event with `eventType` set to `INVOICE_UPDATED`.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","description":"Unique webhook delivery identifier."},"eventType":{"type":"string","enum":["INVOICE_UPDATED"],"description":"Event type represented by this webhook delivery."},"data":{"$ref":"#/components/schemas/InvoiceWebhookData"}},"required":["eventId","eventType","data"]}}}},"responses":{"2XX":{"description":"Webhook accepted by the receiver."}}}},"invoiceCanceled":{"post":{"operationId":"invoiceCanceledWebhook","summary":"Invoice canceled","description":"Quentli sends this event with `eventType` set to `INVOICE_CANCELED`.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","description":"Unique webhook delivery identifier."},"eventType":{"type":"string","enum":["INVOICE_CANCELED"],"description":"Event type represented by this webhook delivery."},"data":{"$ref":"#/components/schemas/InvoiceWebhookData"}},"required":["eventId","eventType","data"]}}}},"responses":{"2XX":{"description":"Webhook accepted by the receiver."}}}},"invoicePaid":{"post":{"operationId":"invoicePaidWebhook","summary":"Invoice paid","description":"Quentli sends this event with `eventType` set to `INVOICE_PAID`.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","description":"Unique webhook delivery identifier."},"eventType":{"type":"string","enum":["INVOICE_PAID"],"description":"Event type represented by this webhook delivery."},"data":{"$ref":"#/components/schemas/InvoiceWebhookData"}},"required":["eventId","eventType","data"]}}}},"responses":{"2XX":{"description":"Webhook accepted by the receiver."}}}},"invoicePaidOther":{"post":{"operationId":"invoicePaidOtherWebhook","summary":"Invoice paid outside Quentli","description":"Quentli sends this event with `eventType` set to `INVOICE_PAID_OTHER`.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","description":"Unique webhook delivery identifier."},"eventType":{"type":"string","enum":["INVOICE_PAID_OTHER"],"description":"Event type represented by this webhook delivery."},"data":{"$ref":"#/components/schemas/InvoiceWebhookData"}},"required":["eventId","eventType","data"]}}}},"responses":{"2XX":{"description":"Webhook accepted by the receiver."}}}},"customerCreated":{"post":{"operationId":"customerCreatedWebhook","summary":"Customer created","description":"Quentli sends this event with `eventType` set to `CUSTOMER_CREATED`.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","description":"Unique webhook delivery identifier."},"eventType":{"type":"string","enum":["CUSTOMER_CREATED"],"description":"Event type represented by this webhook delivery."},"data":{"$ref":"#/components/schemas/CustomerWebhookData"}},"required":["eventId","eventType","data"]}}}},"responses":{"2XX":{"description":"Webhook accepted by the receiver."}}}},"customerUpdated":{"post":{"operationId":"customerUpdatedWebhook","summary":"Customer updated","description":"Quentli sends this event with `eventType` set to `CUSTOMER_UPDATED`.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","description":"Unique webhook delivery identifier."},"eventType":{"type":"string","enum":["CUSTOMER_UPDATED"],"description":"Event type represented by this webhook delivery."},"data":{"$ref":"#/components/schemas/CustomerWebhookData"}},"required":["eventId","eventType","data"]}}}},"responses":{"2XX":{"description":"Webhook accepted by the receiver."}}}},"customerArchived":{"post":{"operationId":"customerArchivedWebhook","summary":"Customer archived","description":"Quentli sends this event with `eventType` set to `CUSTOMER_ARCHIVED`.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","description":"Unique webhook delivery identifier."},"eventType":{"type":"string","enum":["CUSTOMER_ARCHIVED"],"description":"Event type represented by this webhook delivery."},"data":{"$ref":"#/components/schemas/CustomerWebhookData"}},"required":["eventId","eventType","data"]}}}},"responses":{"2XX":{"description":"Webhook accepted by the receiver."}}}},"paymentAttemptSucceeded":{"post":{"operationId":"paymentAttemptSucceededWebhook","summary":"Payment attempt succeeded","description":"Quentli sends this event with `eventType` set to `PAYMENT_ATTEMPT_SUCCEEDED`.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","description":"Unique webhook delivery identifier."},"eventType":{"type":"string","enum":["PAYMENT_ATTEMPT_SUCCEEDED"],"description":"Event type represented by this webhook delivery."},"data":{"$ref":"#/components/schemas/PaymentAttemptWebhookData"}},"required":["eventId","eventType","data"]}}}},"responses":{"2XX":{"description":"Webhook accepted by the receiver."}}}},"paymentAttemptFailed":{"post":{"operationId":"paymentAttemptFailedWebhook","summary":"Payment attempt failed","description":"Quentli sends this event with `eventType` set to `PAYMENT_ATTEMPT_FAILED`.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","description":"Unique webhook delivery identifier."},"eventType":{"type":"string","enum":["PAYMENT_ATTEMPT_FAILED"],"description":"Event type represented by this webhook delivery."},"data":{"$ref":"#/components/schemas/PaymentAttemptWebhookData"}},"required":["eventId","eventType","data"]}}}},"responses":{"2XX":{"description":"Webhook accepted by the receiver."}}}},"paymentCompleted":{"post":{"operationId":"paymentCompletedWebhook","summary":"Payment completed","description":"Quentli sends this event with `eventType` set to `PAYMENT_COMPLETED`.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","description":"Unique webhook delivery identifier."},"eventType":{"type":"string","enum":["PAYMENT_COMPLETED"],"description":"Event type represented by this webhook delivery."},"data":{"$ref":"#/components/schemas/PaymentCompletedWebhookData"}},"required":["eventId","eventType","data"]}}}},"responses":{"2XX":{"description":"Webhook accepted by the receiver."}}}},"paymentMethodCreated":{"post":{"operationId":"paymentMethodCreatedWebhook","summary":"Payment method created","description":"Quentli sends this event with `eventType` set to `PAYMENT_METHOD_CREATED`.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","description":"Unique webhook delivery identifier."},"eventType":{"type":"string","enum":["PAYMENT_METHOD_CREATED"],"description":"Event type represented by this webhook delivery."},"data":{"$ref":"#/components/schemas/PaymentMethodCreatedWebhookData"}},"required":["eventId","eventType","data"]}}}},"responses":{"2XX":{"description":"Webhook accepted by the receiver."}}}},"paymentRefunded":{"post":{"operationId":"paymentRefundedWebhook","summary":"Payment refunded","description":"Quentli sends this event with `eventType` set to `PAYMENT_REFUNDED`.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","description":"Unique webhook delivery identifier."},"eventType":{"type":"string","enum":["PAYMENT_REFUNDED"],"description":"Event type represented by this webhook delivery."},"data":{"$ref":"#/components/schemas/PaymentRefundedWebhookData"}},"required":["eventId","eventType","data"]}}}},"responses":{"2XX":{"description":"Webhook accepted by the receiver."}}}},"disputeCreated":{"post":{"operationId":"disputeCreatedWebhook","summary":"Dispute created","description":"Quentli sends this event with `eventType` set to `DISPUTE_CREATED`.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","description":"Unique webhook delivery identifier."},"eventType":{"type":"string","enum":["DISPUTE_CREATED"],"description":"Event type represented by this webhook delivery."},"data":{"$ref":"#/components/schemas/DisputeWebhookData"}},"required":["eventId","eventType","data"]}}}},"responses":{"2XX":{"description":"Webhook accepted by the receiver."}}}},"disputeResponseCreated":{"post":{"operationId":"disputeResponseCreatedWebhook","summary":"Dispute response created","description":"Quentli sends this event with `eventType` set to `DISPUTE_RESPONSE_CREATED`.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","description":"Unique webhook delivery identifier."},"eventType":{"type":"string","enum":["DISPUTE_RESPONSE_CREATED"],"description":"Event type represented by this webhook delivery."},"data":{"$ref":"#/components/schemas/DisputeWebhookData"}},"required":["eventId","eventType","data"]}}}},"responses":{"2XX":{"description":"Webhook accepted by the receiver."}}}},"disputeResolved":{"post":{"operationId":"disputeResolvedWebhook","summary":"Dispute resolved","description":"Quentli sends this event with `eventType` set to `DISPUTE_RESOLVED`.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","description":"Unique webhook delivery identifier."},"eventType":{"type":"string","enum":["DISPUTE_RESOLVED"],"description":"Event type represented by this webhook delivery."},"data":{"$ref":"#/components/schemas/DisputeWebhookData"}},"required":["eventId","eventType","data"]}}}},"responses":{"2XX":{"description":"Webhook accepted by the receiver."}}}},"subscriptionCreated":{"post":{"operationId":"subscriptionCreatedWebhook","summary":"Subscription created","description":"Quentli sends this event with `eventType` set to `SUBSCRIPTION_CREATED`.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","description":"Unique webhook delivery identifier."},"eventType":{"type":"string","enum":["SUBSCRIPTION_CREATED"],"description":"Event type represented by this webhook delivery."},"data":{"$ref":"#/components/schemas/SubscriptionWebhookData"}},"required":["eventId","eventType","data"]}}}},"responses":{"2XX":{"description":"Webhook accepted by the receiver."}}}},"subscriptionUpdated":{"post":{"operationId":"subscriptionUpdatedWebhook","summary":"Subscription updated","description":"Quentli sends this event with `eventType` set to `SUBSCRIPTION_UPDATED`.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","description":"Unique webhook delivery identifier."},"eventType":{"type":"string","enum":["SUBSCRIPTION_UPDATED"],"description":"Event type represented by this webhook delivery."},"data":{"$ref":"#/components/schemas/SubscriptionWebhookData"}},"required":["eventId","eventType","data"]}}}},"responses":{"2XX":{"description":"Webhook accepted by the receiver."}}}},"subscriptionCanceled":{"post":{"operationId":"subscriptionCanceledWebhook","summary":"Subscription canceled","description":"Quentli sends this event with `eventType` set to `SUBSCRIPTION_CANCELED`.","security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"string","description":"Unique webhook delivery identifier."},"eventType":{"type":"string","enum":["SUBSCRIPTION_CANCELED"],"description":"Event type represented by this webhook delivery."},"data":{"$ref":"#/components/schemas/SubscriptionWebhookData"}},"required":["eventId","eventType","data"]}}}},"responses":{"2XX":{"description":"Webhook accepted by the receiver."}}}}}}