{"openapi":"3.1.1","info":{"title":"Timbro API","version":"2026-10-01","description":"Merchant API for Payments, Invoices, and signed webhook events."},"paths":{"/v1/business/certification/invoices/issuance-readiness":{"get":{"operationId":"retrieveBusinessCertificationInvoiceIssuanceReadiness","summary":"Read Invoice issuance readiness for certification","tags":["business"],"description":"Reads the authenticated business's certification binding readiness. The environment is selected by the server and cannot be supplied by the caller.","security":[{"secretKey":[]},{"adminKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessCertificationInvoiceReadiness"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","person_session_missing"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["business_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveBusinessCertificationInvoiceIssuanceReadiness"}},"/v1/business/certification/sequences":{"post":{"operationId":"recordBusinessCertificationSequence","summary":"Record a DGII certification sequence","tags":["business"],"description":"Records the e-NCF range the business reports from the DGII certification portal in its certification binding. The authenticated business and certification environment are selected by the server. Timbro records the range as user-reported; this request does not claim DGII verification. Include the reported expiry date when required for the document type. E32 and E34 have no expiry date.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessCertificationSequenceRequest"}}}},"security":[{"adminKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessCertificationSequenceRegistration"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","person_session_missing"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["business_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["business_fiscal_setup_incomplete","sequence_overlap","sequence_conflict"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"422":{"description":"The request is well-formed but cannot be carried out.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":422},"code":{"type":"string","enum":["sequence_numbers_invalid","sequence_expiry_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["business_fiscal_setup_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveBusinessCertificationInvoiceIssuanceReadiness"}},"/v1/business/certification/invoices":{"post":{"operationId":"createBusinessCertificationInvoice","summary":"Issue an Invoice in certification","tags":["business"],"description":"Issues the supplied Invoice through the authenticated business's certification binding. The server fixes the environment to certification; production issuance remains on the ordinary Invoice API.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRequest"}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x20-\\x7e]+$"},"in":"header","name":"idempotency-key","required":false}],"security":[{"adminKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResource"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResource"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed","custody_certificate_malformed","custody_signature_algorithm_unsupported","custody_certificate_trust_profile_unsupported","custody_certificate_chain_untrusted","custody_certificate_purpose_unsupported","source_provider_installation_request_invalid","missing_idempotency_key","invalid_idempotency_key","malformed_json","invalid_request","invoice_original_invalid","invalid_collection_query","invalid_collection_cursor","invalid_replay_scope","webhook_destination_not_allowed","commercial_response_motive_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","unauthenticated","invalid_login","invalid_credential","credential_revoked"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted","insufficient_role","service_role_not_permitted","invitation_email_mismatch","issuer_not_authorized"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["integration_not_connected","email_already_registered","organization_slug_taken","hosted_tenant_conflict","legal_issuer_already_registered","onboarding_legal_issuer_identity_conflict","legal_issuer_profile_incomplete","already_a_member","certificate_custody_binding_conflict","certificate_custody_certificate_not_active","certificate_custody_certificate_version_not_active","source_provider_authorization_required","source_provider_installation_disabled","source_provider_installation_removed","source_provider_scope_insufficient","source_provider_target_access_removed","source_provider_authorization_conflict","source_provider_installation_callback_replayed","integration_creation_conflict","integration_activation_conflict","integration_activation_verification_rejected","certification_environment_required","certification_test_set_required","certification_test_run_in_progress","idempotency_key_conflict","fiscal_number_already_used","sequence_changed","sequence_source_record_conflict","source_version_stale","source_predecessor_conflict","source_history_requires_reconciliation","source_content_conflict","source_action_conflict","source_command_conflict","invoice_reference_conflict","invoice_totals_mismatch","printed_representation_profile_conflict","source_record_already_fiscalized","source_operation_pending","source_outcome_unknown","authority_rejected_replacement","fiscal_operation_not_in_intervention","intervention_not_resumable","intervention_not_closable","correction_target_unsettled","correction_target_closed","invoice_receipt_not_ready","fiscal_delivery_outcome_conflict","webhook_endpoint_registration_conflict","webhook_endpoint_suspended","webhook_endpoint_deleted","commercial_response_decision_conflict","receiving_issuer_held_elsewhere","production_reception_certificate_required","production_reception_integration_required","production_reception_already_filed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large","request_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"422":{"description":"The request is well-formed but cannot be carried out.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":422},"code":{"type":"string","enum":["invalid_fiscal_identity","invalid_certificate_custody_signer_identity","certificate_p12_password_invalid","custody_certificate_not_yet_valid","custody_certificate_expired","custody_p12_work_limit_exceeded","certificate_custody_environment_signer_mismatch","delegated_sequence_verifier_forbidden","certification_test_set_invalid","document_type_not_enabled","fiscal_intent_rejected","unsupported_printed_representation_profile","affected_fiscal_operation_unsupported","fiscal_issuance_blocked","unsigned_document_schema_invalid","signed_document_schema_invalid","portal_document_unsupported","portal_document_taxpayer_mismatch","portal_document_consent_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error","fiscal_artifact_unverified"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["business_fiscal_binding_unavailable","source_provider_unavailable","source_provider_throttled","source_provider_outcome_unknown","fiscal_artifact_unavailable","invoice_receipt_unavailable","fiscal_delivery_unavailable","custody_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"fiscal_acceptance","x-timbro-idempotency":"optional","x-timbro-retry":"retry_with_same_idempotency_key","x-timbro-recovery":"retrieveBusinessCertificationInvoice"}},"/v1/business/certification/invoices/{invoiceId}":{"get":{"operationId":"retrieveBusinessCertificationInvoice","summary":"Retrieve a certification Invoice","tags":["business"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"invoiceId","required":true}],"security":[{"secretKey":[]},{"adminKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResource"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","custody_certificate_malformed","custody_signature_algorithm_unsupported","custody_certificate_trust_profile_unsupported","custody_certificate_chain_untrusted","custody_certificate_purpose_unsupported","source_provider_installation_request_invalid","missing_idempotency_key","invalid_idempotency_key","malformed_json","invalid_request","invoice_original_invalid","invalid_collection_query","invalid_collection_cursor","invalid_replay_scope","webhook_destination_not_allowed","commercial_response_motive_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","unauthenticated","invalid_login","invalid_credential","credential_revoked"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["organization_not_found","legal_issuer_not_found","invitation_invalid","certificate_custody_binding_not_found","integration_not_found","source_provider_authorization_not_found","certification_test_run_document_not_found","fiscal_operation_not_found","invoice_not_found","fiscal_artifact_not_found","invoice_receipt_not_found","fiscal_delivery_not_found","webhook_endpoint_not_found","webhook_event_not_found","received_document_not_found","receiving_issuer_not_found","route_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["integration_not_connected","email_already_registered","organization_slug_taken","hosted_tenant_conflict","legal_issuer_already_registered","onboarding_legal_issuer_identity_conflict","legal_issuer_profile_incomplete","already_a_member","certificate_custody_binding_conflict","certificate_custody_certificate_not_active","certificate_custody_certificate_version_not_active","source_provider_authorization_required","source_provider_installation_disabled","source_provider_installation_removed","source_provider_scope_insufficient","source_provider_target_access_removed","source_provider_authorization_conflict","source_provider_installation_callback_replayed","integration_creation_conflict","integration_activation_conflict","integration_activation_verification_rejected","certification_environment_required","certification_test_set_required","certification_test_run_in_progress","idempotency_key_conflict","fiscal_number_already_used","sequence_changed","sequence_source_record_conflict","source_version_stale","source_predecessor_conflict","source_history_requires_reconciliation","source_content_conflict","source_action_conflict","source_command_conflict","invoice_reference_conflict","invoice_totals_mismatch","printed_representation_profile_conflict","source_record_already_fiscalized","source_operation_pending","source_outcome_unknown","authority_rejected_replacement","fiscal_operation_not_in_intervention","intervention_not_resumable","intervention_not_closable","correction_target_unsettled","correction_target_closed","invoice_receipt_not_ready","fiscal_delivery_outcome_conflict","webhook_endpoint_registration_conflict","webhook_endpoint_suspended","webhook_endpoint_deleted","commercial_response_decision_conflict","receiving_issuer_held_elsewhere","production_reception_certificate_required","production_reception_integration_required","production_reception_already_filed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error","fiscal_artifact_unverified"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["business_fiscal_binding_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveBusinessCertificationInvoice"}},"/v1/business/certification/invoices/{invoiceId}/xml":{"get":{"operationId":"downloadBusinessCertificationInvoiceXML","summary":"Download a certification Invoice XML","tags":["business"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"invoiceId","required":true}],"security":[{"secretKey":[]},{"adminKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/xml":{"schema":{"type":"string","format":"binary"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"timbro-file-sha256":{"$ref":"#/components/headers/TimbroFileSha256"},"timbro-invoice-id":{"$ref":"#/components/headers/TimbroInvoiceId"},"timbro-file-created-at":{"$ref":"#/components/headers/TimbroFileCreatedAt"},"timbro-certificate-sha256":{"$ref":"#/components/headers/TimbroCertificateSha256"},"timbro-security-code":{"$ref":"#/components/headers/TimbroSecurityCode"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","custody_certificate_malformed","custody_signature_algorithm_unsupported","custody_certificate_trust_profile_unsupported","custody_certificate_chain_untrusted","custody_certificate_purpose_unsupported","source_provider_installation_request_invalid","missing_idempotency_key","invalid_idempotency_key","malformed_json","invalid_request","invoice_original_invalid","invalid_collection_query","invalid_collection_cursor","invalid_replay_scope","webhook_destination_not_allowed","commercial_response_motive_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","unauthenticated","invalid_login","invalid_credential","credential_revoked"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["organization_not_found","legal_issuer_not_found","invitation_invalid","certificate_custody_binding_not_found","integration_not_found","source_provider_authorization_not_found","certification_test_run_document_not_found","fiscal_operation_not_found","invoice_not_found","fiscal_artifact_not_found","invoice_receipt_not_found","fiscal_delivery_not_found","webhook_endpoint_not_found","webhook_event_not_found","received_document_not_found","receiving_issuer_not_found","route_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["integration_not_connected","email_already_registered","organization_slug_taken","hosted_tenant_conflict","legal_issuer_already_registered","onboarding_legal_issuer_identity_conflict","legal_issuer_profile_incomplete","already_a_member","certificate_custody_binding_conflict","certificate_custody_certificate_not_active","certificate_custody_certificate_version_not_active","source_provider_authorization_required","source_provider_installation_disabled","source_provider_installation_removed","source_provider_scope_insufficient","source_provider_target_access_removed","source_provider_authorization_conflict","source_provider_installation_callback_replayed","integration_creation_conflict","integration_activation_conflict","integration_activation_verification_rejected","certification_environment_required","certification_test_set_required","certification_test_run_in_progress","idempotency_key_conflict","fiscal_number_already_used","sequence_changed","sequence_source_record_conflict","source_version_stale","source_predecessor_conflict","source_history_requires_reconciliation","source_content_conflict","source_action_conflict","source_command_conflict","invoice_reference_conflict","invoice_totals_mismatch","printed_representation_profile_conflict","source_record_already_fiscalized","source_operation_pending","source_outcome_unknown","authority_rejected_replacement","fiscal_operation_not_in_intervention","intervention_not_resumable","intervention_not_closable","correction_target_unsettled","correction_target_closed","invoice_receipt_not_ready","fiscal_delivery_outcome_conflict","webhook_endpoint_registration_conflict","webhook_endpoint_suspended","webhook_endpoint_deleted","commercial_response_decision_conflict","receiving_issuer_held_elsewhere","production_reception_certificate_required","production_reception_integration_required","production_reception_already_filed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error","fiscal_artifact_unverified"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["business_fiscal_binding_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_artifact","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveBusinessCertificationInvoice"}},"/v1/business/certification/invoices/{invoiceId}/pdf":{"get":{"operationId":"downloadBusinessCertificationInvoicePDF","summary":"Download a certification Invoice PDF","tags":["business"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"path","name":"invoiceId","required":true}],"security":[{"secretKey":[]},{"adminKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"timbro-file-sha256":{"$ref":"#/components/headers/TimbroFileSha256"},"timbro-invoice-id":{"$ref":"#/components/headers/TimbroInvoiceId"},"timbro-file-created-at":{"$ref":"#/components/headers/TimbroFileCreatedAt"},"timbro-pdf-sha256":{"$ref":"#/components/headers/TimbroPdfSha256"},"timbro-encf":{"$ref":"#/components/headers/TimbroEncf"},"timbro-invoice-type":{"$ref":"#/components/headers/TimbroInvoiceType"},"timbro-pdf-layout":{"$ref":"#/components/headers/TimbroPdfLayout"},"timbro-page-count":{"$ref":"#/components/headers/TimbroPageCount"},"timbro-signed-source-sha256":{"$ref":"#/components/headers/TimbroSignedSourceSha256"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","custody_certificate_malformed","custody_signature_algorithm_unsupported","custody_certificate_trust_profile_unsupported","custody_certificate_chain_untrusted","custody_certificate_purpose_unsupported","source_provider_installation_request_invalid","missing_idempotency_key","invalid_idempotency_key","malformed_json","invalid_request","invoice_original_invalid","invalid_collection_query","invalid_collection_cursor","invalid_replay_scope","webhook_destination_not_allowed","commercial_response_motive_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","unauthenticated","invalid_login","invalid_credential","credential_revoked"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["organization_not_found","legal_issuer_not_found","invitation_invalid","certificate_custody_binding_not_found","integration_not_found","source_provider_authorization_not_found","certification_test_run_document_not_found","fiscal_operation_not_found","invoice_not_found","fiscal_artifact_not_found","invoice_receipt_not_found","fiscal_delivery_not_found","webhook_endpoint_not_found","webhook_event_not_found","received_document_not_found","receiving_issuer_not_found","route_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["integration_not_connected","email_already_registered","organization_slug_taken","hosted_tenant_conflict","legal_issuer_already_registered","onboarding_legal_issuer_identity_conflict","legal_issuer_profile_incomplete","already_a_member","certificate_custody_binding_conflict","certificate_custody_certificate_not_active","certificate_custody_certificate_version_not_active","source_provider_authorization_required","source_provider_installation_disabled","source_provider_installation_removed","source_provider_scope_insufficient","source_provider_target_access_removed","source_provider_authorization_conflict","source_provider_installation_callback_replayed","integration_creation_conflict","integration_activation_conflict","integration_activation_verification_rejected","certification_environment_required","certification_test_set_required","certification_test_run_in_progress","idempotency_key_conflict","fiscal_number_already_used","sequence_changed","sequence_source_record_conflict","source_version_stale","source_predecessor_conflict","source_history_requires_reconciliation","source_content_conflict","source_action_conflict","source_command_conflict","invoice_reference_conflict","invoice_totals_mismatch","printed_representation_profile_conflict","source_record_already_fiscalized","source_operation_pending","source_outcome_unknown","authority_rejected_replacement","fiscal_operation_not_in_intervention","intervention_not_resumable","intervention_not_closable","correction_target_unsettled","correction_target_closed","invoice_receipt_not_ready","fiscal_delivery_outcome_conflict","webhook_endpoint_registration_conflict","webhook_endpoint_suspended","webhook_endpoint_deleted","commercial_response_decision_conflict","receiving_issuer_held_elsewhere","production_reception_certificate_required","production_reception_integration_required","production_reception_already_filed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error","fiscal_artifact_unverified"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["business_fiscal_binding_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_artifact","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveBusinessCertificationInvoice"}},"/v1/business":{"get":{"operationId":"retrieveBusiness","summary":"Retrieve the business","tags":["business"],"description":"Returns the business the credential selects, its capabilities, and the requirements that remain. A caller resumes onboarding by acting on the first requirement it owns and reading again. An integration reads the business that approved it with any invoices or payments scope.","security":[{"secretKey":[]},{"adminKey":[]},{"integrationToken":["invoices:test"]},{"integrationToken":["invoices:live"]},{"integrationToken":["payments:test"]},{"integrationToken":["payments:live"]}],"responses":{"200":{"description":"The business the credential selects, its capabilities, and the requirements that remain.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Business"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","person_session_missing","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["business_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveBusiness"},"patch":{"operationId":"updateBusiness","summary":"Update the business","tags":["business"],"description":"Replaces each member the request carries: requested capabilities, any subset of the fiscal details, or the whole payments profile. The server then provisions whatever the new state allows.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessUpdateRequest"}}}},"security":[{"adminKey":[]}],"responses":{"200":{"description":"The business the credential selects, its capabilities, and the requirements that remain.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Business"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","person_session_missing"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["business_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["business_revision_conflict","business_capabilities_required","business_identity_required","business_address_required","business_location_official_codes_required","business_details_invalid","business_contact_email_confirmation_required","business_guest_notice_acceptance_required","business_location_catalog_changed","business_location_selection_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["business_location_catalog_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveBusiness"}},"/v1/business/certification/peer-authentication":{"get":{"operationId":"retrieveBusinessPeerAuthentication","summary":"Read peer authentication","tags":["business"],"security":[{"adminKey":[]}],"responses":{"200":{"description":"Whether other electronic issuers must get a token before sending e-CF or commercial approvals to the business. One setting covers certification and production, which share the business's receiver address.","content":{"application/json":{"schema":{"type":"object","required":["object","enabled"],"properties":{"object":{"type":"string","const":"business_peer_authentication"},"enabled":{"type":"boolean"}},"title":"BusinessPeerAuthentication","description":"Whether other electronic issuers must get a token before sending e-CF or commercial approvals to the business. One setting covers certification and production, which share the business's receiver address.","additionalProperties":false}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","person_session_missing"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["business_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["business_fiscal_binding_unavailable","business_fiscal_setup_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveBusinessPeerAuthentication"},"post":{"operationId":"updateBusinessPeerAuthentication","summary":"Require or stop requiring peer authentication","tags":["business"],"description":"An administrator sets whether electronic issuers must obtain a token before sending e-CF or commercial approvals to this business. Returns the saved setting. This does not update DGII's directory or issue an invoice.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["enabled"],"properties":{"enabled":{"type":"boolean"}},"additionalProperties":false}}}},"security":[{"adminKey":[]}],"responses":{"200":{"description":"Whether other electronic issuers must get a token before sending e-CF or commercial approvals to the business. One setting covers certification and production, which share the business's receiver address.","content":{"application/json":{"schema":{"type":"object","required":["object","enabled"],"properties":{"object":{"type":"string","const":"business_peer_authentication"},"enabled":{"type":"boolean"}},"title":"BusinessPeerAuthentication","description":"Whether other electronic issuers must get a token before sending e-CF or commercial approvals to the business. One setting covers certification and production, which share the business's receiver address.","additionalProperties":false}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["business_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["business_fiscal_binding_unavailable","business_fiscal_setup_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveBusinessPeerAuthentication"}},"/v1/business/certification":{"get":{"operationId":"retrieveBusinessCertification","summary":"Retrieve the business certification process","tags":["business"],"description":"Returns the authenticated business's DGII certification path, prerequisites, the declared DGII step, all 15 official steps with the source of each status, reported evidence, and what the current step needs. A reported or declared step is never verified and never grants Live access.","security":[{"secretKey":[]},{"adminKey":[]}],"responses":{"200":{"description":"Durable certification preparation and user-reported DGII progress for the authenticated business. Nothing in it grants Live access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessCertification"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","person_session_missing"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["business_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveBusinessCertification"},"post":{"operationId":"startBusinessCertification","summary":"Prepare a business certification process","tags":["business"],"description":"Creates the certification environment binding and a durable 15-step DGII process. external_software is available to businesses using Timbro; own_software requires operator-verified eligibility. Software version is assigned by Timbro.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessCertificationStartRequest"}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x20-\\x7e]+$"},"in":"header","name":"idempotency-key","required":true}],"security":[{"adminKey":[]}],"responses":{"200":{"description":"Durable certification preparation and user-reported DGII progress for the authenticated business. Nothing in it grants Live access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessCertification"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"201":{"description":"Durable certification preparation and user-reported DGII progress for the authenticated business. Nothing in it grants Live access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessCertification"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","person_session_missing"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["business_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["idempotency_key_reused","idempotency_request_in_progress","idempotency_key_expired","business_certification_path_unavailable","business_certification_requirements_unmet"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["business_fiscal_setup_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"required","x-timbro-retry":"retry_with_same_idempotency_key","x-timbro-recovery":"retrieveBusinessCertification"}},"/v1/business/certification/evidence":{"post":{"operationId":"submitBusinessCertificationEvidence","summary":"Report an outcome for a DGII certification step","tags":["business"],"description":"Appends a user-reported outcome for the current step. A reported approval makes the next step current and stays user-reported; it never grants Live access.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessCertificationEvidenceRequest"}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x20-\\x7e]+$"},"in":"header","name":"idempotency-key","required":true}],"security":[{"adminKey":[]}],"responses":{"200":{"description":"Durable certification preparation and user-reported DGII progress for the authenticated business. Nothing in it grants Live access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessCertification"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","person_session_missing"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["business_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["idempotency_key_reused","idempotency_request_in_progress","idempotency_key_expired","business_certification_requirements_unmet","business_certification_revision_conflict"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"required","x-timbro-retry":"retry_with_same_idempotency_key","x-timbro-recovery":"retrieveBusinessCertification"}},"/v1/business/certification/progress":{"post":{"operationId":"declareBusinessCertificationProgress","summary":"Declare the DGII step a business certification is on","tags":["business"],"description":"Records the step the business's DGII certification portal shows, for a business that started certification elsewhere or that DGII sent back to an earlier step. Earlier steps then count as done for sequencing and stay user-reported. The declaration is not evidence, verifies no step, and never grants Live access. Only a person can read DGII's portal; an agent passes the step that person reports.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessCertificationProgressRequest"}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x20-\\x7e]+$"},"in":"header","name":"idempotency-key","required":true}],"security":[{"adminKey":[]}],"responses":{"200":{"description":"Durable certification preparation and user-reported DGII progress for the authenticated business. Nothing in it grants Live access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessCertification"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","person_session_missing"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["business_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["idempotency_key_reused","idempotency_request_in_progress","idempotency_key_expired","business_certification_requirements_unmet","business_certification_revision_conflict"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"required","x-timbro-retry":"retry_with_same_idempotency_key","x-timbro-recovery":"retrieveBusinessCertification"}},"/v1/business/certification/test-sets/current":{"get":{"operationId":"retrieveBusinessCertificationTestSet","summary":"Retrieve the current certification workbook","tags":["business"],"description":"Returns the latest workbook retained for the authenticated business's current DGII certification attempt, or null before an upload. Name a `kind` to read the latest step 2 (`ecf`) or step 3 (`acecf`) workbook. Retention is inert and does not run cases or advance DGII progress.","parameters":[{"schema":{"anyOf":[{"type":"string","const":"ecf"},{"type":"string","const":"acecf"}]},"in":"query","name":"kind","required":false}],"security":[{"secretKey":[]},{"adminKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentCertificationTestSet"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","person_session_missing"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["business_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["business_certification_requirements_unmet","certification_environment_required"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["business_certification_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveBusinessCertificationTestSet"}},"/v1/business/certification/test-sets":{"post":{"operationId":"uploadBusinessCertificationTestSet","summary":"Upload a certification workbook","tags":["business"],"description":"Retains the original workbook for review in the current DGII certification attempt: the step 2 e-CF data set (`ecf`) or the step 3 commercial approvals (`acecf`). Uploading does not execute test cases, submit fiscal documents, or advance certification.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificationTestSetUploadRequest"}}}},"parameters":[{"schema":{"type":"string","maxLength":255,"minLength":16,"pattern":"^[A-Za-z0-9._:-]+$"},"in":"header","name":"idempotency-key","required":true}],"security":[{"adminKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificationTestSetResource"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificationTestSetResource"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","person_session_missing"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["business_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["business_certification_requirements_unmet","certification_environment_required","idempotency_key_conflict"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large","request_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"422":{"description":"The request is well-formed but cannot be carried out.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":422},"code":{"type":"string","enum":["certification_test_set_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["business_certification_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"required","x-timbro-retry":"retry_with_same_idempotency_key","x-timbro-recovery":"retrieveBusinessCertificationTestSet"}},"/v1/business/certification/test-runs":{"post":{"operationId":"startBusinessCertificationTestRun","summary":"Run a certification workbook","tags":["business"],"description":"Signs each case of the retained workbook (`kind` `ecf` for DGII step 2, `acecf` for step 3) with the business's signing certificate in Timbro's custody and sends it to DGII, in workbook order, stopping at the first rejection. Call it only while the business certification lists the `run_test_set` action; otherwise it answers `business_certification_unavailable`. It needs the representative's confirmation of the statement, recorded with the actor, time, and statement hash before Timbro is asked; only a person or an admin key can confirm, not an agent. A retained workbook of that kind must exist, or it answers `business_certification_test_set_required`. A retry with the same Idempotency-Key and body returns the same run; a new run needs a new confirmation and key. A run is evidence for the business and the team, not a DGII decision: it never changes a step's status. Read the outcome with `retrieveBusinessCertificationTestRun`.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessCertificationTestRunRequest"}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x20-\\x7e]+$"},"in":"header","name":"idempotency-key","required":true}],"security":[{"adminKey":[]}],"responses":{"200":{"description":"One run of a retained DGII test workbook. Timbro signs each case with the business's custodied certificate and sends it to DGII in workbook order, and stops at the first rejection. `refused` means the workbook could not be built into documents and nothing was sent; `refusal` names the sheet, row, and column, never the cell text. `consumerInvoices` lists the signed consumer invoices (E32) to upload in DGII's portal box for step 2, and is empty for `acecf`. A run is evidence, not a DGII decision: it never changes a step's status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessCertificationTestRun"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"201":{"description":"One run of a retained DGII test workbook. Timbro signs each case with the business's custodied certificate and sends it to DGII in workbook order, and stops at the first rejection. `refused` means the workbook could not be built into documents and nothing was sent; `refusal` names the sheet, row, and column, never the cell text. `consumerInvoices` lists the signed consumer invoices (E32) to upload in DGII's portal box for step 2, and is empty for `acecf`. A run is evidence, not a DGII decision: it never changes a step's status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessCertificationTestRun"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","person_session_missing"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["business_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["idempotency_key_reused","idempotency_key_conflict","business_certification_requirements_unmet","business_certification_test_set_required","business_certification_test_run_in_progress","business_certification_test_set_changed","certification_environment_required"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["business_certification_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"required","x-timbro-retry":"retry_with_same_idempotency_key","x-timbro-recovery":"retrieveBusinessCertificationTestRun"}},"/v1/business/certification/test-runs/current":{"get":{"operationId":"retrieveBusinessCertificationTestRun","summary":"Retrieve the latest certification test run","tags":["business"],"description":"Returns the latest run of the step 2 (`ecf`) or step 3 (`acecf`) workbook for the authenticated business's current certification attempt, or null before a run. While a run is `running`, read again. When a run is `rejected`, DGII's message names the case's workbook row and e-NCF, and Timbro's team is told once for that run.","parameters":[{"schema":{"anyOf":[{"type":"string","const":"ecf"},{"type":"string","const":"acecf"}]},"in":"query","name":"kind","required":true}],"security":[{"secretKey":[]},{"adminKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentBusinessCertificationTestRun"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","person_session_missing"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["business_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["business_certification_requirements_unmet"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["business_certification_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveBusinessCertificationTestRun"}},"/v1/business/certification/test-runs/{runId}/consumer-invoices/{eNcf}":{"get":{"operationId":"downloadBusinessCertificationConsumerInvoice","summary":"Download a consumer invoice a test run kept","tags":["business"],"description":"Returns the signed full XML of one consumer invoice (E32) that a step 2 run summarized, as an attachment, for upload in DGII's portal box for step 2. The run lists them as `consumerInvoices`.","parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"runId","required":true},{"schema":{"type":"string","pattern":"^E32[0-9]{10}$"},"in":"path","name":"eNcf","required":true}],"security":[{"secretKey":[]},{"adminKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/xml":{"schema":{"type":"string","format":"binary"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"timbro-file-sha256":{"$ref":"#/components/headers/TimbroFileSha256"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","person_session_missing"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["business_not_found","business_certification_test_run_document_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["business_certification_requirements_unmet","certification_environment_required"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["business_certification_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_artifact","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveBusinessCertificationTestRun"}},"/v1/business/certification/portal-documents/sign":{"post":{"operationId":"signBusinessCertificationPortalDocument","summary":"Sign a DGII certification portal document","tags":["business"],"description":"Signs the postulation (DGII step 1) or the Declaración Jurada (step 13) that DGII's certification portal generated, with the business's signing certificate in Timbro's custody, and returns the signed file for upload in DGII's portal. Timbro never submits it. Call it only while the business certification lists the `sign_portal_document` action; otherwise it answers `business_certification_unavailable`. Each signature needs the representative's confirmation of the statement for that one document, recorded with the actor, time, document and signed hashes, and certificate. Only those two documents are signed: a Declaración Jurada must carry a text DGII published, compared after Unicode NFC normalization with whitespace runs collapsed, and a postulation must name the business's RNC. Anything else is refused before the confirmation is recorded. The signed file keeps every element, attribute, and character of text of the submitted one; DGII verifies without the whitespace between tags, so it is removed. Timbro cannot check that the certificate belongs to the representative DGII has registered; DGII checks that when the file is uploaded. A retry with the same Idempotency-Key and body returns the same signed bytes with `Idempotent-Replayed: true`; a new confirmation needs a new key.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessCertificationPortalDocumentSigningRequest"}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x20-\\x7e]+$"},"in":"header","name":"idempotency-key","required":true}],"security":[{"adminKey":[]}],"responses":{"200":{"description":"A DGII certification portal document signed with the business's custodied certificate, with the confirmation recorded for it. Timbro does not submit it to DGII.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessCertificationPortalDocumentSignature"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","person_session_missing"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["business_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["idempotency_key_reused","business_certification_requirements_unmet","business_certification_certificate_required"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"422":{"description":"The request is well-formed but cannot be carried out.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":422},"code":{"type":"string","enum":["business_certification_portal_document_unsupported","business_certification_portal_document_taxpayer_mismatch","business_certification_portal_document_confirmation_expired"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["business_certification_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"portal_document_signature","x-timbro-idempotency":"required","x-timbro-retry":"retry_with_same_idempotency_key","x-timbro-recovery":"signBusinessCertificationPortalDocument"}},"/v1/business/configure-invoicing":{"post":{"operationId":"configureInvoicing","summary":"Configure a Timbro invoice environment","tags":["business"],"description":"Creates or replays this tenant's exact sandbox or production Source binding. It does not assert DGII production qualification.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessConfigureInvoicingRequest"}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x20-\\x7e]+$"},"in":"header","name":"idempotency-key","required":true}],"security":[{"adminKey":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessConfigureInvoicingResponse"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","person_session_missing"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["business_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["idempotency_key_reused","idempotency_request_in_progress","idempotency_key_expired","business_fiscal_setup_incomplete"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["business_fiscal_setup_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"required","x-timbro-retry":"retry_with_same_idempotency_key","x-timbro-recovery":"retrieveBusiness"}},"/v1/business/import-signing-certificate":{"post":{"operationId":"importSigningCertificate","summary":"Import a signing certificate","tags":["business"],"description":"Hands the business's PKCS#12 archive and its password to Timbro's custody once. Timbro uses the certificate for test, live, and DGII certification invoicing, including an environment the business binds later. When the business already has a certificate, importing a different valid one replaces it in every environment at once; the same certificate is a replay. A certificate from another signer than the one an environment enrolled is refused as `certificate_signer_mismatch`, and an import that collides with another one in progress as `business_certificate_conflict`, which the caller repeats. The import does not assert DGII production qualification.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessSigningCertificateRequest"}}}},"security":[{"adminKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Business"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","person_session_missing"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["business_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["business_certificate_conflict","business_fiscal_setup_incomplete"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"422":{"description":"The request is well-formed but cannot be carried out.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":422},"code":{"type":"string","enum":["certificate_expired","certificate_not_yet_valid","certificate_archive_not_supported","certificate_pkcs12_invalid","certificate_not_supported","certificate_signer_mismatch","certificate_p12_password_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["business_fiscal_setup_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"signing_certificate_import","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveBusiness"}},"/v1/business/record-sequence":{"post":{"operationId":"recordSequence","summary":"Record an e-NCF sequence","tags":["business"],"description":"Records an e-NCF sequence DGII granted the business in its Oficina Virtual, so live invoicing can number e-CF of that type from it. Timbro stores the sequence as recorded and confirms it from DGII's answers, so the request never says it is verified. Recording a sequence again with the same first and last number, or one DGII has not confirmed, replaces it; one DGII confirmed cannot be overlapped. The answer is the business, whose `invoicing.live.documentTypes` shows the type ready or the reason it is not. An integration records sequences with the `sequences:live` scope, which the business approves with live mode.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessSequenceRequest"}}}},"security":[{"adminKey":[]},{"integrationToken":["sequences:live"]}],"responses":{"200":{"description":"The business the credential selects, its capabilities, and the requirements that remain.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Business"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","person_session_missing","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["business_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["business_fiscal_setup_incomplete","sequence_overlap","sequence_conflict"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"422":{"description":"The request is well-formed but cannot be carried out.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":422},"code":{"type":"string","enum":["sequence_numbers_invalid","sequence_expiry_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["business_fiscal_setup_unavailable","integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveBusiness"}},"/v1/business/issue-test-invoice":{"post":{"operationId":"issueTestInvoice","summary":"Issue the test invoice","tags":["business"],"description":"Sends a new TesteCF document when none is processing or accepted and answers 202; otherwise answers 200 with the business unchanged. The server also sends it on its own once the certificate is active.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessTestFiscalDocumentRequest"}}}},"security":[{"adminKey":[]}],"responses":{"200":{"description":"The business the credential selects, its capabilities, and the requirements that remain.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Business"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"202":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Business"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","person_session_missing"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["business_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["business_fiscal_setup_incomplete","business_test_fiscal_document_blocked"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["business_fiscal_setup_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"test_fiscal_document_submission","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveBusiness"}},"/v1/invoices":{"post":{"operationId":"createInvoice","summary":"Issue an Invoice","tags":["invoices"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRequest"}}}},"parameters":[{"schema":{"type":"string","maxLength":255,"minLength":16,"pattern":"^[A-Za-z0-9._:-]+$"},"in":"header","name":"idempotency-key","required":false}],"security":[{"secretKey":[]},{"integrationToken":["invoices:test"]},{"integrationToken":["invoices:live"]}],"x-timbro-api-key-capability":"invoices","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResource"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResource"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed","custody_certificate_malformed","custody_signature_algorithm_unsupported","custody_certificate_trust_profile_unsupported","custody_certificate_chain_untrusted","custody_certificate_purpose_unsupported","source_provider_installation_request_invalid","missing_idempotency_key","invalid_idempotency_key","malformed_json","invalid_request","invoice_original_invalid","invalid_collection_query","invalid_collection_cursor","invalid_replay_scope","webhook_destination_not_allowed","commercial_response_motive_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","unauthenticated","invalid_login","invalid_credential","credential_revoked","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted","insufficient_role","service_role_not_permitted","invitation_email_mismatch","issuer_not_authorized"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["integration_not_connected","email_already_registered","organization_slug_taken","hosted_tenant_conflict","legal_issuer_already_registered","onboarding_legal_issuer_identity_conflict","legal_issuer_profile_incomplete","already_a_member","certificate_custody_binding_conflict","certificate_custody_certificate_not_active","certificate_custody_certificate_version_not_active","source_provider_authorization_required","source_provider_installation_disabled","source_provider_installation_removed","source_provider_scope_insufficient","source_provider_target_access_removed","source_provider_authorization_conflict","source_provider_installation_callback_replayed","integration_creation_conflict","integration_activation_conflict","integration_activation_verification_rejected","certification_environment_required","certification_test_set_required","certification_test_run_in_progress","idempotency_key_conflict","fiscal_number_already_used","sequence_changed","sequence_source_record_conflict","source_version_stale","source_predecessor_conflict","source_history_requires_reconciliation","source_content_conflict","source_action_conflict","source_command_conflict","invoice_reference_conflict","invoice_totals_mismatch","printed_representation_profile_conflict","source_record_already_fiscalized","source_operation_pending","source_outcome_unknown","authority_rejected_replacement","fiscal_operation_not_in_intervention","intervention_not_resumable","intervention_not_closable","correction_target_unsettled","correction_target_closed","invoice_receipt_not_ready","fiscal_delivery_outcome_conflict","webhook_endpoint_registration_conflict","webhook_endpoint_suspended","webhook_endpoint_deleted","commercial_response_decision_conflict","receiving_issuer_held_elsewhere","production_reception_certificate_required","production_reception_integration_required","production_reception_already_filed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large","request_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"422":{"description":"The request is well-formed but cannot be carried out.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":422},"code":{"type":"string","enum":["invalid_fiscal_identity","invalid_certificate_custody_signer_identity","certificate_p12_password_invalid","custody_certificate_not_yet_valid","custody_certificate_expired","custody_p12_work_limit_exceeded","certificate_custody_environment_signer_mismatch","delegated_sequence_verifier_forbidden","certification_test_set_invalid","document_type_not_enabled","fiscal_intent_rejected","unsupported_printed_representation_profile","affected_fiscal_operation_unsupported","fiscal_issuance_blocked","unsigned_document_schema_invalid","signed_document_schema_invalid","portal_document_unsupported","portal_document_taxpayer_mismatch","portal_document_consent_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error","fiscal_artifact_unverified"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["source_provider_unavailable","source_provider_throttled","source_provider_outcome_unknown","fiscal_artifact_unavailable","invoice_receipt_unavailable","fiscal_delivery_unavailable","custody_unavailable","integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"fiscal_acceptance","x-timbro-idempotency":"optional","x-timbro-retry":"retry_with_same_idempotency_key","x-timbro-recovery":"listInvoices"},"get":{"operationId":"listInvoices","summary":"List Invoices","tags":["invoices"],"parameters":[{"schema":{"type":"string","maxLength":2048},"in":"query","name":"cursor","required":false},{"schema":{"type":"integer","format":"int32","default":20,"maximum":100,"minimum":1},"in":"query","name":"limit","required":false},{"schema":{"type":"string","maxLength":128,"minLength":1},"in":"query","name":"invoiceReference","required":false},{"schema":{"title":"InvoiceType","type":"string","enum":["E31","E32","E33","E34","E41","E43","E44","E45","E46","E47"]},"in":"query","name":"type","required":false}],"security":[{"secretKey":[]},{"integrationToken":["invoices:test"]},{"integrationToken":["invoices:live"]}],"x-timbro-api-key-capability":"invoices","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicePage"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","custody_certificate_malformed","custody_signature_algorithm_unsupported","custody_certificate_trust_profile_unsupported","custody_certificate_chain_untrusted","custody_certificate_purpose_unsupported","source_provider_installation_request_invalid","missing_idempotency_key","invalid_idempotency_key","malformed_json","invalid_request","invoice_original_invalid","invalid_collection_query","invalid_collection_cursor","invalid_replay_scope","webhook_destination_not_allowed","commercial_response_motive_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","unauthenticated","invalid_login","invalid_credential","credential_revoked","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["integration_not_connected","email_already_registered","organization_slug_taken","hosted_tenant_conflict","legal_issuer_already_registered","onboarding_legal_issuer_identity_conflict","legal_issuer_profile_incomplete","already_a_member","certificate_custody_binding_conflict","certificate_custody_certificate_not_active","certificate_custody_certificate_version_not_active","source_provider_authorization_required","source_provider_installation_disabled","source_provider_installation_removed","source_provider_scope_insufficient","source_provider_target_access_removed","source_provider_authorization_conflict","source_provider_installation_callback_replayed","integration_creation_conflict","integration_activation_conflict","integration_activation_verification_rejected","certification_environment_required","certification_test_set_required","certification_test_run_in_progress","idempotency_key_conflict","fiscal_number_already_used","sequence_changed","sequence_source_record_conflict","source_version_stale","source_predecessor_conflict","source_history_requires_reconciliation","source_content_conflict","source_action_conflict","source_command_conflict","invoice_reference_conflict","invoice_totals_mismatch","printed_representation_profile_conflict","source_record_already_fiscalized","source_operation_pending","source_outcome_unknown","authority_rejected_replacement","fiscal_operation_not_in_intervention","intervention_not_resumable","intervention_not_closable","correction_target_unsettled","correction_target_closed","invoice_receipt_not_ready","fiscal_delivery_outcome_conflict","webhook_endpoint_registration_conflict","webhook_endpoint_suspended","webhook_endpoint_deleted","commercial_response_decision_conflict","receiving_issuer_held_elsewhere","production_reception_certificate_required","production_reception_integration_required","production_reception_already_filed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error","fiscal_artifact_unverified"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"listInvoices"}},"/v1/invoices/{invoiceId}/replacements":{"post":{"operationId":"replaceInvoice","summary":"Replace a rejected Invoice","tags":["invoices"],"description":"Creates one immutable successor for an authority-rejected Invoice after its required authorization. Retry the same request and invoiceReference to recover that successor. Local validation refusals have no Invoice ID; correct their input and retry creation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRequest"}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"invoiceId","required":true}],"security":[{"secretKey":[]},{"integrationToken":["invoices:test"]},{"integrationToken":["invoices:live"]}],"x-timbro-api-key-capability":"invoices","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResource"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResource"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed","custody_certificate_malformed","custody_signature_algorithm_unsupported","custody_certificate_trust_profile_unsupported","custody_certificate_chain_untrusted","custody_certificate_purpose_unsupported","source_provider_installation_request_invalid","missing_idempotency_key","invalid_idempotency_key","malformed_json","invalid_request","invoice_original_invalid","invalid_collection_query","invalid_collection_cursor","invalid_replay_scope","webhook_destination_not_allowed","commercial_response_motive_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","unauthenticated","invalid_login","invalid_credential","credential_revoked","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted","insufficient_role","service_role_not_permitted","invitation_email_mismatch","issuer_not_authorized"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["organization_not_found","legal_issuer_not_found","invitation_invalid","certificate_custody_binding_not_found","integration_not_found","source_provider_authorization_not_found","certification_test_run_document_not_found","fiscal_operation_not_found","invoice_not_found","fiscal_artifact_not_found","invoice_receipt_not_found","fiscal_delivery_not_found","webhook_endpoint_not_found","webhook_event_not_found","received_document_not_found","receiving_issuer_not_found","route_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["integration_not_connected","email_already_registered","organization_slug_taken","hosted_tenant_conflict","legal_issuer_already_registered","onboarding_legal_issuer_identity_conflict","legal_issuer_profile_incomplete","already_a_member","certificate_custody_binding_conflict","certificate_custody_certificate_not_active","certificate_custody_certificate_version_not_active","source_provider_authorization_required","source_provider_installation_disabled","source_provider_installation_removed","source_provider_scope_insufficient","source_provider_target_access_removed","source_provider_authorization_conflict","source_provider_installation_callback_replayed","integration_creation_conflict","integration_activation_conflict","integration_activation_verification_rejected","certification_environment_required","certification_test_set_required","certification_test_run_in_progress","idempotency_key_conflict","fiscal_number_already_used","sequence_changed","sequence_source_record_conflict","source_version_stale","source_predecessor_conflict","source_history_requires_reconciliation","source_content_conflict","source_action_conflict","source_command_conflict","invoice_reference_conflict","invoice_totals_mismatch","printed_representation_profile_conflict","source_record_already_fiscalized","source_operation_pending","source_outcome_unknown","authority_rejected_replacement","fiscal_operation_not_in_intervention","intervention_not_resumable","intervention_not_closable","correction_target_unsettled","correction_target_closed","invoice_receipt_not_ready","fiscal_delivery_outcome_conflict","webhook_endpoint_registration_conflict","webhook_endpoint_suspended","webhook_endpoint_deleted","commercial_response_decision_conflict","receiving_issuer_held_elsewhere","production_reception_certificate_required","production_reception_integration_required","production_reception_already_filed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large","request_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"422":{"description":"The request is well-formed but cannot be carried out.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":422},"code":{"type":"string","enum":["invalid_fiscal_identity","invalid_certificate_custody_signer_identity","certificate_p12_password_invalid","custody_certificate_not_yet_valid","custody_certificate_expired","custody_p12_work_limit_exceeded","certificate_custody_environment_signer_mismatch","delegated_sequence_verifier_forbidden","certification_test_set_invalid","document_type_not_enabled","fiscal_intent_rejected","unsupported_printed_representation_profile","affected_fiscal_operation_unsupported","fiscal_issuance_blocked","unsigned_document_schema_invalid","signed_document_schema_invalid","portal_document_unsupported","portal_document_taxpayer_mismatch","portal_document_consent_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error","fiscal_artifact_unverified"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["source_provider_unavailable","source_provider_throttled","source_provider_outcome_unknown","fiscal_artifact_unavailable","invoice_receipt_unavailable","fiscal_delivery_unavailable","custody_unavailable","integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"fiscal_acceptance","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveInvoice"}},"/v1/invoices/preview":{"post":{"operationId":"previewInvoice","summary":"Preview an Invoice without issuing it","tags":["invoices"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRequest"}}}},"security":[{"secretKey":[]},{"integrationToken":["invoices:test"]},{"integrationToken":["invoices:live"]}],"x-timbro-api-key-capability":"invoices","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoicePreview"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed","custody_certificate_malformed","custody_signature_algorithm_unsupported","custody_certificate_trust_profile_unsupported","custody_certificate_chain_untrusted","custody_certificate_purpose_unsupported","source_provider_installation_request_invalid","missing_idempotency_key","invalid_idempotency_key","malformed_json","invalid_request","invoice_original_invalid","invalid_collection_query","invalid_collection_cursor","invalid_replay_scope","webhook_destination_not_allowed","commercial_response_motive_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","unauthenticated","invalid_login","invalid_credential","credential_revoked","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["integration_not_connected","email_already_registered","organization_slug_taken","hosted_tenant_conflict","legal_issuer_already_registered","onboarding_legal_issuer_identity_conflict","legal_issuer_profile_incomplete","already_a_member","certificate_custody_binding_conflict","certificate_custody_certificate_not_active","certificate_custody_certificate_version_not_active","source_provider_authorization_required","source_provider_installation_disabled","source_provider_installation_removed","source_provider_scope_insufficient","source_provider_target_access_removed","source_provider_authorization_conflict","source_provider_installation_callback_replayed","integration_creation_conflict","integration_activation_conflict","integration_activation_verification_rejected","certification_environment_required","certification_test_set_required","certification_test_run_in_progress","idempotency_key_conflict","fiscal_number_already_used","sequence_changed","sequence_source_record_conflict","source_version_stale","source_predecessor_conflict","source_history_requires_reconciliation","source_content_conflict","source_action_conflict","source_command_conflict","invoice_reference_conflict","invoice_totals_mismatch","printed_representation_profile_conflict","source_record_already_fiscalized","source_operation_pending","source_outcome_unknown","authority_rejected_replacement","fiscal_operation_not_in_intervention","intervention_not_resumable","intervention_not_closable","correction_target_unsettled","correction_target_closed","invoice_receipt_not_ready","fiscal_delivery_outcome_conflict","webhook_endpoint_registration_conflict","webhook_endpoint_suspended","webhook_endpoint_deleted","commercial_response_decision_conflict","receiving_issuer_held_elsewhere","production_reception_certificate_required","production_reception_integration_required","production_reception_already_filed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large","request_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error","fiscal_artifact_unverified"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"previewInvoice"}},"/v1/invoices/{invoiceId}":{"get":{"operationId":"retrieveInvoice","summary":"Retrieve an Invoice","tags":["invoices"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"invoiceId","required":true}],"security":[{"secretKey":[]},{"integrationToken":["invoices:test"]},{"integrationToken":["invoices:live"]}],"x-timbro-api-key-capability":"invoices","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResource"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","custody_certificate_malformed","custody_signature_algorithm_unsupported","custody_certificate_trust_profile_unsupported","custody_certificate_chain_untrusted","custody_certificate_purpose_unsupported","source_provider_installation_request_invalid","missing_idempotency_key","invalid_idempotency_key","malformed_json","invalid_request","invoice_original_invalid","invalid_collection_query","invalid_collection_cursor","invalid_replay_scope","webhook_destination_not_allowed","commercial_response_motive_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","unauthenticated","invalid_login","invalid_credential","credential_revoked","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["organization_not_found","legal_issuer_not_found","invitation_invalid","certificate_custody_binding_not_found","integration_not_found","source_provider_authorization_not_found","certification_test_run_document_not_found","fiscal_operation_not_found","invoice_not_found","fiscal_artifact_not_found","invoice_receipt_not_found","fiscal_delivery_not_found","webhook_endpoint_not_found","webhook_event_not_found","received_document_not_found","receiving_issuer_not_found","route_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["integration_not_connected","email_already_registered","organization_slug_taken","hosted_tenant_conflict","legal_issuer_already_registered","onboarding_legal_issuer_identity_conflict","legal_issuer_profile_incomplete","already_a_member","certificate_custody_binding_conflict","certificate_custody_certificate_not_active","certificate_custody_certificate_version_not_active","source_provider_authorization_required","source_provider_installation_disabled","source_provider_installation_removed","source_provider_scope_insufficient","source_provider_target_access_removed","source_provider_authorization_conflict","source_provider_installation_callback_replayed","integration_creation_conflict","integration_activation_conflict","integration_activation_verification_rejected","certification_environment_required","certification_test_set_required","certification_test_run_in_progress","idempotency_key_conflict","fiscal_number_already_used","sequence_changed","sequence_source_record_conflict","source_version_stale","source_predecessor_conflict","source_history_requires_reconciliation","source_content_conflict","source_action_conflict","source_command_conflict","invoice_reference_conflict","invoice_totals_mismatch","printed_representation_profile_conflict","source_record_already_fiscalized","source_operation_pending","source_outcome_unknown","authority_rejected_replacement","fiscal_operation_not_in_intervention","intervention_not_resumable","intervention_not_closable","correction_target_unsettled","correction_target_closed","invoice_receipt_not_ready","fiscal_delivery_outcome_conflict","webhook_endpoint_registration_conflict","webhook_endpoint_suspended","webhook_endpoint_deleted","commercial_response_decision_conflict","receiving_issuer_held_elsewhere","production_reception_certificate_required","production_reception_integration_required","production_reception_already_filed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error","fiscal_artifact_unverified"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveInvoice"}},"/v1/invoices/{invoiceId}/deliveries":{"post":{"operationId":"createInvoiceDelivery","summary":"Email an Invoice to its buyer","tags":["invoices"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInvoiceDeliveryRequest"}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"invoiceId","required":true},{"schema":{"type":"string","minLength":16,"maxLength":255,"pattern":"^[A-Za-z0-9._:-]+$"},"in":"header","name":"idempotency-key","required":true}],"security":[{"secretKey":[]},{"integrationToken":["invoices:test"]},{"integrationToken":["invoices:live"]}],"x-timbro-api-key-capability":"invoices","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDeliveryResource"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDeliveryResource"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed","custody_certificate_malformed","custody_signature_algorithm_unsupported","custody_certificate_trust_profile_unsupported","custody_certificate_chain_untrusted","custody_certificate_purpose_unsupported","source_provider_installation_request_invalid","missing_idempotency_key","invalid_idempotency_key","malformed_json","invalid_request","invoice_original_invalid","invalid_collection_query","invalid_collection_cursor","invalid_replay_scope","webhook_destination_not_allowed","commercial_response_motive_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","unauthenticated","invalid_login","invalid_credential","credential_revoked","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted","insufficient_role","service_role_not_permitted","invitation_email_mismatch","issuer_not_authorized"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["organization_not_found","legal_issuer_not_found","invitation_invalid","certificate_custody_binding_not_found","integration_not_found","source_provider_authorization_not_found","certification_test_run_document_not_found","fiscal_operation_not_found","invoice_not_found","fiscal_artifact_not_found","invoice_receipt_not_found","fiscal_delivery_not_found","webhook_endpoint_not_found","webhook_event_not_found","received_document_not_found","receiving_issuer_not_found","route_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["integration_not_connected","email_already_registered","organization_slug_taken","hosted_tenant_conflict","legal_issuer_already_registered","onboarding_legal_issuer_identity_conflict","legal_issuer_profile_incomplete","already_a_member","certificate_custody_binding_conflict","certificate_custody_certificate_not_active","certificate_custody_certificate_version_not_active","source_provider_authorization_required","source_provider_installation_disabled","source_provider_installation_removed","source_provider_scope_insufficient","source_provider_target_access_removed","source_provider_authorization_conflict","source_provider_installation_callback_replayed","integration_creation_conflict","integration_activation_conflict","integration_activation_verification_rejected","certification_environment_required","certification_test_set_required","certification_test_run_in_progress","idempotency_key_conflict","fiscal_number_already_used","sequence_changed","sequence_source_record_conflict","source_version_stale","source_predecessor_conflict","source_history_requires_reconciliation","source_content_conflict","source_action_conflict","source_command_conflict","invoice_reference_conflict","invoice_totals_mismatch","printed_representation_profile_conflict","source_record_already_fiscalized","source_operation_pending","source_outcome_unknown","authority_rejected_replacement","fiscal_operation_not_in_intervention","intervention_not_resumable","intervention_not_closable","correction_target_unsettled","correction_target_closed","invoice_receipt_not_ready","fiscal_delivery_outcome_conflict","webhook_endpoint_registration_conflict","webhook_endpoint_suspended","webhook_endpoint_deleted","commercial_response_decision_conflict","receiving_issuer_held_elsewhere","production_reception_certificate_required","production_reception_integration_required","production_reception_already_filed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large","request_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error","fiscal_artifact_unverified"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["source_provider_unavailable","source_provider_throttled","source_provider_outcome_unknown","fiscal_artifact_unavailable","invoice_receipt_unavailable","fiscal_delivery_unavailable","custody_unavailable","integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"fiscal_delivery_command","x-timbro-idempotency":"required","x-timbro-retry":"retry_with_same_idempotency_key","x-timbro-recovery":"retrieveInvoiceDelivery"}},"/v1/invoices/{invoiceId}/deliveries/{deliveryId}":{"get":{"operationId":"retrieveInvoiceDelivery","summary":"Retrieve an Invoice delivery","tags":["invoices"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"invoiceId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"deliveryId","required":true}],"security":[{"secretKey":[]},{"integrationToken":["invoices:test"]},{"integrationToken":["invoices:live"]}],"x-timbro-api-key-capability":"invoices","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceDeliveryResource"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","unauthenticated","invalid_login","invalid_credential","credential_revoked","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted","insufficient_role","service_role_not_permitted","invitation_email_mismatch","issuer_not_authorized"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["organization_not_found","legal_issuer_not_found","invitation_invalid","certificate_custody_binding_not_found","integration_not_found","source_provider_authorization_not_found","certification_test_run_document_not_found","fiscal_operation_not_found","invoice_not_found","fiscal_artifact_not_found","invoice_receipt_not_found","fiscal_delivery_not_found","webhook_endpoint_not_found","webhook_event_not_found","received_document_not_found","receiving_issuer_not_found","route_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["integration_not_connected","email_already_registered","organization_slug_taken","hosted_tenant_conflict","legal_issuer_already_registered","onboarding_legal_issuer_identity_conflict","legal_issuer_profile_incomplete","already_a_member","certificate_custody_binding_conflict","certificate_custody_certificate_not_active","certificate_custody_certificate_version_not_active","source_provider_authorization_required","source_provider_installation_disabled","source_provider_installation_removed","source_provider_scope_insufficient","source_provider_target_access_removed","source_provider_authorization_conflict","source_provider_installation_callback_replayed","integration_creation_conflict","integration_activation_conflict","integration_activation_verification_rejected","certification_environment_required","certification_test_set_required","certification_test_run_in_progress","idempotency_key_conflict","fiscal_number_already_used","sequence_changed","sequence_source_record_conflict","source_version_stale","source_predecessor_conflict","source_history_requires_reconciliation","source_content_conflict","source_action_conflict","source_command_conflict","invoice_reference_conflict","invoice_totals_mismatch","printed_representation_profile_conflict","source_record_already_fiscalized","source_operation_pending","source_outcome_unknown","authority_rejected_replacement","fiscal_operation_not_in_intervention","intervention_not_resumable","intervention_not_closable","correction_target_unsettled","correction_target_closed","invoice_receipt_not_ready","fiscal_delivery_outcome_conflict","webhook_endpoint_registration_conflict","webhook_endpoint_suspended","webhook_endpoint_deleted","commercial_response_decision_conflict","receiving_issuer_held_elsewhere","production_reception_certificate_required","production_reception_integration_required","production_reception_already_filed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error","fiscal_artifact_unverified"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["source_provider_unavailable","source_provider_throttled","source_provider_outcome_unknown","fiscal_artifact_unavailable","invoice_receipt_unavailable","fiscal_delivery_unavailable","custody_unavailable","integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveInvoiceDelivery"}},"/v1/invoices/{invoiceId}/receipt-access":{"post":{"operationId":"shareInvoiceReceipt","summary":"Share an accepted Invoice's receipt","tags":["invoices"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"invoiceId","required":true}],"security":[{"secretKey":[]},{"integrationToken":["invoices:test"]},{"integrationToken":["invoices:live"]}],"x-timbro-api-key-capability":"invoices","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceReceiptAccess"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","custody_certificate_malformed","custody_signature_algorithm_unsupported","custody_certificate_trust_profile_unsupported","custody_certificate_chain_untrusted","custody_certificate_purpose_unsupported","source_provider_installation_request_invalid","missing_idempotency_key","invalid_idempotency_key","malformed_json","invalid_request","invoice_original_invalid","invalid_collection_query","invalid_collection_cursor","invalid_replay_scope","webhook_destination_not_allowed","commercial_response_motive_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","unauthenticated","invalid_login","invalid_credential","credential_revoked","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted","insufficient_role","service_role_not_permitted","invitation_email_mismatch","issuer_not_authorized"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["organization_not_found","legal_issuer_not_found","invitation_invalid","certificate_custody_binding_not_found","integration_not_found","source_provider_authorization_not_found","certification_test_run_document_not_found","fiscal_operation_not_found","invoice_not_found","fiscal_artifact_not_found","invoice_receipt_not_found","fiscal_delivery_not_found","webhook_endpoint_not_found","webhook_event_not_found","received_document_not_found","receiving_issuer_not_found","route_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["integration_not_connected","email_already_registered","organization_slug_taken","hosted_tenant_conflict","legal_issuer_already_registered","onboarding_legal_issuer_identity_conflict","legal_issuer_profile_incomplete","already_a_member","certificate_custody_binding_conflict","certificate_custody_certificate_not_active","certificate_custody_certificate_version_not_active","source_provider_authorization_required","source_provider_installation_disabled","source_provider_installation_removed","source_provider_scope_insufficient","source_provider_target_access_removed","source_provider_authorization_conflict","source_provider_installation_callback_replayed","integration_creation_conflict","integration_activation_conflict","integration_activation_verification_rejected","certification_environment_required","certification_test_set_required","certification_test_run_in_progress","idempotency_key_conflict","fiscal_number_already_used","sequence_changed","sequence_source_record_conflict","source_version_stale","source_predecessor_conflict","source_history_requires_reconciliation","source_content_conflict","source_action_conflict","source_command_conflict","invoice_reference_conflict","invoice_totals_mismatch","printed_representation_profile_conflict","source_record_already_fiscalized","source_operation_pending","source_outcome_unknown","authority_rejected_replacement","fiscal_operation_not_in_intervention","intervention_not_resumable","intervention_not_closable","correction_target_unsettled","correction_target_closed","invoice_receipt_not_ready","fiscal_delivery_outcome_conflict","webhook_endpoint_registration_conflict","webhook_endpoint_suspended","webhook_endpoint_deleted","commercial_response_decision_conflict","receiving_issuer_held_elsewhere","production_reception_certificate_required","production_reception_integration_required","production_reception_already_filed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error","fiscal_artifact_unverified"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["source_provider_unavailable","source_provider_throttled","source_provider_outcome_unknown","fiscal_artifact_unavailable","invoice_receipt_unavailable","fiscal_delivery_unavailable","custody_unavailable","integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveInvoice"}},"/v1/invoice-receipts/{receiptId}":{"get":{"operationId":"retrieveInvoiceReceipt","summary":"Retrieve a shared Invoice receipt","tags":["invoices"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"receiptId","required":true}],"security":[{"invoiceReceiptAccess":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceReceipt"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["organization_not_found","legal_issuer_not_found","invitation_invalid","certificate_custody_binding_not_found","integration_not_found","source_provider_authorization_not_found","certification_test_run_document_not_found","fiscal_operation_not_found","invoice_not_found","fiscal_artifact_not_found","invoice_receipt_not_found","fiscal_delivery_not_found","webhook_endpoint_not_found","webhook_event_not_found","received_document_not_found","receiving_issuer_not_found","route_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["integration_not_connected"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error","fiscal_artifact_unverified"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveInvoiceReceipt"}},"/v1/invoice-receipts/{receiptId}/pdf":{"get":{"operationId":"downloadInvoiceReceiptPdf","summary":"Download a shared Invoice receipt's PDF","tags":["invoices"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"receiptId","required":true}],"security":[{"invoiceReceiptAccess":[]}],"responses":{"200":{"description":"The receipt's verified PDF.","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"timbro-file-sha256":{"$ref":"#/components/headers/TimbroFileSha256"},"timbro-invoice-id":{"$ref":"#/components/headers/TimbroInvoiceId"},"timbro-file-created-at":{"$ref":"#/components/headers/TimbroFileCreatedAt"},"timbro-pdf-sha256":{"$ref":"#/components/headers/TimbroPdfSha256"},"timbro-encf":{"$ref":"#/components/headers/TimbroEncf"},"timbro-invoice-type":{"$ref":"#/components/headers/TimbroInvoiceType"},"timbro-pdf-layout":{"$ref":"#/components/headers/TimbroPdfLayout"},"timbro-page-count":{"$ref":"#/components/headers/TimbroPageCount"},"timbro-signed-source-sha256":{"$ref":"#/components/headers/TimbroSignedSourceSha256"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["organization_not_found","legal_issuer_not_found","invitation_invalid","certificate_custody_binding_not_found","integration_not_found","source_provider_authorization_not_found","certification_test_run_document_not_found","fiscal_operation_not_found","invoice_not_found","fiscal_artifact_not_found","invoice_receipt_not_found","fiscal_delivery_not_found","webhook_endpoint_not_found","webhook_event_not_found","received_document_not_found","receiving_issuer_not_found","route_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["integration_not_connected"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error","fiscal_artifact_unverified"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["source_provider_unavailable","source_provider_throttled","source_provider_outcome_unknown","fiscal_artifact_unavailable","invoice_receipt_unavailable","fiscal_delivery_unavailable","custody_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_artifact","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveInvoiceReceipt"}},"/v1/invoices/{invoiceId}/files/xml":{"get":{"operationId":"downloadInvoiceXml","summary":"Download an Invoice's signed XML","tags":["invoices"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"invoiceId","required":true}],"security":[{"secretKey":[]},{"integrationToken":["invoices:test"]},{"integrationToken":["invoices:live"]}],"x-timbro-api-key-capability":"invoices","responses":{"200":{"description":"The Invoice's retained, signed e-CF XML.","content":{"application/xml":{"schema":{"type":"string","format":"binary"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"timbro-file-sha256":{"$ref":"#/components/headers/TimbroFileSha256"},"timbro-invoice-id":{"$ref":"#/components/headers/TimbroInvoiceId"},"timbro-file-created-at":{"$ref":"#/components/headers/TimbroFileCreatedAt"},"timbro-certificate-sha256":{"$ref":"#/components/headers/TimbroCertificateSha256"},"timbro-security-code":{"$ref":"#/components/headers/TimbroSecurityCode"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","custody_certificate_malformed","custody_signature_algorithm_unsupported","custody_certificate_trust_profile_unsupported","custody_certificate_chain_untrusted","custody_certificate_purpose_unsupported","source_provider_installation_request_invalid","missing_idempotency_key","invalid_idempotency_key","malformed_json","invalid_request","invoice_original_invalid","invalid_collection_query","invalid_collection_cursor","invalid_replay_scope","webhook_destination_not_allowed","commercial_response_motive_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","unauthenticated","invalid_login","invalid_credential","credential_revoked","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["organization_not_found","legal_issuer_not_found","invitation_invalid","certificate_custody_binding_not_found","integration_not_found","source_provider_authorization_not_found","certification_test_run_document_not_found","fiscal_operation_not_found","invoice_not_found","fiscal_artifact_not_found","invoice_receipt_not_found","fiscal_delivery_not_found","webhook_endpoint_not_found","webhook_event_not_found","received_document_not_found","receiving_issuer_not_found","route_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["integration_not_connected","email_already_registered","organization_slug_taken","hosted_tenant_conflict","legal_issuer_already_registered","onboarding_legal_issuer_identity_conflict","legal_issuer_profile_incomplete","already_a_member","certificate_custody_binding_conflict","certificate_custody_certificate_not_active","certificate_custody_certificate_version_not_active","source_provider_authorization_required","source_provider_installation_disabled","source_provider_installation_removed","source_provider_scope_insufficient","source_provider_target_access_removed","source_provider_authorization_conflict","source_provider_installation_callback_replayed","integration_creation_conflict","integration_activation_conflict","integration_activation_verification_rejected","certification_environment_required","certification_test_set_required","certification_test_run_in_progress","idempotency_key_conflict","fiscal_number_already_used","sequence_changed","sequence_source_record_conflict","source_version_stale","source_predecessor_conflict","source_history_requires_reconciliation","source_content_conflict","source_action_conflict","source_command_conflict","invoice_reference_conflict","invoice_totals_mismatch","printed_representation_profile_conflict","source_record_already_fiscalized","source_operation_pending","source_outcome_unknown","authority_rejected_replacement","fiscal_operation_not_in_intervention","intervention_not_resumable","intervention_not_closable","correction_target_unsettled","correction_target_closed","invoice_receipt_not_ready","fiscal_delivery_outcome_conflict","webhook_endpoint_registration_conflict","webhook_endpoint_suspended","webhook_endpoint_deleted","commercial_response_decision_conflict","receiving_issuer_held_elsewhere","production_reception_certificate_required","production_reception_integration_required","production_reception_already_filed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error","fiscal_artifact_unverified"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveInvoice"}},"/v1/invoices/{invoiceId}/files/pdf":{"get":{"operationId":"downloadInvoicePdf","summary":"Download an Invoice's PDF","tags":["invoices"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"invoiceId","required":true}],"security":[{"secretKey":[]},{"integrationToken":["invoices:test"]},{"integrationToken":["invoices:live"]}],"x-timbro-api-key-capability":"invoices","responses":{"200":{"description":"The Invoice's verified printed representation.","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"timbro-file-sha256":{"$ref":"#/components/headers/TimbroFileSha256"},"timbro-invoice-id":{"$ref":"#/components/headers/TimbroInvoiceId"},"timbro-file-created-at":{"$ref":"#/components/headers/TimbroFileCreatedAt"},"timbro-pdf-sha256":{"$ref":"#/components/headers/TimbroPdfSha256"},"timbro-encf":{"$ref":"#/components/headers/TimbroEncf"},"timbro-invoice-type":{"$ref":"#/components/headers/TimbroInvoiceType"},"timbro-pdf-layout":{"$ref":"#/components/headers/TimbroPdfLayout"},"timbro-page-count":{"$ref":"#/components/headers/TimbroPageCount"},"timbro-signed-source-sha256":{"$ref":"#/components/headers/TimbroSignedSourceSha256"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","custody_certificate_malformed","custody_signature_algorithm_unsupported","custody_certificate_trust_profile_unsupported","custody_certificate_chain_untrusted","custody_certificate_purpose_unsupported","source_provider_installation_request_invalid","missing_idempotency_key","invalid_idempotency_key","malformed_json","invalid_request","invoice_original_invalid","invalid_collection_query","invalid_collection_cursor","invalid_replay_scope","webhook_destination_not_allowed","commercial_response_motive_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","unauthenticated","invalid_login","invalid_credential","credential_revoked","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["organization_not_found","legal_issuer_not_found","invitation_invalid","certificate_custody_binding_not_found","integration_not_found","source_provider_authorization_not_found","certification_test_run_document_not_found","fiscal_operation_not_found","invoice_not_found","fiscal_artifact_not_found","invoice_receipt_not_found","fiscal_delivery_not_found","webhook_endpoint_not_found","webhook_event_not_found","received_document_not_found","receiving_issuer_not_found","route_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["integration_not_connected","email_already_registered","organization_slug_taken","hosted_tenant_conflict","legal_issuer_already_registered","onboarding_legal_issuer_identity_conflict","legal_issuer_profile_incomplete","already_a_member","certificate_custody_binding_conflict","certificate_custody_certificate_not_active","certificate_custody_certificate_version_not_active","source_provider_authorization_required","source_provider_installation_disabled","source_provider_installation_removed","source_provider_scope_insufficient","source_provider_target_access_removed","source_provider_authorization_conflict","source_provider_installation_callback_replayed","integration_creation_conflict","integration_activation_conflict","integration_activation_verification_rejected","certification_environment_required","certification_test_set_required","certification_test_run_in_progress","idempotency_key_conflict","fiscal_number_already_used","sequence_changed","sequence_source_record_conflict","source_version_stale","source_predecessor_conflict","source_history_requires_reconciliation","source_content_conflict","source_action_conflict","source_command_conflict","invoice_reference_conflict","invoice_totals_mismatch","printed_representation_profile_conflict","source_record_already_fiscalized","source_operation_pending","source_outcome_unknown","authority_rejected_replacement","fiscal_operation_not_in_intervention","intervention_not_resumable","intervention_not_closable","correction_target_unsettled","correction_target_closed","invoice_receipt_not_ready","fiscal_delivery_outcome_conflict","webhook_endpoint_registration_conflict","webhook_endpoint_suspended","webhook_endpoint_deleted","commercial_response_decision_conflict","receiving_issuer_held_elsewhere","production_reception_certificate_required","production_reception_integration_required","production_reception_already_filed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error","fiscal_artifact_unverified"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveInvoice"}},"/v1/received-documents":{"get":{"operationId":"listReceivedDocuments","summary":"List received documents","tags":["received-documents"],"parameters":[{"schema":{"type":"string","maxLength":2048},"in":"query","name":"cursor","required":false},{"schema":{"type":"integer","format":"int32","default":20,"maximum":100,"minimum":1},"in":"query","name":"limit","required":false},{"schema":{"title":"ReceivedDocumentStateFilter","type":"string","enum":["received","notReceived"]},"in":"query","name":"state","required":false},{"schema":{"title":"ReceivedDocumentResponseFilter","type":"string","enum":["pending","accepted","rejected"]},"in":"query","name":"response","required":false},{"schema":{"title":"ReceivedDocumentRecoveryFilter","type":"string","enum":["pending","inFlight","submitted","dgiiRejected","submissionRefused","signingRefused","constructionRefused","authenticationFailed","unavailable","outcomeUnknown","attemptsExhausted"]},"in":"query","name":"recovery","required":false}],"security":[{"secretKey":[]},{"integrationToken":["invoices:test"]},{"integrationToken":["invoices:live"]}],"x-timbro-api-key-capability":"invoices","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceivedDocumentPage"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","custody_certificate_malformed","custody_signature_algorithm_unsupported","custody_certificate_trust_profile_unsupported","custody_certificate_chain_untrusted","custody_certificate_purpose_unsupported","source_provider_installation_request_invalid","missing_idempotency_key","invalid_idempotency_key","malformed_json","invalid_request","invoice_original_invalid","invalid_collection_query","invalid_collection_cursor","invalid_replay_scope","webhook_destination_not_allowed","commercial_response_motive_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","unauthenticated","invalid_login","invalid_credential","credential_revoked","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted","insufficient_role","service_role_not_permitted","invitation_email_mismatch","issuer_not_authorized"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["integration_not_connected","email_already_registered","organization_slug_taken","hosted_tenant_conflict","legal_issuer_already_registered","onboarding_legal_issuer_identity_conflict","legal_issuer_profile_incomplete","already_a_member","certificate_custody_binding_conflict","certificate_custody_certificate_not_active","certificate_custody_certificate_version_not_active","source_provider_authorization_required","source_provider_installation_disabled","source_provider_installation_removed","source_provider_scope_insufficient","source_provider_target_access_removed","source_provider_authorization_conflict","source_provider_installation_callback_replayed","integration_creation_conflict","integration_activation_conflict","integration_activation_verification_rejected","certification_environment_required","certification_test_set_required","certification_test_run_in_progress","idempotency_key_conflict","fiscal_number_already_used","sequence_changed","sequence_source_record_conflict","source_version_stale","source_predecessor_conflict","source_history_requires_reconciliation","source_content_conflict","source_action_conflict","source_command_conflict","invoice_reference_conflict","invoice_totals_mismatch","printed_representation_profile_conflict","source_record_already_fiscalized","source_operation_pending","source_outcome_unknown","authority_rejected_replacement","fiscal_operation_not_in_intervention","intervention_not_resumable","intervention_not_closable","correction_target_unsettled","correction_target_closed","invoice_receipt_not_ready","fiscal_delivery_outcome_conflict","webhook_endpoint_registration_conflict","webhook_endpoint_suspended","webhook_endpoint_deleted","commercial_response_decision_conflict","receiving_issuer_held_elsewhere","production_reception_certificate_required","production_reception_integration_required","production_reception_already_filed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error","fiscal_artifact_unverified"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"listReceivedDocuments"}},"/v1/received-documents/{receivedDocumentId}":{"get":{"operationId":"retrieveReceivedDocument","summary":"Retrieve a received document","tags":["received-documents"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"receivedDocumentId","required":true}],"security":[{"secretKey":[]},{"integrationToken":["invoices:test"]},{"integrationToken":["invoices:live"]}],"x-timbro-api-key-capability":"invoices","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceivedDocumentResource"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","unauthenticated","invalid_login","invalid_credential","credential_revoked","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["organization_not_found","legal_issuer_not_found","invitation_invalid","certificate_custody_binding_not_found","integration_not_found","source_provider_authorization_not_found","certification_test_run_document_not_found","fiscal_operation_not_found","invoice_not_found","fiscal_artifact_not_found","invoice_receipt_not_found","fiscal_delivery_not_found","webhook_endpoint_not_found","webhook_event_not_found","received_document_not_found","receiving_issuer_not_found","route_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["integration_not_connected","email_already_registered","organization_slug_taken","hosted_tenant_conflict","legal_issuer_already_registered","onboarding_legal_issuer_identity_conflict","legal_issuer_profile_incomplete","already_a_member","certificate_custody_binding_conflict","certificate_custody_certificate_not_active","certificate_custody_certificate_version_not_active","source_provider_authorization_required","source_provider_installation_disabled","source_provider_installation_removed","source_provider_scope_insufficient","source_provider_target_access_removed","source_provider_authorization_conflict","source_provider_installation_callback_replayed","integration_creation_conflict","integration_activation_conflict","integration_activation_verification_rejected","certification_environment_required","certification_test_set_required","certification_test_run_in_progress","idempotency_key_conflict","fiscal_number_already_used","sequence_changed","sequence_source_record_conflict","source_version_stale","source_predecessor_conflict","source_history_requires_reconciliation","source_content_conflict","source_action_conflict","source_command_conflict","invoice_reference_conflict","invoice_totals_mismatch","printed_representation_profile_conflict","source_record_already_fiscalized","source_operation_pending","source_outcome_unknown","authority_rejected_replacement","fiscal_operation_not_in_intervention","intervention_not_resumable","intervention_not_closable","correction_target_unsettled","correction_target_closed","invoice_receipt_not_ready","fiscal_delivery_outcome_conflict","webhook_endpoint_registration_conflict","webhook_endpoint_suspended","webhook_endpoint_deleted","commercial_response_decision_conflict","receiving_issuer_held_elsewhere","production_reception_certificate_required","production_reception_integration_required","production_reception_already_filed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error","fiscal_artifact_unverified"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveReceivedDocument"}},"/v1/received-documents/{receivedDocumentId}/commercial-response":{"post":{"operationId":"respondToReceivedDocument","summary":"Accept or reject a received document","tags":["received-documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommercialResponse"}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"receivedDocumentId","required":true}],"security":[{"secretKey":[]},{"integrationToken":["invoices:test"]},{"integrationToken":["invoices:live"]}],"x-timbro-api-key-capability":"invoices","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReceivedDocumentResource"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed","custody_certificate_malformed","custody_signature_algorithm_unsupported","custody_certificate_trust_profile_unsupported","custody_certificate_chain_untrusted","custody_certificate_purpose_unsupported","source_provider_installation_request_invalid","missing_idempotency_key","invalid_idempotency_key","malformed_json","invalid_request","invoice_original_invalid","invalid_collection_query","invalid_collection_cursor","invalid_replay_scope","webhook_destination_not_allowed","commercial_response_motive_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","unauthenticated","invalid_login","invalid_credential","credential_revoked","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["organization_not_found","legal_issuer_not_found","invitation_invalid","certificate_custody_binding_not_found","integration_not_found","source_provider_authorization_not_found","certification_test_run_document_not_found","fiscal_operation_not_found","invoice_not_found","fiscal_artifact_not_found","invoice_receipt_not_found","fiscal_delivery_not_found","webhook_endpoint_not_found","webhook_event_not_found","received_document_not_found","receiving_issuer_not_found","route_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["integration_not_connected","email_already_registered","organization_slug_taken","hosted_tenant_conflict","legal_issuer_already_registered","onboarding_legal_issuer_identity_conflict","legal_issuer_profile_incomplete","already_a_member","certificate_custody_binding_conflict","certificate_custody_certificate_not_active","certificate_custody_certificate_version_not_active","source_provider_authorization_required","source_provider_installation_disabled","source_provider_installation_removed","source_provider_scope_insufficient","source_provider_target_access_removed","source_provider_authorization_conflict","source_provider_installation_callback_replayed","integration_creation_conflict","integration_activation_conflict","integration_activation_verification_rejected","certification_environment_required","certification_test_set_required","certification_test_run_in_progress","idempotency_key_conflict","fiscal_number_already_used","sequence_changed","sequence_source_record_conflict","source_version_stale","source_predecessor_conflict","source_history_requires_reconciliation","source_content_conflict","source_action_conflict","source_command_conflict","invoice_reference_conflict","invoice_totals_mismatch","printed_representation_profile_conflict","source_record_already_fiscalized","source_operation_pending","source_outcome_unknown","authority_rejected_replacement","fiscal_operation_not_in_intervention","intervention_not_resumable","intervention_not_closable","correction_target_unsettled","correction_target_closed","invoice_receipt_not_ready","fiscal_delivery_outcome_conflict","webhook_endpoint_registration_conflict","webhook_endpoint_suspended","webhook_endpoint_deleted","commercial_response_decision_conflict","receiving_issuer_held_elsewhere","production_reception_certificate_required","production_reception_integration_required","production_reception_already_filed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large","request_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error","fiscal_artifact_unverified"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveReceivedDocument"}},"/v1/received-documents/{receivedDocumentId}/files/xml":{"get":{"operationId":"downloadReceivedDocumentXml","summary":"Download a received document's original XML","tags":["received-documents"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"receivedDocumentId","required":true}],"security":[{"secretKey":[]},{"integrationToken":["invoices:test"]},{"integrationToken":["invoices:live"]}],"x-timbro-api-key-capability":"invoices","responses":{"200":{"description":"The document's original XML, as received.","content":{"application/xml":{"schema":{"type":"string","format":"binary"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"timbro-artifact-sha256":{"$ref":"#/components/headers/TimbroArtifactSha256"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","unauthenticated","invalid_login","invalid_credential","credential_revoked","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["organization_not_found","legal_issuer_not_found","invitation_invalid","certificate_custody_binding_not_found","integration_not_found","source_provider_authorization_not_found","certification_test_run_document_not_found","fiscal_operation_not_found","invoice_not_found","fiscal_artifact_not_found","invoice_receipt_not_found","fiscal_delivery_not_found","webhook_endpoint_not_found","webhook_event_not_found","received_document_not_found","receiving_issuer_not_found","route_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["integration_not_connected","email_already_registered","organization_slug_taken","hosted_tenant_conflict","legal_issuer_already_registered","onboarding_legal_issuer_identity_conflict","legal_issuer_profile_incomplete","already_a_member","certificate_custody_binding_conflict","certificate_custody_certificate_not_active","certificate_custody_certificate_version_not_active","source_provider_authorization_required","source_provider_installation_disabled","source_provider_installation_removed","source_provider_scope_insufficient","source_provider_target_access_removed","source_provider_authorization_conflict","source_provider_installation_callback_replayed","integration_creation_conflict","integration_activation_conflict","integration_activation_verification_rejected","certification_environment_required","certification_test_set_required","certification_test_run_in_progress","idempotency_key_conflict","fiscal_number_already_used","sequence_changed","sequence_source_record_conflict","source_version_stale","source_predecessor_conflict","source_history_requires_reconciliation","source_content_conflict","source_action_conflict","source_command_conflict","invoice_reference_conflict","invoice_totals_mismatch","printed_representation_profile_conflict","source_record_already_fiscalized","source_operation_pending","source_outcome_unknown","authority_rejected_replacement","fiscal_operation_not_in_intervention","intervention_not_resumable","intervention_not_closable","correction_target_unsettled","correction_target_closed","invoice_receipt_not_ready","fiscal_delivery_outcome_conflict","webhook_endpoint_registration_conflict","webhook_endpoint_suspended","webhook_endpoint_deleted","commercial_response_decision_conflict","receiving_issuer_held_elsewhere","production_reception_certificate_required","production_reception_integration_required","production_reception_already_filed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"422":{"description":"The request is well-formed but cannot be carried out.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":422},"code":{"type":"string","enum":["invalid_fiscal_identity","invalid_certificate_custody_signer_identity","certificate_p12_password_invalid","custody_certificate_not_yet_valid","custody_certificate_expired","custody_p12_work_limit_exceeded","certificate_custody_environment_signer_mismatch","delegated_sequence_verifier_forbidden","certification_test_set_invalid","document_type_not_enabled","fiscal_intent_rejected","unsupported_printed_representation_profile","affected_fiscal_operation_unsupported","fiscal_issuance_blocked","unsigned_document_schema_invalid","signed_document_schema_invalid","portal_document_unsupported","portal_document_taxpayer_mismatch","portal_document_consent_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error","fiscal_artifact_unverified"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["source_provider_unavailable","source_provider_throttled","source_provider_outcome_unknown","fiscal_artifact_unavailable","invoice_receipt_unavailable","fiscal_delivery_unavailable","custody_unavailable","integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_artifact","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveReceivedDocument"}},"/v1/subscriptions":{"get":{"operationId":"listSubscriptions","summary":"List monthly subscriptions","tags":["subscriptions"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"in":"query","name":"limit","required":false,"description":"Rows on one page."},{"schema":{"type":"string","minLength":1,"maxLength":512},"in":"query","name":"cursor","required":false,"description":"The `nextCursor` of the previous page. A cursor belongs to the list, tenant, mode, and filter set that minted it."},{"schema":{"$ref":"#/components/schemas/SubscriptionStatus"},"in":"query","name":"status","required":false},{"schema":{"type":"string","minLength":1,"maxLength":128},"in":"query","name":"subscriptionReference","required":false},{"schema":{"type":"string","minLength":1,"maxLength":128},"in":"query","name":"customerReference","required":false}],"security":[{"secretKey":[]}],"x-timbro-api-key-capability":"payments","responses":{"200":{"description":"A page of subscriptions scoped to the current tenant and mode.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionList"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","collection_cursor_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"listSubscriptions"},"post":{"operationId":"createSubscription","summary":"Create a fixed monthly subscription with automatic fiscal invoicing","tags":["subscriptions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriptionRequest"}}}},"security":[{"secretKey":[]}],"x-timbro-api-key-capability":"payments","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"201":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed","fiscal_buyer_tax_id_invalid","payment_reference_invalid","payment_tax_required","payment_tax_invalid","payment_items_invalid","payment_totals_mismatch","payment_invoice_item_fields_required","currency_not_supported","provider_not_available"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["payment_not_found","subscription_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["idempotency_key_reused","idempotency_request_in_progress","idempotency_key_expired","source_identity_conflict","payment_reference_conflict","payment_invoice_not_allowed","business_fiscal_setup_incomplete","recurring_account_required","subscription_reference_conflict","customer_reference_conflict","subscription_setup_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"422":{"description":"The request is well-formed but cannot be carried out.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":422},"code":{"type":"string","enum":["merchant_account_not_ready","merchant_checkout_policy_invalid","merchant_profile_incomplete","payment_description_required","sale_amount_invalid","currency_not_supported_by_provider","currency_not_supported_for_fiscal_document","fiscal_total_mismatch","fiscal_line_total_invalid","fiscal_line_legal_tip_invalid","fiscal_document_kind_not_allowed","fiscal_government_eligibility_required","fiscal_government_eligibility_not_allowed","taxpayer_unregistered","taxpayer_inactive"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["business_fiscal_binding_unavailable","business_fiscal_setup_unavailable","payments_contract_migration_required","taxpayer_directory_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"listSubscriptions"}},"/v1/subscriptions/{subscriptionId}":{"get":{"operationId":"retrieveSubscription","summary":"Retrieve a subscription and its period Payments","tags":["subscriptions"],"parameters":[{"schema":{"type":"string","pattern":"^sub_[0-9a-hjkmnp-tv-z]{24,}$"},"in":"path","name":"subscriptionId","required":true,"description":"Subscription identity"}],"security":[{"secretKey":[]}],"x-timbro-api-key-capability":"payments","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["subscription_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveSubscription"}},"/v1/subscriptions/{subscriptionId}/payments":{"get":{"operationId":"listSubscriptionPayments","summary":"List payments for a subscription","tags":["subscriptions"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"in":"query","name":"limit","required":false,"description":"Rows on one page."},{"schema":{"type":"string","minLength":1,"maxLength":512},"in":"query","name":"cursor","required":false,"description":"The `nextCursor` of the previous page. A cursor belongs to the list, tenant, mode, and filter set that minted it."},{"schema":{"type":"string","pattern":"^sub_[0-9a-hjkmnp-tv-z]{24,}$"},"in":"path","name":"subscriptionId","required":true,"description":"Subscription identity"}],"security":[{"secretKey":[]}],"x-timbro-api-key-capability":"payments","responses":{"200":{"description":"A page of payment history for one subscription.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionPayments"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","collection_cursor_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["subscription_not_found","payment_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"listSubscriptionPayments"}},"/v1/subscriptions/{subscriptionId}/cancel":{"post":{"operationId":"cancelSubscription","summary":"Cancel future charges for a subscription","tags":["subscriptions"],"parameters":[{"schema":{"type":"string","pattern":"^sub_[0-9a-hjkmnp-tv-z]{24,}$"},"in":"path","name":"subscriptionId","required":true,"description":"Subscription identity"}],"security":[{"secretKey":[]}],"x-timbro-api-key-capability":"payments","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted","live_mode_not_enabled"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["subscription_not_found","payment_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["payment_cancel_not_allowed","payment_cancellation_pending"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveSubscription"}},"/v1/subscriptions/{subscriptionId}/management":{"post":{"operationId":"managementSubscription","summary":"Create a scoped management link for a subscription","tags":["subscriptions"],"parameters":[{"schema":{"type":"string","pattern":"^sub_[0-9a-hjkmnp-tv-z]{24,}$"},"in":"path","name":"subscriptionId","required":true,"description":"Subscription identity"}],"security":[{"secretKey":[]}],"x-timbro-api-key-capability":"payments","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["subscription_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveSubscription"}},"/v1/subscriptions/{subscriptionId}/setup":{"post":{"operationId":"setupSubscription","summary":"Retrieve the setup link for a subscription","tags":["subscriptions"],"parameters":[{"schema":{"type":"string","pattern":"^sub_[0-9a-hjkmnp-tv-z]{24,}$"},"in":"path","name":"subscriptionId","required":true,"description":"Subscription identity"}],"security":[{"secretKey":[]}],"x-timbro-api-key-capability":"payments","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["subscription_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["subscription_setup_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveSubscription"}},"/v1/subscriptions/{subscriptionId}/recovery_notice":{"post":{"operationId":"resendSubscriptionRecoveryNotice","summary":"Resend a recovery notice for a subscription","tags":["subscriptions"],"parameters":[{"schema":{"type":"string","pattern":"^sub_[0-9a-hjkmnp-tv-z]{24,}$"},"in":"path","name":"subscriptionId","required":true,"description":"Subscription identity"},{"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x20-\\x7e]+$"},"in":"header","name":"idempotency-key","required":true}],"security":[{"secretKey":[]}],"x-timbro-api-key-capability":"payments","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subscription"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["subscription_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"429":{"description":"Too many requests. Retry after the interval in the Retry-After header.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":429},"code":{"type":"string","enum":["rate_limit_exceeded"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"required","x-timbro-retry":"retry_with_same_idempotency_key","x-timbro-recovery":"retrieveSubscription"}},"/v1/payments/{paymentId}/invoice":{"put":{"operationId":"attachPaymentInvoice","summary":"Associate an accepted Invoice with a Payment","tags":["payments"],"description":"Associates an already accepted canonical Invoice with a captured Payment. An independent Source must provide its restricted receipt capability.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachInvoiceRequest"}}}},"parameters":[{"schema":{"type":"string","pattern":"^payment_[0-9a-hjkmnp-tv-z]{24,}$"},"in":"path","name":"paymentId","required":true,"description":"Payment to associate."},{"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x20-\\x7e]+$"},"in":"header","name":"idempotency-key","required":true,"description":"Caller-derived unique key, stable under retry. Required."}],"security":[{"secretKey":[]},{"integrationToken":["payments:test"]},{"integrationToken":["payments:live"]}],"x-timbro-preconditions":["payment_succeeded","invoice_accepted"],"x-timbro-api-key-capability":"payments","responses":{"200":{"description":"One durable merchant payment request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["payment_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["idempotency_key_reused","idempotency_request_in_progress","idempotency_key_expired","payment_invoice_not_ready","payment_invoice_not_allowed","invoice_reference_conflict","invoice_reference_stale"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["business_fiscal_binding_unavailable","merchant_payments_api_paused","integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"required","x-timbro-idempotency-derivation":{"command":"payment.attachInvoice","fields":["paymentId","invoiceId"]},"x-timbro-retry":"retry_with_same_idempotency_key","x-timbro-recovery":"retrievePayment"},"post":{"operationId":"createPaymentInvoice","summary":"Create the canonical invoice for a captured payment","tags":["payments"],"description":"Submits the posted Invoice against the captured Payment and returns Timbro's canonical Invoice resource.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceRequest"}}}},"parameters":[{"schema":{"type":"string","pattern":"^payment_[0-9a-hjkmnp-tv-z]{24,}$"},"in":"path","name":"paymentId","required":true,"description":"Payment whose invoice is being created."},{"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x20-\\x7e]+$"},"in":"header","name":"idempotency-key","required":true,"description":"Caller-derived unique key, stable under retry. Required."}],"security":[{"secretKey":[]},{"integrationToken":["payments:test"]},{"integrationToken":["payments:live"]}],"x-timbro-preconditions":["payment_succeeded","merchant_invoicing","fiscal_recipient_revision_finalized"],"x-timbro-api-key-capability":"payments","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResource"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted","live_mode_not_enabled"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["payment_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["idempotency_key_reused","idempotency_request_in_progress","idempotency_key_expired","payment_invoice_not_ready","payment_invoice_not_allowed","invoice_reference_stale","invoice_reference_conflict"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["merchant_payments_api_paused","integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"fiscal_acceptance","x-timbro-idempotency":"required","x-timbro-idempotency-derivation":{"command":"payment.invoice","fields":["paymentId"]},"x-timbro-retry":"retry_with_same_idempotency_key","x-timbro-recovery":"retrievePayment"}},"/v1/payments":{"post":{"operationId":"createPayment","summary":"Create a payment","tags":["payments"],"description":"Creates the durable money object for one sale and returns the customer-facing next action.\n\nA declined attempt does not end the Payment: it returns to `status: \"requires_customer_action\"` with `lastDecline`, and a `payment.declined` event is delivered. The payer can try again until the Payment expires.\nAn ambiguous provider result is 201 with `status: \"verifying\"`.\n\nA live Payment that asks Checkout to issue its Invoice (`invoicing.mode` `automatic` or `merchant`) needs Timbro to report production e-CF types ready: its `type` and, unless `isTypeLocked`, every type in `allowedTypes`; without `allowedTypes` it allows only the types ready at creation. Otherwise creation answers 409 `business_fiscal_setup_incomplete`, or 503 `business_fiscal_setup_unavailable` when Timbro cannot answer. A live Payment that asks for no Invoice, or names an existing one, is created without reading Timbro readiness.\n\n`Idempotency-Key` is optional. Omission derives a stable key from the reference. Retrying with the same key replays the original\nPayment's current state through its retained resource identity. Reusing the key with different caller intent returns 409.\n`paymentReference` identifies one immutable request within merchant and TEST/LIVE scope. Replay precedes current defaults, including for terminal Payments.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePaymentRequest"}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x20-\\x7e]+$"},"in":"header","name":"idempotency-key","required":false,"description":"Optional command identity. Omission derives a stable key from paymentReference. Printable ASCII."}],"security":[{"secretKey":[]},{"integrationToken":["payments:test"]},{"integrationToken":["payments:live"]}],"x-timbro-api-key-capability":"payments","responses":{"200":{"description":"One durable merchant payment request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"201":{"description":"One durable merchant payment request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed","fiscal_buyer_tax_id_invalid","payment_reference_invalid","payment_tax_required","payment_tax_invalid","payment_items_invalid","payment_totals_mismatch","payment_invoice_item_fields_required","currency_not_supported"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["payment_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["idempotency_key_reused","idempotency_request_in_progress","idempotency_key_expired","source_identity_conflict","payment_reference_conflict","payment_invoice_not_allowed","business_fiscal_setup_incomplete"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"422":{"description":"The request is well-formed but cannot be carried out.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":422},"code":{"type":"string","enum":["merchant_account_not_ready","merchant_checkout_policy_invalid","merchant_profile_incomplete","payment_description_required","sale_amount_invalid","currency_not_supported_by_provider","currency_not_supported_for_fiscal_document","fiscal_total_mismatch","fiscal_line_total_invalid","fiscal_line_legal_tip_invalid","fiscal_document_kind_not_allowed","fiscal_government_eligibility_required","fiscal_government_eligibility_not_allowed","taxpayer_unregistered","taxpayer_inactive"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["business_fiscal_binding_unavailable","business_fiscal_setup_unavailable","payments_contract_migration_required","taxpayer_directory_unavailable","merchant_payments_api_paused","integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"payment_authorization","x-timbro-idempotency":"optional","x-timbro-idempotency-derivation":{"command":"payment.create","fields":["paymentReference"]},"x-timbro-retry":"retry_with_same_idempotency_key","x-timbro-recovery":"listPayments"},"get":{"operationId":"listPayments","summary":"List payments","tags":["payments"],"description":"Returns newest payments first with a deterministic opaque cursor.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"in":"query","name":"limit","required":false,"description":"Rows on one page."},{"schema":{"type":"string","minLength":1,"maxLength":512},"in":"query","name":"cursor","required":false,"description":"The `nextCursor` of the previous page. A cursor belongs to the list, tenant, mode, and filter set that minted it."},{"schema":{"type":"array","items":{"title":"PaymentStatus","type":"string","enum":["requires_customer_action","processing","partially_authorized","authorized","capturing","partially_paid","releasing","verifying","succeeded","canceled","expired"],"description":"Only `succeeded`, `canceled`, and `expired` are terminal. A declined attempt returns the Payment to `requires_customer_action` with `lastDecline`, so the payer can try again until the Payment expires. `partially_authorized` means some shares have reserved funds, `authorized` means every share is reserved and awaits the organizer's capture command, `capturing` means capture is running, and `releasing` means reserved funds are being released. `verifying` is a real, non-terminal status; it is not an error or decline."}},"in":"query","name":"status","required":false,"description":"Repeat the parameter to admit more than one status."},{"schema":{"type":"string","minLength":1,"maxLength":128},"in":"query","name":"paymentReference","required":false,"description":"Return only the Payment with exactly this `paymentReference`."},{"schema":{"type":"string","minLength":1,"maxLength":128},"in":"query","name":"saleReference","required":false},{"schema":{"type":"string","format":"uuid"},"in":"query","name":"invoiceId","required":false,"description":"Return only the Payments that collect this Invoice, in full or in parts."},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"createdAfter","required":false},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"createdBefore","required":false}],"security":[{"secretKey":[]},{"integrationToken":["payments:test"]},{"integrationToken":["payments:live"]}],"x-timbro-api-key-capability":"payments","responses":{"200":{"description":"A page of merchant Payments with decimal Money.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentListPage"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","collection_cursor_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["merchant_payments_api_paused","integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"listPayments"}},"/v1/payments/{paymentId}":{"get":{"operationId":"retrievePayment","summary":"Retrieve a payment","tags":["payments"],"parameters":[{"schema":{"type":"string","pattern":"^payment_[0-9a-hjkmnp-tv-z]{24,}$"},"in":"path","name":"paymentId","required":true,"description":"Payment to retrieve."}],"security":[{"secretKey":[]},{"integrationToken":["payments:test"]},{"integrationToken":["payments:live"]}],"x-timbro-api-key-capability":"payments","responses":{"200":{"description":"One durable merchant payment request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted","live_mode_not_enabled"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["payment_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["merchant_payments_api_paused","integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrievePayment"}},"/v1/payments/{paymentId}/cancel":{"post":{"operationId":"cancelPayment","summary":"Cancel a payment","tags":["payments"],"description":"Stops a Payment before capture and invalidates its Checkout submission path.\nSplit authorizations enter durable release and become canceled only after every provider void is confirmed.\nA same-key 202 replay may return the original releasing response while release is pending; retrieve the Payment for the authoritative state.\nAn unsplit provider outcome that is already submitting or ambiguous remains pending for existing correlation reconciliation.\nCancellation does not refund captured money.\n`Idempotency-Key` is required.","parameters":[{"schema":{"type":"string","pattern":"^payment_[0-9a-hjkmnp-tv-z]{24,}$"},"in":"path","name":"paymentId","required":true,"description":"Payment to cancel."},{"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x20-\\x7e]+$"},"in":"header","name":"idempotency-key","required":true,"description":"Identity of this cancellation command and its retries. Required."}],"security":[{"secretKey":[]},{"integrationToken":["payments:test"]},{"integrationToken":["payments:live"]}],"x-timbro-preconditions":["payment_not_captured"],"x-timbro-api-key-capability":"payments","responses":{"200":{"description":"One durable merchant payment request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"202":{"description":"One durable merchant payment request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted","live_mode_not_enabled"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["payment_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["idempotency_key_reused","idempotency_request_in_progress","idempotency_key_expired","payment_cancel_not_allowed","payment_cancellation_pending"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["merchant_payments_api_paused","integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"required","x-timbro-idempotency-derivation":{"command":"payment.cancel","fields":["paymentId"]},"x-timbro-retry":"retry_with_same_idempotency_key","x-timbro-recovery":"retrievePayment"}},"/v1/payments/{paymentId}/invoice-recipient":{"put":{"operationId":"updatePaymentInvoiceRecipient","summary":"Update the Invoice recipient","tags":["payments"],"description":"Records the buyer email for the payment Invoice. Timbro delivery starts after an Invoice has a durable identity.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentInvoiceRecipientRequest"}}}},"parameters":[{"schema":{"type":"string","pattern":"^payment_[0-9a-hjkmnp-tv-z]{24,}$"},"in":"path","name":"paymentId","required":true,"description":"Payment whose Invoice recipient is updated."},{"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x20-\\x7e]+$"},"in":"header","name":"idempotency-key","required":true}],"security":[{"secretKey":[]},{"integrationToken":["payments:test"]},{"integrationToken":["payments:live"]}],"x-timbro-preconditions":["payment_has_invoice"],"x-timbro-api-key-capability":"payments","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","required":["recipientEmail","status"],"properties":{"recipientEmail":{"type":"string","format":"email","maxLength":320},"status":{"anyOf":[{"type":"string","const":"waitingForInvoice"},{"type":"string","const":"requested"}]}},"additionalProperties":false}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted","invoice_delivery_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["payment_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["idempotency_key_reused","idempotency_request_in_progress","idempotency_key_expired","fiscal_artifact_not_ready"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["fiscal_delivery_unavailable","merchant_payments_api_paused","integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant","checkout"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"required","x-timbro-retry":"retry_with_same_idempotency_key","x-timbro-recovery":"retrievePayment"}},"/v1/payments/{paymentId}/invoice-choice":{"put":{"operationId":"updatePaymentInvoiceChoice","summary":"Update the Invoice choice","tags":["payments"],"description":"Choose the Invoice type and buyer before payment submission.\nA change retires prepared payment-method submission tokens, so prepare payment methods again before submitting.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentInvoiceChoiceRequest"}}}},"parameters":[{"schema":{"type":"string","pattern":"^payment_[0-9a-hjkmnp-tv-z]{24,}$"},"in":"path","name":"paymentId","required":true,"description":"Payment to update."},{"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x20-\\x7e]+$"},"in":"header","name":"idempotency-key","required":true,"description":"Caller-derived unique key, stable under retry. Printable ASCII. Required."}],"security":[{"secretKey":[]},{"integrationToken":["payments:test"]},{"integrationToken":["payments:live"]}],"x-timbro-preconditions":["payment_requires_customer_action","no_payment_split"],"x-timbro-api-key-capability":"payments","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Payment"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed","fiscal_buyer_tax_id_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted","live_mode_not_enabled"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["payment_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["idempotency_key_reused","idempotency_request_in_progress","idempotency_key_expired","payment_not_editable","payment_split_locked","invoicing_locked"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"422":{"description":"The request is well-formed but cannot be carried out.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":422},"code":{"type":"string","enum":["fiscal_document_kind_not_allowed","fiscal_government_eligibility_required","fiscal_government_eligibility_not_allowed","taxpayer_unregistered","taxpayer_inactive"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["taxpayer_directory_unavailable","merchant_payments_api_paused","integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant","checkout"],"x-timbro-consequences":"invoice_choice_only","x-timbro-idempotency":"required","x-timbro-retry":"retry_with_same_idempotency_key","x-timbro-recovery":"retrievePayment"}},"/v1/refunds":{"post":{"operationId":"createRefund","summary":"Create a full or partial refund","tags":["refunds"],"description":"Creates a durable refund request against captured Payment money.\nThe request records exact allocation attribution before any provider work begins.\n`refundReference` is the immutable identity of this refund within the merchant and mode. Retrying it with the same caller intent returns the current Refund; changing the intent returns a conflict.\nOmitting `amount` reserves the remaining captured balance for the selected allocations when the Refund is first created.\n`voluntaryTipAmount` declares the exact returned voluntary-tip portion. For a partial refund it defaults to zero; refunding the entire remaining captured balance includes the remaining tip. Each portion must fit its own captured balance. Voluntary tips are excluded from the credit-note amount.\n`source` is optional for ERP coordination. When supplied, its immutable ID and version cannot identify a different Refund.\n`taxAmount` declares the exact returned ITBIS, never a proportional estimate. Refunding the original full captured balance uses its retained tax when omitted; an explicit amount must match. Later refunds preserve caller-declared tax within the remaining captured tax, and omission leaves it unproven.\nA Refund is submitted without an operator for the full captured amount of an unsplit DOP TEST card Payment with no earlier Refund other than declined ones. An eligible Azul Sale can instead return one lower amount with an explicit exact `taxAmount`, within `refundable.automaticPartial` limits. Partial refunds of authorization captures, CardNet, split, LIVE, wallet, and sandbox Payments remain `operator_required`. Azul retains the original full capture binding and credentials, submits the exact returned amount and tax on a unique correlation, and requires matching VerifyPayment inquiry. CardNet full refunds use the captured Ztrans transaction and active refund credential; before CardNet's 7:00 p.m. close, when CardNet refuses the Refund, the same request voids the Sale instead. Read `refundable.automaticAmount` for the full amount and `refundable.automaticPartial` for partial support. A submitted Refund can still end `declined` or `operator_required`.\nA successful provider refund never creates a fiscal credit or debit note; associate the accepted credit-note Invoice separately.\nWhen Idempotency-Key is omitted, the Refund reference supplies a stable retry key. If a key is provided, reuse it for retries. Retrieve the Refund to confirm its current state.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateRefundRequest"}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x20-\\x7e]+$"},"in":"header","name":"idempotency-key","required":false}],"security":[{"secretKey":[]},{"integrationToken":["refunds:test"]},{"integrationToken":["refunds:live"]}],"x-timbro-api-key-capability":"payments","responses":{"200":{"description":"A durable full or partial refund request. Provider money movement and fiscal note coordination are independent state machines.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refund"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"201":{"description":"A durable full or partial refund request. Provider money movement and fiscal note coordination are independent state machines.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refund"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed","refund_reference_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["refund_not_found","payment_not_found","refund_allocation_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["idempotency_key_reused","idempotency_request_in_progress","idempotency_key_expired","refund_payment_not_captured","refund_tip_allocation_unknown","refund_exceeds_captured","refund_allocation_conflict","refund_allocation_ledger_unavailable","refund_source_identity_conflict","refund_reference_conflict"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"422":{"description":"The request is well-formed but cannot be carried out.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":422},"code":{"type":"string","enum":["refund_amount_invalid","refund_tax_amount_invalid","refund_tax_amount_required","refund_tax_allocation_unknown","refund_tip_amount_invalid","refund_currency_mismatch"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["payments_contract_migration_required","merchant_payments_api_paused","integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"payment_refund","x-timbro-idempotency":"optional","x-timbro-idempotency-derivation":{"command":"refund.create","fields":["paymentId","refundReference"]},"x-timbro-retry":"retry_with_same_idempotency_key","x-timbro-recovery":"listRefunds"},"get":{"operationId":"listRefunds","summary":"List refunds","tags":["refunds"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"in":"query","name":"limit","required":false,"description":"Rows on one page."},{"schema":{"type":"string","minLength":1,"maxLength":512},"in":"query","name":"cursor","required":false,"description":"The `nextCursor` of the previous page. A cursor belongs to the list, tenant, mode, and filter set that minted it."},{"schema":{"type":"string","pattern":"^payment_[0-9a-hjkmnp-tv-z]{24,}$"},"in":"query","name":"paymentId","required":false,"description":"Filter refunds for one Payment."},{"schema":{"type":"string","minLength":1,"maxLength":128},"in":"query","name":"refundReference","required":false,"description":"Return only the Refund with exactly this `refundReference`."}],"security":[{"secretKey":[]},{"integrationToken":["refunds:test"]},{"integrationToken":["refunds:live"]}],"x-timbro-api-key-capability":"payments","responses":{"200":{"description":"One page of Refunds, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundListPage"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","collection_cursor_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["payments_contract_migration_required","merchant_payments_api_paused","integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"listRefunds"}},"/v1/refunds/{refundId}/invoice":{"put":{"operationId":"attachRefundInvoice","summary":"Attach an accepted credit-note Invoice to a refund","tags":["refunds"],"description":"Verifies the E34 Invoice against the original Invoice, issuer, environment, currency, and refund amount. Independent Sources supply a restricted receipt credential. This association does not change the provider refund outcome. Retry with the same Idempotency-Key, and retrieve the Refund to confirm its current state.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttachRefundInvoiceRequest"}}}},"parameters":[{"schema":{"type":"string","pattern":"^refund_[0-9a-hjkmnp-tv-z]{24,}$"},"in":"path","name":"refundId","required":true,"description":"Refund associated with the credit note."},{"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x20-\\x7e]+$"},"in":"header","name":"idempotency-key","required":true}],"security":[{"secretKey":[]},{"integrationToken":["refunds:test"]},{"integrationToken":["refunds:live"]}],"x-timbro-api-key-capability":"payments","responses":{"200":{"description":"A durable full or partial refund request. Provider money movement and fiscal note coordination are independent state machines.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refund"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed","custody_certificate_malformed","custody_signature_algorithm_unsupported","custody_certificate_trust_profile_unsupported","custody_certificate_chain_untrusted","custody_certificate_purpose_unsupported","source_provider_installation_request_invalid","missing_idempotency_key","invalid_idempotency_key","malformed_json","invalid_request","invoice_original_invalid","invalid_collection_query","invalid_collection_cursor","invalid_replay_scope","webhook_destination_not_allowed","commercial_response_motive_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","unauthenticated","invalid_login","invalid_credential","credential_revoked","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["refund_not_found","organization_not_found","legal_issuer_not_found","invitation_invalid","certificate_custody_binding_not_found","integration_not_found","source_provider_authorization_not_found","certification_test_run_document_not_found","fiscal_operation_not_found","invoice_not_found","fiscal_artifact_not_found","invoice_receipt_not_found","fiscal_delivery_not_found","webhook_endpoint_not_found","webhook_event_not_found","received_document_not_found","receiving_issuer_not_found","route_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["integration_not_connected","idempotency_key_reused","idempotency_request_in_progress","idempotency_key_expired","refund_invoice_not_ready","refund_invoice_not_accepted","refund_invoice_mismatch","refund_tip_allocation_unknown","refund_invoice_conflict","email_already_registered","organization_slug_taken","hosted_tenant_conflict","legal_issuer_already_registered","onboarding_legal_issuer_identity_conflict","legal_issuer_profile_incomplete","already_a_member","certificate_custody_binding_conflict","certificate_custody_certificate_not_active","certificate_custody_certificate_version_not_active","source_provider_authorization_required","source_provider_installation_disabled","source_provider_installation_removed","source_provider_scope_insufficient","source_provider_target_access_removed","source_provider_authorization_conflict","source_provider_installation_callback_replayed","integration_creation_conflict","integration_activation_conflict","integration_activation_verification_rejected","certification_environment_required","certification_test_set_required","certification_test_run_in_progress","idempotency_key_conflict","fiscal_number_already_used","sequence_changed","sequence_source_record_conflict","source_version_stale","source_predecessor_conflict","source_history_requires_reconciliation","source_content_conflict","source_action_conflict","source_command_conflict","invoice_reference_conflict","invoice_totals_mismatch","printed_representation_profile_conflict","source_record_already_fiscalized","source_operation_pending","source_outcome_unknown","authority_rejected_replacement","fiscal_operation_not_in_intervention","intervention_not_resumable","intervention_not_closable","correction_target_unsettled","correction_target_closed","invoice_receipt_not_ready","fiscal_delivery_outcome_conflict","webhook_endpoint_registration_conflict","webhook_endpoint_suspended","webhook_endpoint_deleted","commercial_response_decision_conflict","receiving_issuer_held_elsewhere","production_reception_certificate_required","production_reception_integration_required","production_reception_already_filed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error","fiscal_artifact_unverified"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["payments_contract_migration_required","merchant_payments_api_paused","integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"fiscal_acceptance","x-timbro-idempotency":"required","x-timbro-idempotency-derivation":{"command":"refund.attachInvoice","fields":["refundId","invoiceId"]},"x-timbro-retry":"retry_with_same_idempotency_key","x-timbro-recovery":"retrieveRefund"}},"/v1/refunds/{refundId}":{"get":{"operationId":"retrieveRefund","summary":"Retrieve a refund","tags":["refunds"],"parameters":[{"schema":{"type":"string","pattern":"^refund_[0-9a-hjkmnp-tv-z]{24,}$"},"in":"path","name":"refundId","required":true,"description":"Refund to retrieve."}],"security":[{"secretKey":[]},{"integrationToken":["refunds:test"]},{"integrationToken":["refunds:live"]}],"x-timbro-api-key-capability":"payments","responses":{"200":{"description":"A durable full or partial refund request. Provider money movement and fiscal note coordination are independent state machines.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Refund"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["refund_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["payments_contract_migration_required","merchant_payments_api_paused","integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveRefund"}},"/v1/merchant-accounts":{"get":{"operationId":"listMerchantAccounts","summary":"List merchant accounts","tags":["merchant-accounts"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"in":"query","name":"limit","required":false,"description":"Rows on one page."},{"schema":{"type":"string","minLength":1,"maxLength":512},"in":"query","name":"cursor","required":false,"description":"The `nextCursor` of the previous page. A cursor belongs to the list, tenant, mode, and filter set that minted it."}],"security":[{"secretKey":[]},{"adminKey":[]}],"x-timbro-api-key-capability":"payments","responses":{"200":{"description":"One page of Merchant Accounts, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantAccountListPage"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","collection_cursor_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"listMerchantAccounts"}},"/v1/merchant-accounts/{merchantAccountId}":{"get":{"operationId":"retrieveMerchantAccount","summary":"Retrieve a merchant account","tags":["merchant-accounts"],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":256},"in":"path","name":"merchantAccountId","required":true}],"security":[{"secretKey":[]},{"adminKey":[]}],"x-timbro-api-key-capability":"payments","responses":{"200":{"description":"A merchant-owned provider account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantAccount"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["merchant_account_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveMerchantAccount"}},"/v1/business/checkout-policy":{"get":{"operationId":"retrieveBusinessCheckoutPolicy","summary":"Retrieve the merchant Checkout policy","tags":["business"],"security":[{"secretKey":[]},{"adminKey":[]}],"x-timbro-api-key-capability":"payments","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantCheckoutPolicy"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"422":{"description":"The request is well-formed but cannot be carried out.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":422},"code":{"type":"string","enum":["merchant_checkout_policy_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveBusinessCheckoutPolicy"},"put":{"operationId":"updateBusinessCheckoutPolicy","summary":"Replace the merchant Checkout policy","tags":["business"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantCheckoutPolicyRequest"}}}},"security":[{"adminKey":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantCheckoutPolicy"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["merchant_checkout_policy_revision_conflict"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"422":{"description":"The request is well-formed but cannot be carried out.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":422},"code":{"type":"string","enum":["merchant_checkout_policy_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveBusinessCheckoutPolicy"}},"/v1/business/rnc-verification":{"post":{"operationId":"verifyBusinessRnc","summary":"Verify an RNC","tags":["business"],"description":"Looks up an RNC in Taxpayer Directory and returns its registered name. A returned identity can be used for registration regardless of registration status or evidence age. The result is not persisted. This experimental operation requires an existing API key; tenant bootstrap and human administrator authentication are not part of this slice.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessRncVerificationRequest"}}}},"security":[{"secretKey":[]},{"adminKey":[]}],"responses":{"200":{"description":"The Directory-owned legal identity for a verified RNC.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BusinessRncVerification"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"422":{"description":"The request is well-formed but cannot be carried out.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":422},"code":{"type":"string","enum":["taxpayer_unregistered"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["taxpayer_directory_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_dependency","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"verifyBusinessRnc"}},"/v1/webhook-endpoints":{"get":{"operationId":"listWebhookEndpoints","summary":"List webhook endpoints","tags":["webhooks"],"description":"Returns the tenant's endpoints for this mode, newest first, including endpoints already deleted. No signing secret is ever part of the page. An integration sees only the endpoints it created.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"in":"query","name":"limit","required":false,"description":"Rows on one page."},{"schema":{"type":"string","minLength":1,"maxLength":512},"in":"query","name":"cursor","required":false,"description":"The `nextCursor` of the previous page. A cursor belongs to the list, tenant, mode, and filter set that minted it."}],"security":[{"secretKey":[]},{"integrationToken":["invoices:test"]},{"integrationToken":["invoices:live"]},{"integrationToken":["payments:test"]},{"integrationToken":["payments:live"]},{"integrationToken":["refunds:test"]},{"integrationToken":["refunds:live"]}],"responses":{"200":{"description":"One page of webhook endpoints, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointListPage"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","collection_cursor_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"listWebhookEndpoints"},"post":{"operationId":"createWebhookEndpoint","summary":"Create a merchant webhook endpoint","tags":["webhooks"],"description":"Registers an HTTPS endpoint for signed domain events. The signing secret is returned only in this response. An integration subscribes only to events of the scope families it holds, and its endpoints are deleted when the business disconnects it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookEndpointRequest"}}}},"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x20-\\x7e]+$"},"in":"header","name":"idempotency-key","required":true}],"security":[{"secretKey":[]},{"integrationToken":["invoices:test"]},{"integrationToken":["invoices:live"]},{"integrationToken":["payments:test"]},{"integrationToken":["payments:live"]},{"integrationToken":["refunds:test"]},{"integrationToken":["refunds:live"]}],"responses":{"201":{"description":"The endpoint and its new signing secret. Store the secret securely.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["idempotency_key_reused","idempotency_request_in_progress","idempotency_key_expired","webhook_endpoint_deleted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"required","x-timbro-retry":"retry_with_same_idempotency_key","x-timbro-recovery":"createWebhookEndpoint"}},"/v1/webhook-endpoints/{webhookEndpointId}":{"get":{"operationId":"retrieveWebhookEndpoint","summary":"Retrieve a webhook endpoint","tags":["webhooks"],"description":"Returns the authoritative endpoint state, without its signing secret, so a lifecycle call that timed out can be settled by reading.","parameters":[{"schema":{"type":"string","pattern":"^webhook_endpoint_[0-9a-hjkmnp-tv-z]{24,}$"},"in":"path","name":"webhookEndpointId","required":true,"description":"Webhook endpoint to operate on."}],"security":[{"secretKey":[]},{"integrationToken":["invoices:test"]},{"integrationToken":["invoices:live"]},{"integrationToken":["payments:test"]},{"integrationToken":["payments:live"]},{"integrationToken":["refunds:test"]},{"integrationToken":["refunds:live"]}],"responses":{"200":{"description":"A merchant endpoint configured to receive authenticated domain events.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["webhook_endpoint_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveWebhookEndpoint"},"delete":{"operationId":"deleteWebhookEndpoint","summary":"Delete a webhook endpoint","tags":["webhooks"],"description":"Stops delivery to this endpoint permanently. No further event is queued for it and its signing secrets sign nothing again.","parameters":[{"schema":{"type":"string","pattern":"^webhook_endpoint_[0-9a-hjkmnp-tv-z]{24,}$"},"in":"path","name":"webhookEndpointId","required":true,"description":"Webhook endpoint to operate on."}],"security":[{"secretKey":[]},{"integrationToken":["invoices:test"]},{"integrationToken":["invoices:live"]},{"integrationToken":["payments:test"]},{"integrationToken":["payments:live"]},{"integrationToken":["refunds:test"]},{"integrationToken":["refunds:live"]}],"responses":{"204":{"description":"Default Response","headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["webhook_endpoint_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveWebhookEndpoint"}},"/v1/webhook-endpoints/{webhookEndpointId}/deliveries":{"get":{"operationId":"listWebhookDeliveries","summary":"List deliveries to a webhook endpoint","tags":["webhooks"],"description":"Returns what the gateway tried to deliver to this endpoint, newest first, with the endpoint's own answer as a bounded excerpt.","parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"in":"query","name":"limit","required":false,"description":"Rows on one page."},{"schema":{"type":"string","minLength":1,"maxLength":512},"in":"query","name":"cursor","required":false,"description":"The `nextCursor` of the previous page. A cursor belongs to the list, tenant, mode, and filter set that minted it."},{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDeliveryState"}},"in":"query","name":"state","required":false,"description":"Repeat the parameter to admit more than one state."},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"occurredAfter","required":false,"description":"Admits the deliveries whose event happened at or after this instant."},{"schema":{"type":"string","format":"date-time"},"in":"query","name":"occurredBefore","required":false,"description":"Admits the deliveries whose event happened at or before this instant."},{"schema":{"type":"string","pattern":"^webhook_endpoint_[0-9a-hjkmnp-tv-z]{24,}$"},"in":"path","name":"webhookEndpointId","required":true,"description":"Webhook endpoint to operate on."}],"security":[{"secretKey":[]},{"integrationToken":["invoices:test"]},{"integrationToken":["invoices:live"]},{"integrationToken":["payments:test"]},{"integrationToken":["payments:live"]},{"integrationToken":["refunds:test"]},{"integrationToken":["refunds:live"]}],"responses":{"200":{"description":"One page of deliveries for one webhook endpoint, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryListPage"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","collection_cursor_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["webhook_endpoint_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"listWebhookDeliveries"}},"/v1/webhook-endpoints/{webhookEndpointId}/replays":{"post":{"operationId":"replayWebhookEvents","summary":"Replay events to a webhook endpoint","tags":["webhooks"],"description":"Queues a new delivery for each selected event, up to 100. Each one repeats the original event id and is signed with a fresh webhook-timestamp, so a consumer that already applied the event does nothing.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplayWebhookEventsRequest"}}}},"parameters":[{"schema":{"type":"string","pattern":"^webhook_endpoint_[0-9a-hjkmnp-tv-z]{24,}$"},"in":"path","name":"webhookEndpointId","required":true,"description":"Webhook endpoint to operate on."},{"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x20-\\x7e]+$"},"in":"header","name":"idempotency-key","required":true}],"security":[{"secretKey":[]},{"integrationToken":["invoices:test"]},{"integrationToken":["invoices:live"]},{"integrationToken":["payments:test"]},{"integrationToken":["payments:live"]},{"integrationToken":["refunds:test"]},{"integrationToken":["refunds:live"]}],"responses":{"201":{"description":"A request to send stored events to one endpoint again. Each queued delivery repeats the original event id and is signed with a fresh webhook-timestamp.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookReplay"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing","request_body_malformed","webhook_replay_scope_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["webhook_endpoint_not_found","webhook_event_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["idempotency_key_reused","idempotency_request_in_progress","idempotency_key_expired","webhook_endpoint_deleted","webhook_endpoint_suspended"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"413":{"description":"The request body is larger than this endpoint accepts.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":413},"code":{"type":"string","enum":["request_body_too_large"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"415":{"description":"The request body carries a content type this endpoint does not accept.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":415},"code":{"type":"string","enum":["unsupported_media_type"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"required","x-timbro-retry":"retry_with_same_idempotency_key","x-timbro-recovery":"listWebhookDeliveries"}},"/v1/webhook-endpoints/{webhookEndpointId}/rotate-secret":{"post":{"operationId":"rotateWebhookEndpointSecret","summary":"Rotate the signing secret of a webhook endpoint","tags":["webhooks"],"description":"Issues a new signing secret, returned only in this response, and keeps the previous secret signing deliveries for 24 hours.","parameters":[{"schema":{"type":"string","pattern":"^webhook_endpoint_[0-9a-hjkmnp-tv-z]{24,}$"},"in":"path","name":"webhookEndpointId","required":true,"description":"Webhook endpoint to operate on."},{"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x20-\\x7e]+$"},"in":"header","name":"idempotency-key","required":true}],"security":[{"secretKey":[]},{"integrationToken":["invoices:test"]},{"integrationToken":["invoices:live"]},{"integrationToken":["payments:test"]},{"integrationToken":["payments:live"]},{"integrationToken":["refunds:test"]},{"integrationToken":["refunds:live"]}],"responses":{"200":{"description":"The endpoint and its new signing secret. Store the secret securely.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointWithSecret"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["webhook_endpoint_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["idempotency_key_reused","idempotency_request_in_progress","idempotency_key_expired","webhook_endpoint_deleted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"required","x-timbro-retry":"retry_with_same_idempotency_key","x-timbro-recovery":"retrieveWebhookEndpoint"}},"/v1/webhook-endpoints/{webhookEndpointId}/suspend":{"post":{"operationId":"suspendWebhookEndpoint","summary":"Suspend a webhook endpoint","tags":["webhooks"],"description":"Stops delivery attempts to this endpoint. Deliveries queued meanwhile wait for reactivation.","parameters":[{"schema":{"type":"string","pattern":"^webhook_endpoint_[0-9a-hjkmnp-tv-z]{24,}$"},"in":"path","name":"webhookEndpointId","required":true,"description":"Webhook endpoint to operate on."}],"security":[{"secretKey":[]},{"integrationToken":["invoices:test"]},{"integrationToken":["invoices:live"]},{"integrationToken":["payments:test"]},{"integrationToken":["payments:live"]},{"integrationToken":["refunds:test"]},{"integrationToken":["refunds:live"]}],"responses":{"200":{"description":"A merchant endpoint configured to receive authenticated domain events.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["webhook_endpoint_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["webhook_endpoint_deleted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveWebhookEndpoint"}},"/v1/webhook-endpoints/{webhookEndpointId}/reactivate":{"post":{"operationId":"reactivateWebhookEndpoint","summary":"Reactivate a suspended webhook endpoint","tags":["webhooks"],"description":"Resumes delivery attempts, starting with the deliveries queued meanwhile.","parameters":[{"schema":{"type":"string","pattern":"^webhook_endpoint_[0-9a-hjkmnp-tv-z]{24,}$"},"in":"path","name":"webhookEndpointId","required":true,"description":"Webhook endpoint to operate on."}],"security":[{"secretKey":[]},{"integrationToken":["invoices:test"]},{"integrationToken":["invoices:live"]},{"integrationToken":["payments:test"]},{"integrationToken":["payments:live"]},{"integrationToken":["refunds:test"]},{"integrationToken":["refunds:live"]}],"responses":{"200":{"description":"A merchant endpoint configured to receive authenticated domain events.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["webhook_endpoint_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["webhook_endpoint_deleted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveWebhookEndpoint"}},"/v1/api-keys/rotate":{"post":{"operationId":"rotateApiKey","summary":"Rotate the calling secret key","tags":["api-keys"],"description":"Issues a replacement for the calling secret key, returned only in this response, and keeps the calling key authenticating for 24 hours. Every other key is unchanged.","parameters":[{"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[\\x20-\\x7e]+$"},"in":"header","name":"idempotency-key","required":true}],"security":[{"secretKey":[]}],"responses":{"201":{"description":"The replacement for the calling secret key. Store it securely; it is never returned again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyWithSecret"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Idempotent-Replayed":{"$ref":"#/components/headers/IdempotentReplayed"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid","parameter_missing"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"409":{"description":"The request conflicts with the current state of the resource or with a previous request using the same Idempotency-Key.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":409},"code":{"type":"string","enum":["idempotency_key_reused","idempotency_request_in_progress","idempotency_key_expired","api_key_retired"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"domain_command","x-timbro-idempotency":"required","x-timbro-retry":"retry_with_same_idempotency_key","x-timbro-recovery":"rotateApiKey"}},"/v1/exchange-rates/{currency}":{"get":{"operationId":"retrieveExchangeRate","summary":"Retrieve the reference exchange rate","tags":["exchange-rates"],"description":"Answers the reference rate the Gateway uses for the date: the latest accepted observation dated from three days before the date up to the day before it. The date defaults to today in Santo Domingo.","parameters":[{"schema":{"type":"string","format":"date"},"in":"query","name":"date","required":false,"description":"The Santo Domingo date to price on. It cannot be in the future."},{"schema":{"type":"string","enum":["USD","EUR"]},"in":"path","name":"currency","required":true,"description":"The foreign currency, priced in Dominican pesos per one unit."}],"security":[{"secretKey":[]},{"integrationToken":["invoices:test"]},{"integrationToken":["invoices:live"]},{"integrationToken":["payments:test"]},{"integrationToken":["payments:live"]}],"responses":{"200":{"description":"The reference rate for a date: the latest accepted observation dated from three days before the date up to the day before it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeRateObservation"}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"description":"The request could not be understood.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":400},"code":{"type":"string","enum":["parameter_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"401":{"description":"The credential is missing, malformed, or no longer valid.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":401},"code":{"type":"string","enum":["api_key_missing","api_key_invalid","checkout_token_invalid","checkout_token_expired","integration_token_invalid"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"403":{"description":"The credential is valid but not permitted to perform this operation.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":403},"code":{"type":"string","enum":["operation_not_permitted"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"404":{"description":"No endpoint serves this method and path, or no resource with this identifier exists within the caller's scope.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":404},"code":{"type":"string","enum":["exchange_rate_not_found"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"The request could not complete. Recover by the retained resource reference or retry with the same command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":500},"code":{"type":"string","enum":["internal_error"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"A required service is temporarily unavailable. Retry with the same reference or command identity.","content":{"application/problem+json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Problem"},{"type":"object","required":["status","code"],"properties":{"status":{"type":"integer","const":503},"code":{"type":"string","enum":["exchange_rate_unavailable","integration_authorization_unavailable"],"description":"Stable machine-readable code. Branch on this, never on `title`."}}}]}}},"headers":{"request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"$ref":"#/components/headers/RetryAfter"}}}},"x-timbro-audience":["merchant"],"x-timbro-consequences":"read_resource","x-timbro-idempotency":"not_applicable","x-timbro-retry":"safe_to_retry","x-timbro-recovery":"retrieveExchangeRate"}}},"servers":[{"url":"https://api.timbro.do","description":"Production"}],"security":[{"secretKey":[]},{"adminKey":[]},{"integrationToken":[]},{"invoiceReceiptAccess":[]}],"tags":[{"name":"payments","description":"The one durable money object for one sale."},{"name":"refunds","description":"Durable full and partial refund requests, separate from fiscal notes."},{"name":"invoices","description":"Issue, retrieve, and download invoices independently of payments."},{"name":"received-documents","description":"Electronic fiscal documents suppliers issued to the business, and its commercial response to each."},{"name":"merchant-accounts","description":"Merchant-owned provider accounts and payment-method availability."},{"name":"business","description":"The business the credential selects: its capabilities, fiscal details, payments profile, and the requirements that remain. Also the RNC check that precedes any business."},{"name":"webhooks","description":"Signed asynchronous domain events for merchant systems."},{"name":"api-keys","description":"Rotation of the calling secret key."},{"name":"exchange-rates","description":"The reference exchange rate for foreign prices, and its operator corrections."}],"webhooks":{"subscription.canceled":{"post":{"summary":"Webhook: subscription.canceled","description":"Signed event notification. Verify the signature before applying business effects.","operationId":"subscriptionCanceledWebhook","x-timbro-audience":["merchant"],"x-timbro-consequences":"notification_only","x-timbro-retry":"consumer_must_deduplicate_by_webhook_id","security":[],"parameters":[{"in":"header","name":"webhook-id","required":true,"description":"Standard Webhooks message identifier. Equals the event id in the body and is the consumer's idempotency key.","schema":{"type":"string"}},{"in":"header","name":"webhook-timestamp","required":true,"description":"Unix seconds at which the delivery was signed. Reject a timestamp outside a five-minute tolerance.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"in":"header","name":"webhook-signature","required":true,"description":"Space-separated list of v1,<base64> HMAC-SHA256 signatures over <webhook-id>.<webhook-timestamp>.<raw-body>. Accept the delivery when any entry matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/=]+( v1,[A-Za-z0-9+/=]+)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionCanceledEvent"}}}},"responses":{"2XX":{"description":"The event was accepted."}}}},"subscription.status_changed":{"post":{"summary":"Webhook: subscription.status_changed","description":"Signed event notification. Verify the signature before applying business effects.","operationId":"subscriptionStatusChangedWebhook","x-timbro-audience":["merchant"],"x-timbro-consequences":"notification_only","x-timbro-retry":"consumer_must_deduplicate_by_webhook_id","security":[],"parameters":[{"in":"header","name":"webhook-id","required":true,"description":"Standard Webhooks message identifier. Equals the event id in the body and is the consumer's idempotency key.","schema":{"type":"string"}},{"in":"header","name":"webhook-timestamp","required":true,"description":"Unix seconds at which the delivery was signed. Reject a timestamp outside a five-minute tolerance.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"in":"header","name":"webhook-signature","required":true,"description":"Space-separated list of v1,<base64> HMAC-SHA256 signatures over <webhook-id>.<webhook-timestamp>.<raw-body>. Accept the delivery when any entry matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/=]+( v1,[A-Za-z0-9+/=]+)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscriptionStatusChangedEvent"}}}},"responses":{"2XX":{"description":"The event was accepted."}}}},"payment.succeeded":{"post":{"summary":"Webhook: payment.succeeded","description":"Signed event notification. Verify the signature before applying business effects.","operationId":"paymentSucceededWebhook","x-timbro-audience":["merchant"],"x-timbro-consequences":"notification_only","x-timbro-retry":"consumer_must_deduplicate_by_webhook_id","security":[],"parameters":[{"in":"header","name":"webhook-id","required":true,"description":"Standard Webhooks message identifier. Equals the event id in the body and is the consumer's idempotency key.","schema":{"type":"string"}},{"in":"header","name":"webhook-timestamp","required":true,"description":"Unix seconds at which the delivery was signed. Reject a timestamp outside a five-minute tolerance.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"in":"header","name":"webhook-signature","required":true,"description":"Space-separated list of v1,<base64> HMAC-SHA256 signatures over <webhook-id>.<webhook-timestamp>.<raw-body>. Accept the delivery when any entry matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/=]+( v1,[A-Za-z0-9+/=]+)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentSucceededEvent"}}}},"responses":{"2XX":{"description":"The event was accepted."}}}},"payment.declined":{"post":{"summary":"Webhook: payment.declined","description":"Signed event notification. Verify the signature before applying business effects.","operationId":"paymentDeclinedWebhook","x-timbro-audience":["merchant"],"x-timbro-consequences":"notification_only","x-timbro-retry":"consumer_must_deduplicate_by_webhook_id","security":[],"parameters":[{"in":"header","name":"webhook-id","required":true,"description":"Standard Webhooks message identifier. Equals the event id in the body and is the consumer's idempotency key.","schema":{"type":"string"}},{"in":"header","name":"webhook-timestamp","required":true,"description":"Unix seconds at which the delivery was signed. Reject a timestamp outside a five-minute tolerance.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"in":"header","name":"webhook-signature","required":true,"description":"Space-separated list of v1,<base64> HMAC-SHA256 signatures over <webhook-id>.<webhook-timestamp>.<raw-body>. Accept the delivery when any entry matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/=]+( v1,[A-Za-z0-9+/=]+)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentDeclinedEvent"}}}},"responses":{"2XX":{"description":"The event was accepted."}}}},"payment.canceled":{"post":{"summary":"Webhook: payment.canceled","description":"Signed event notification. Verify the signature before applying business effects.","operationId":"paymentCanceledWebhook","x-timbro-audience":["merchant"],"x-timbro-consequences":"notification_only","x-timbro-retry":"consumer_must_deduplicate_by_webhook_id","security":[],"parameters":[{"in":"header","name":"webhook-id","required":true,"description":"Standard Webhooks message identifier. Equals the event id in the body and is the consumer's idempotency key.","schema":{"type":"string"}},{"in":"header","name":"webhook-timestamp","required":true,"description":"Unix seconds at which the delivery was signed. Reject a timestamp outside a five-minute tolerance.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"in":"header","name":"webhook-signature","required":true,"description":"Space-separated list of v1,<base64> HMAC-SHA256 signatures over <webhook-id>.<webhook-timestamp>.<raw-body>. Accept the delivery when any entry matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/=]+( v1,[A-Za-z0-9+/=]+)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentCanceledEvent"}}}},"responses":{"2XX":{"description":"The event was accepted."}}}},"payment.expired":{"post":{"summary":"Webhook: payment.expired","description":"Signed event notification. Verify the signature before applying business effects.","operationId":"paymentExpiredWebhook","x-timbro-audience":["merchant"],"x-timbro-consequences":"notification_only","x-timbro-retry":"consumer_must_deduplicate_by_webhook_id","security":[],"parameters":[{"in":"header","name":"webhook-id","required":true,"description":"Standard Webhooks message identifier. Equals the event id in the body and is the consumer's idempotency key.","schema":{"type":"string"}},{"in":"header","name":"webhook-timestamp","required":true,"description":"Unix seconds at which the delivery was signed. Reject a timestamp outside a five-minute tolerance.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"in":"header","name":"webhook-signature","required":true,"description":"Space-separated list of v1,<base64> HMAC-SHA256 signatures over <webhook-id>.<webhook-timestamp>.<raw-body>. Accept the delivery when any entry matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/=]+( v1,[A-Za-z0-9+/=]+)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentExpiredEvent"}}}},"responses":{"2XX":{"description":"The event was accepted."}}}},"payment.operator_required":{"post":{"summary":"Webhook: payment.operator_required","description":"Signed event notification. Verify the signature before applying business effects.","operationId":"paymentOperatorRequiredWebhook","x-timbro-audience":["merchant"],"x-timbro-consequences":"notification_only","x-timbro-retry":"consumer_must_deduplicate_by_webhook_id","security":[],"parameters":[{"in":"header","name":"webhook-id","required":true,"description":"Standard Webhooks message identifier. Equals the event id in the body and is the consumer's idempotency key.","schema":{"type":"string"}},{"in":"header","name":"webhook-timestamp","required":true,"description":"Unix seconds at which the delivery was signed. Reject a timestamp outside a five-minute tolerance.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"in":"header","name":"webhook-signature","required":true,"description":"Space-separated list of v1,<base64> HMAC-SHA256 signatures over <webhook-id>.<webhook-timestamp>.<raw-body>. Accept the delivery when any entry matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/=]+( v1,[A-Za-z0-9+/=]+)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentOperatorRequiredEvent"}}}},"responses":{"2XX":{"description":"The event was accepted."}}}},"refund.succeeded":{"post":{"summary":"Webhook: refund.succeeded","description":"Signed event notification. Verify the signature before applying business effects.","operationId":"refundSucceededWebhook","x-timbro-audience":["merchant"],"x-timbro-consequences":"notification_only","x-timbro-retry":"consumer_must_deduplicate_by_webhook_id","security":[],"parameters":[{"in":"header","name":"webhook-id","required":true,"description":"Standard Webhooks message identifier. Equals the event id in the body and is the consumer's idempotency key.","schema":{"type":"string"}},{"in":"header","name":"webhook-timestamp","required":true,"description":"Unix seconds at which the delivery was signed. Reject a timestamp outside a five-minute tolerance.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"in":"header","name":"webhook-signature","required":true,"description":"Space-separated list of v1,<base64> HMAC-SHA256 signatures over <webhook-id>.<webhook-timestamp>.<raw-body>. Accept the delivery when any entry matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/=]+( v1,[A-Za-z0-9+/=]+)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundSucceededEvent"}}}},"responses":{"2XX":{"description":"The event was accepted."}}}},"refund.declined":{"post":{"summary":"Webhook: refund.declined","description":"Signed event notification. Verify the signature before applying business effects.","operationId":"refundDeclinedWebhook","x-timbro-audience":["merchant"],"x-timbro-consequences":"notification_only","x-timbro-retry":"consumer_must_deduplicate_by_webhook_id","security":[],"parameters":[{"in":"header","name":"webhook-id","required":true,"description":"Standard Webhooks message identifier. Equals the event id in the body and is the consumer's idempotency key.","schema":{"type":"string"}},{"in":"header","name":"webhook-timestamp","required":true,"description":"Unix seconds at which the delivery was signed. Reject a timestamp outside a five-minute tolerance.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"in":"header","name":"webhook-signature","required":true,"description":"Space-separated list of v1,<base64> HMAC-SHA256 signatures over <webhook-id>.<webhook-timestamp>.<raw-body>. Accept the delivery when any entry matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/=]+( v1,[A-Za-z0-9+/=]+)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundDeclinedEvent"}}}},"responses":{"2XX":{"description":"The event was accepted."}}}},"refund.operator_required":{"post":{"summary":"Webhook: refund.operator_required","description":"Signed event notification. Verify the signature before applying business effects.","operationId":"refundOperatorRequiredWebhook","x-timbro-audience":["merchant"],"x-timbro-consequences":"notification_only","x-timbro-retry":"consumer_must_deduplicate_by_webhook_id","security":[],"parameters":[{"in":"header","name":"webhook-id","required":true,"description":"Standard Webhooks message identifier. Equals the event id in the body and is the consumer's idempotency key.","schema":{"type":"string"}},{"in":"header","name":"webhook-timestamp","required":true,"description":"Unix seconds at which the delivery was signed. Reject a timestamp outside a five-minute tolerance.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"in":"header","name":"webhook-signature","required":true,"description":"Space-separated list of v1,<base64> HMAC-SHA256 signatures over <webhook-id>.<webhook-timestamp>.<raw-body>. Accept the delivery when any entry matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/=]+( v1,[A-Za-z0-9+/=]+)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundOperatorRequiredEvent"}}}},"responses":{"2XX":{"description":"The event was accepted."}}}},"refund.invoiceAttached":{"post":{"summary":"Webhook: refund.invoiceAttached","description":"Signed event notification. Verify the signature before applying business effects.","operationId":"refundInvoiceAttachedWebhook","x-timbro-audience":["merchant"],"x-timbro-consequences":"notification_only","x-timbro-retry":"consumer_must_deduplicate_by_webhook_id","security":[],"parameters":[{"in":"header","name":"webhook-id","required":true,"description":"Standard Webhooks message identifier. Equals the event id in the body and is the consumer's idempotency key.","schema":{"type":"string"}},{"in":"header","name":"webhook-timestamp","required":true,"description":"Unix seconds at which the delivery was signed. Reject a timestamp outside a five-minute tolerance.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"in":"header","name":"webhook-signature","required":true,"description":"Space-separated list of v1,<base64> HMAC-SHA256 signatures over <webhook-id>.<webhook-timestamp>.<raw-body>. Accept the delivery when any entry matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/=]+( v1,[A-Za-z0-9+/=]+)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundInvoiceAttachedEvent"}}}},"responses":{"2XX":{"description":"The event was accepted."}}}},"invoice.accepted":{"post":{"summary":"Webhook: invoice.accepted","description":"Signed event notification. Verify the signature before applying business effects.","operationId":"invoiceAcceptedWebhook","x-timbro-audience":["merchant"],"x-timbro-consequences":"notification_only","x-timbro-retry":"consumer_must_deduplicate_by_webhook_id","security":[],"parameters":[{"in":"header","name":"webhook-id","required":true,"description":"Standard Webhooks message identifier. Equals the event id in the body and is the consumer's idempotency key.","schema":{"type":"string"}},{"in":"header","name":"webhook-timestamp","required":true,"description":"Unix seconds at which the delivery was signed. Reject a timestamp outside a five-minute tolerance.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"in":"header","name":"webhook-signature","required":true,"description":"Space-separated list of v1,<base64> HMAC-SHA256 signatures over <webhook-id>.<webhook-timestamp>.<raw-body>. Accept the delivery when any entry matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/=]+( v1,[A-Za-z0-9+/=]+)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceWebhookEventEnvelope"}}}},"responses":{"2XX":{"description":"The event was accepted."}}}},"invoice.rejected":{"post":{"summary":"Webhook: invoice.rejected","description":"Signed event notification. Verify the signature before applying business effects.","operationId":"invoiceRejectedWebhook","x-timbro-audience":["merchant"],"x-timbro-consequences":"notification_only","x-timbro-retry":"consumer_must_deduplicate_by_webhook_id","security":[],"parameters":[{"in":"header","name":"webhook-id","required":true,"description":"Standard Webhooks message identifier. Equals the event id in the body and is the consumer's idempotency key.","schema":{"type":"string"}},{"in":"header","name":"webhook-timestamp","required":true,"description":"Unix seconds at which the delivery was signed. Reject a timestamp outside a five-minute tolerance.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"in":"header","name":"webhook-signature","required":true,"description":"Space-separated list of v1,<base64> HMAC-SHA256 signatures over <webhook-id>.<webhook-timestamp>.<raw-body>. Accept the delivery when any entry matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/=]+( v1,[A-Za-z0-9+/=]+)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceWebhookEventEnvelope"}}}},"responses":{"2XX":{"description":"The event was accepted."}}}},"invoice.operatorRequired":{"post":{"summary":"Webhook: invoice.operatorRequired","description":"Signed event notification. Verify the signature before applying business effects.","operationId":"invoiceOperatorRequiredWebhook","x-timbro-audience":["merchant"],"x-timbro-consequences":"notification_only","x-timbro-retry":"consumer_must_deduplicate_by_webhook_id","security":[],"parameters":[{"in":"header","name":"webhook-id","required":true,"description":"Standard Webhooks message identifier. Equals the event id in the body and is the consumer's idempotency key.","schema":{"type":"string"}},{"in":"header","name":"webhook-timestamp","required":true,"description":"Unix seconds at which the delivery was signed. Reject a timestamp outside a five-minute tolerance.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"in":"header","name":"webhook-signature","required":true,"description":"Space-separated list of v1,<base64> HMAC-SHA256 signatures over <webhook-id>.<webhook-timestamp>.<raw-body>. Accept the delivery when any entry matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/=]+( v1,[A-Za-z0-9+/=]+)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceWebhookEventEnvelope"}}}},"responses":{"2XX":{"description":"The event was accepted."}}}},"invoice.ready":{"post":{"summary":"Webhook: invoice.ready","description":"Signed event notification. Verify the signature before applying business effects.","operationId":"invoiceReadyWebhook","x-timbro-audience":["merchant"],"x-timbro-consequences":"notification_only","x-timbro-retry":"consumer_must_deduplicate_by_webhook_id","security":[],"parameters":[{"in":"header","name":"webhook-id","required":true,"description":"Standard Webhooks message identifier. Equals the event id in the body and is the consumer's idempotency key.","schema":{"type":"string"}},{"in":"header","name":"webhook-timestamp","required":true,"description":"Unix seconds at which the delivery was signed. Reject a timestamp outside a five-minute tolerance.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"in":"header","name":"webhook-signature","required":true,"description":"Space-separated list of v1,<base64> HMAC-SHA256 signatures over <webhook-id>.<webhook-timestamp>.<raw-body>. Accept the delivery when any entry matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/=]+( v1,[A-Za-z0-9+/=]+)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceWebhookEventEnvelope"}}}},"responses":{"2XX":{"description":"The event was accepted."}}}},"invoice.deliverySent":{"post":{"summary":"Webhook: invoice.deliverySent","description":"Signed event notification. Verify the signature before applying business effects.","operationId":"invoiceDeliverySentWebhook","x-timbro-audience":["merchant"],"x-timbro-consequences":"notification_only","x-timbro-retry":"consumer_must_deduplicate_by_webhook_id","security":[],"parameters":[{"in":"header","name":"webhook-id","required":true,"description":"Standard Webhooks message identifier. Equals the event id in the body and is the consumer's idempotency key.","schema":{"type":"string"}},{"in":"header","name":"webhook-timestamp","required":true,"description":"Unix seconds at which the delivery was signed. Reject a timestamp outside a five-minute tolerance.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"in":"header","name":"webhook-signature","required":true,"description":"Space-separated list of v1,<base64> HMAC-SHA256 signatures over <webhook-id>.<webhook-timestamp>.<raw-body>. Accept the delivery when any entry matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/=]+( v1,[A-Za-z0-9+/=]+)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceWebhookEventEnvelope"}}}},"responses":{"2XX":{"description":"The event was accepted."}}}},"invoice.deliveryFailed":{"post":{"summary":"Webhook: invoice.deliveryFailed","description":"Signed event notification. Verify the signature before applying business effects.","operationId":"invoiceDeliveryFailedWebhook","x-timbro-audience":["merchant"],"x-timbro-consequences":"notification_only","x-timbro-retry":"consumer_must_deduplicate_by_webhook_id","security":[],"parameters":[{"in":"header","name":"webhook-id","required":true,"description":"Standard Webhooks message identifier. Equals the event id in the body and is the consumer's idempotency key.","schema":{"type":"string"}},{"in":"header","name":"webhook-timestamp","required":true,"description":"Unix seconds at which the delivery was signed. Reject a timestamp outside a five-minute tolerance.","schema":{"type":"string","pattern":"^[0-9]+$"}},{"in":"header","name":"webhook-signature","required":true,"description":"Space-separated list of v1,<base64> HMAC-SHA256 signatures over <webhook-id>.<webhook-timestamp>.<raw-body>. Accept the delivery when any entry matches.","schema":{"type":"string","pattern":"^v1,[A-Za-z0-9+/=]+( v1,[A-Za-z0-9+/=]+)*$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceWebhookEventEnvelope"}}}},"responses":{"2XX":{"description":"The event was accepted."}}}}},"components":{"securitySchemes":{"secretKey":{"type":"http","scheme":"bearer","description":"Secret key. Server-side only."},"adminKey":{"type":"http","scheme":"bearer","description":"Administrator key. Server-side only."},"integrationToken":{"type":"oauth2","description":"Access token of an integration's machine client, such as an Odoo company, which authenticates with `private_key_jwt`. Request it with the `/v1` resource and the scopes of one mode; a token acts in that mode only.","flows":{"clientCredentials":{"tokenUrl":"https://api.timbro.do/v1/merchant_auth/oauth2/token","scopes":{"invoices:test":"Issue and read invoices, and read received documents in test mode.","invoices:live":"Issue and read invoices, and read received documents in live mode.","payments:test":"Create, read, and cancel payments and checkout tokens in test mode.","payments:live":"Create, read, and cancel payments and checkout tokens in live mode.","refunds:test":"Create and read refunds in test mode.","refunds:live":"Create and read refunds in live mode.","sequences:live":"Record the e-NCF sequences DGII granted the business in live mode."}}}},"invoiceReceiptAccess":{"type":"http","scheme":"bearer","description":"Server-side access token for one accepted Invoice receipt and its PDF. Grants no issuance, XML, or diagnostic authority."}},"schemas":{"AmountOnlySale":{"type":"object","required":["kind","reference","description","amount"],"properties":{"kind":{"type":"string","const":"amount_only"},"reference":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string","minLength":1,"maxLength":256},"amount":{"type":"object","required":["currency","value"],"properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"value":{"type":"string","pattern":"^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,2})?$"}},"additionalProperties":false}},"title":"AmountOnlySale","additionalProperties":false},"ApiKeyWithSecret":{"type":"object","required":["id","object","kind","capabilities","mode","name","secret","createdAt","retiredKeyExpiresAt"],"properties":{"id":{"type":"string","pattern":"^api_key_[0-9a-hjkmnp-tv-z]{24,}$","description":"API key identifier."},"object":{"type":"string","const":"api_key"},"kind":{"type":"string","const":"secret_key"},"capabilities":{"type":"array","items":{"anyOf":[{"type":"string","const":"payments"},{"type":"string","const":"invoices"}]},"uniqueItems":true},"mode":{"anyOf":[{"type":"string","const":"test"},{"type":"string","const":"live"}]},"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"secret":{"type":"string","pattern":"^sk_(?:test|live)_[A-Za-z0-9_-]+$","description":"The new secret key. Returned only when it is issued."},"createdAt":{"type":"string","format":"date-time"},"retiredKeyExpiresAt":{"type":"string","format":"date-time","description":"When the calling key this rotation replaced stops authenticating."}},"title":"ApiKeyWithSecret","description":"The replacement for the calling secret key. Store it securely; it is never returned again.","additionalProperties":false},"ApplePayPaymentMethodSummary":{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","const":"apple_pay"}},"title":"ApplePayPaymentMethodSummary","additionalProperties":false},"AttachInvoiceRequest":{"type":"object","required":["invoiceId"],"properties":{"invoiceId":{"type":"string","format":"uuid"},"receipt":{"$ref":"#/components/schemas/InvoiceReceiptCredential"}},"title":"AttachInvoiceRequest","description":"Associates an already accepted Invoice with a captured Payment. Supply a restricted receipt only when the Invoice belongs to an independent Source.","additionalProperties":false},"AttachRefundInvoiceRequest":{"type":"object","required":["invoiceId"],"properties":{"invoiceId":{"type":"string","format":"uuid","description":"The accepted E34 Invoice for this refund's original Invoice."},"receipt":{"type":"object","required":["id","accessToken"],"properties":{"id":{"type":"string","format":"uuid"},"accessToken":{"type":"string","minLength":43,"maxLength":43,"pattern":"^[A-Za-z0-9_-]{43}$"}},"additionalProperties":false}},"title":"AttachRefundInvoiceRequest","description":"Associates an accepted credit-note Invoice after verifying its original Invoice, issuer, environment, currency, and amount. An independent Source supplies its restricted receipt credential.","additionalProperties":false},"AutomaticInvoicing":{"type":"object","required":["type","mode"],"properties":{"type":{"type":"string","enum":["E31","E32","E45"]},"buyer":{"$ref":"#/components/schemas/PaymentInvoiceBuyerInput"},"recipientEmail":{"type":"string","format":"email","maxLength":254,"description":"Buyer email the Invoice is delivered to once issued."},"allowedTypes":{"type":"array","items":{"type":"string","enum":["E31","E32","E45"]},"minItems":1},"isTypeLocked":{"type":"boolean"},"isBuyerLocked":{"type":"boolean"},"governmentEligibility":{"$ref":"#/components/schemas/FiscalGovernmentEligibility"},"mode":{"type":"string","const":"automatic"},"invoiceReference":{"type":"string","minLength":1,"maxLength":128}},"title":"AutomaticInvoicing","additionalProperties":false},"BankAccountPaymentMethodSummary":{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","const":"bank_account"}},"title":"BankAccountPaymentMethodSummary","additionalProperties":false},"Breakdown":{"type":"object","required":["taxableBases","exemptMinorUnits","nonBillableMinorUnits","serviceCharges","taxesMinorUnits","fiscalDeclaredTotalMinorUnits","payableTotalMinorUnits"],"properties":{"taxableBases":{"type":"array","items":{"$ref":"#/components/schemas/BreakdownTaxableBase"}},"exemptMinorUnits":{"type":"integer","minimum":0},"nonBillableMinorUnits":{"type":"integer","minimum":0},"serviceCharges":{"type":"array","items":{"$ref":"#/components/schemas/BreakdownServiceCharge"}},"taxesMinorUnits":{"type":"integer","minimum":0},"fiscalDeclaredTotalMinorUnits":{"type":"integer","minimum":0,"description":"Fiscal declared total: taxable bases, taxes, exempt lines, and legal tip. Non-billable lines are excluded."},"payableTotalMinorUnits":{"type":"integer","minimum":0,"description":"Commercial payable total: fiscalDeclaredTotalMinorUnits plus nonBillableMinorUnits. This is the amount collected before a voluntary tip."},"groups":{"type":"array","items":{"$ref":"#/components/schemas/BreakdownGroup"}}},"title":"Breakdown","description":"Server-computed money composition. The invariant is payableTotalMinorUnits = fiscalDeclaredTotalMinorUnits + nonBillableMinorUnits; legal and voluntary tips are never double-counted.","additionalProperties":false},"BreakdownGroup":{"type":"object","required":["group","subtotalMinorUnits"],"properties":{"group":{"type":"string","minLength":1,"maxLength":64},"subtotalMinorUnits":{"type":"integer","minimum":0}},"title":"BreakdownGroup","additionalProperties":false},"BreakdownServiceCharge":{"type":"object","required":["kind","minorUnits"],"properties":{"kind":{"type":"string","enum":["propina_legal"]},"minorUnits":{"type":"integer","minimum":0}},"title":"BreakdownServiceCharge","additionalProperties":false},"BreakdownTaxableBase":{"type":"object","required":["taxTreatment","baseMinorUnits","taxMinorUnits"],"properties":{"taxTreatment":{"type":"string","enum":["itbis_18","itbis_16","zero_rated"]},"baseMinorUnits":{"type":"integer","minimum":0},"taxMinorUnits":{"type":"integer","minimum":0}},"title":"BreakdownTaxableBase","additionalProperties":false},"Business":{"type":"object","required":["object","id","rnc","legalName","economicActivity","revision","capabilities","fiscalDetails","paymentsProfile","paymentsProfileOrigin","invoicing","requirements","onboardingUrl"],"properties":{"object":{"type":"string","const":"business"},"id":{"type":"string","pattern":"^business_[0-9a-hjkmnp-tv-z]{24,}$"},"rnc":{"type":"string","pattern":"^[0-9]{9}$"},"legalName":{"type":"string","minLength":1},"economicActivity":{"anyOf":[{"type":"string","minLength":1,"maxLength":512},{"type":"null"}],"description":"The economic activity DGII registers for this RNC, as the Taxpayer Directory returned it when the business was claimed. Null when unknown, including a business claimed before the Directory returned it."},"revision":{"type":"integer","minimum":0},"capabilities":{"type":"object","required":["payments","invoices"],"properties":{"payments":{"type":"object","required":["requested","test","live"],"properties":{"requested":{"type":"boolean"},"test":{"type":"object","required":["status"],"properties":{"status":{"anyOf":[{"type":"string","const":"active"},{"type":"string","const":"pending"},{"type":"string","const":"inactive"},{"type":"string","const":"unavailable"}]}},"title":"BusinessCapabilityModeState","additionalProperties":false},"live":{"type":"object","required":["status"],"properties":{"status":{"anyOf":[{"type":"string","const":"active"},{"type":"string","const":"pending"},{"type":"string","const":"inactive"},{"type":"string","const":"unavailable"}]}},"title":"BusinessCapabilityModeState","additionalProperties":false}},"title":"BusinessCapabilityState","additionalProperties":false},"invoices":{"type":"object","required":["requested","test","live"],"properties":{"requested":{"type":"boolean"},"test":{"type":"object","required":["status"],"properties":{"status":{"anyOf":[{"type":"string","const":"active"},{"type":"string","const":"pending"},{"type":"string","const":"inactive"},{"type":"string","const":"unavailable"}]}},"title":"BusinessCapabilityModeState","additionalProperties":false},"live":{"type":"object","required":["status"],"properties":{"status":{"anyOf":[{"type":"string","const":"active"},{"type":"string","const":"pending"},{"type":"string","const":"inactive"},{"type":"string","const":"unavailable"}]}},"title":"BusinessCapabilityModeState","additionalProperties":false}},"title":"BusinessCapabilityState","additionalProperties":false}},"description":"Invoices `live.status` is `active` only when the live signing certificate is active and at least one e-CF type in `invoicing.live.documentTypes` is `ready`. An empty or unreadable list is never `active`; `requirements` with `mode: \"live\"` name what is missing.","additionalProperties":false},"fiscalDetails":{"type":"object","required":["commercialName","address","location","phone","email","defaultIncomeType"],"properties":{"commercialName":{"anyOf":[{"type":"string"},{"type":"null"}]},"address":{"anyOf":[{"type":"string"},{"type":"null"}]},"location":{"anyOf":[{"type":"object","required":["placeId","catalogReleaseId","municipalityCode","name","kind","qualityStatus","ancestors"],"properties":{"placeId":{"type":"string","pattern":"^place_[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"catalogReleaseId":{"type":"string","pattern":"^dr_[A-Za-z0-9._-]+$"},"municipalityCode":{"anyOf":[{"type":"string","pattern":"^[0-9]{6}$"},{"type":"null"}]},"name":{"type":"string","minLength":1,"maxLength":160},"kind":{"anyOf":[{"type":"string","const":"country"},{"type":"string","const":"region"},{"type":"string","const":"national_district"},{"type":"string","const":"province"},{"type":"string","const":"municipality"},{"type":"string","const":"municipal_district"},{"type":"string","const":"urban_zone"},{"type":"string","const":"section"},{"type":"string","const":"barrio"},{"type":"string","const":"paraje"},{"type":"string","const":"subbarrio"}]},"qualityStatus":{"anyOf":[{"type":"string","const":"verified"},{"type":"string","const":"provisional"},{"type":"string","const":"conflicted"}]},"ancestors":{"type":"array","items":{"type":"object","required":["placeId","name","kind","qualityStatus"],"properties":{"placeId":{"type":"string","pattern":"^place_[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"name":{"type":"string","minLength":1,"maxLength":160},"kind":{"anyOf":[{"type":"string","const":"country"},{"type":"string","const":"region"},{"type":"string","const":"national_district"},{"type":"string","const":"province"},{"type":"string","const":"municipality"},{"type":"string","const":"municipal_district"},{"type":"string","const":"urban_zone"},{"type":"string","const":"section"},{"type":"string","const":"barrio"},{"type":"string","const":"paraje"},{"type":"string","const":"subbarrio"}]},"qualityStatus":{"anyOf":[{"type":"string","const":"verified"},{"type":"string","const":"provisional"},{"type":"string","const":"conflicted"}]}},"additionalProperties":false},"maxItems":32,"description":"The places that contain the selected one, outermost first."}},"additionalProperties":false},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultIncomeType":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false},"paymentsProfile":{"anyOf":[{"$ref":"#/components/schemas/MerchantPaymentsProfile"},{"type":"null"}],"description":"The payer-facing profile in effect. While `paymentsProfileOrigin` is `derived` it follows the business: its commercial name or legal name, address, place, phone, and the owner's verified email. Once `confirmed`, the values are frozen exactly as saved and no longer follow the business; saving `paymentsProfile` again is the only way to change them. Null until the business facts derive one."},"paymentsProfileOrigin":{"anyOf":[{"anyOf":[{"type":"string","const":"derived"},{"type":"string","const":"confirmed"}]},{"type":"null"}],"description":"`derived` while the profile follows the business, which test payments accept. `confirmed` once the business saved the profile through `paymentsProfile` on update, which live payments require; its values are frozen. Null while there is no profile."},"invoicing":{"type":"object","required":["test","live"],"properties":{"test":{"$ref":"#/components/schemas/BusinessFiscalSetup"},"live":{"$ref":"#/components/schemas/BusinessLiveFiscalSetup"}},"additionalProperties":false},"requirements":{"type":"array","items":{"$ref":"#/components/schemas/BusinessRequirement"}},"onboardingUrl":{"type":"string","format":"uri"}},"title":"Business","description":"The business the credential selects, its capabilities, and the requirements that remain.","additionalProperties":false},"BusinessBindingBound":{"type":"object","required":["status","webhookSecret"],"properties":{"status":{"type":"string","const":"bound"},"webhookSecret":{"anyOf":[{"type":"string","const":"sealed"},{"type":"string","const":"pending"}]}},"title":"BusinessBindingBound","additionalProperties":false},"BusinessBindingConflict":{"type":"object","required":["status"],"properties":{"status":{"type":"string","const":"conflict"}},"title":"BusinessBindingConflict","additionalProperties":false},"BusinessBindingFailed":{"type":"object","required":["status"],"properties":{"status":{"type":"string","const":"failed"}},"title":"BusinessBindingFailed","additionalProperties":false},"BusinessBindingProvisioning":{"type":"object","required":["status"],"properties":{"status":{"type":"string","const":"provisioning"}},"title":"BusinessBindingProvisioning","additionalProperties":false},"BusinessBindingUnbound":{"type":"object","required":["status"],"properties":{"status":{"type":"string","const":"unbound"}},"title":"BusinessBindingUnbound","additionalProperties":false},"BusinessCertification":{"title":"BusinessCertification","description":"Durable certification preparation and user-reported DGII progress for the authenticated business. Nothing in it grants Live access.","oneOf":[{"$ref":"#/components/schemas/BusinessCertificationNotStarted"},{"$ref":"#/components/schemas/BusinessCertificationInProgress"}],"discriminator":{"propertyName":"status","mapping":{"not_started":"#/components/schemas/BusinessCertificationNotStarted","in_progress":"#/components/schemas/BusinessCertificationInProgress"}}},"BusinessCertificationEntryKitItem":{"type":"object","required":["code","state","action"],"properties":{"code":{"anyOf":[{"type":"string","const":"signing_certificate"},{"type":"string","const":"service_urls"},{"type":"string","const":"service_urls_in_dgii"},{"type":"string","const":"postulation_software"},{"type":"string","const":"postulation_provider"}]},"state":{"anyOf":[{"type":"string","const":"done"},{"type":"string","const":"todo"},{"type":"string","const":"not_needed"}]},"action":{"anyOf":[{"anyOf":[{"type":"string","const":"import_certificate"},{"type":"string","const":"copy_service_urls"},{"type":"string","const":"enter_service_urls_in_dgii"},{"type":"string","const":"confirm_software_with_dgii"},{"type":"string","const":"enter_postulation_provider_in_dgii"}]},{"type":"null"}]}},"title":"BusinessCertificationEntryKitItem","description":"One thing the current step needs from the business, with the action that completes it. service_urls_in_dgii asks for the receiver host in DGII's boxes at step 1, from step 7, and from step 12, and is done only after the business reports that step through Timbro. postulation_provider asks the business of an external_software certification to enter INDEXA SRL as the DGII provider in its postulation.","additionalProperties":false},"BusinessCertificationEvidence":{"type":"object","required":["id","outcome","verification","reference","createdAt"],"properties":{"id":{"type":"string","minLength":1},"outcome":{"anyOf":[{"type":"string","const":"submitted"},{"type":"string","const":"approved"},{"type":"string","const":"rejected"},{"type":"string","const":"needs_correction"}]},"verification":{"anyOf":[{"type":"string","const":"user_reported"}]},"reference":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"}},"title":"BusinessCertificationEvidence","description":"A business-reported DGII outcome. It stays user-reported: only a DGII answer Timbro observes can verify a step.","additionalProperties":false},"BusinessCertificationEvidenceRequest":{"type":"object","required":["expectedRevision","step","outcome"],"properties":{"expectedRevision":{"type":"integer","minimum":1},"step":{"anyOf":[{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3},{"type":"number","const":4},{"type":"number","const":5},{"type":"number","const":6},{"type":"number","const":7},{"type":"number","const":8},{"type":"number","const":9},{"type":"number","const":10},{"type":"number","const":11},{"type":"number","const":12},{"type":"number","const":13},{"type":"number","const":14},{"type":"number","const":15}]},"outcome":{"anyOf":[{"type":"string","const":"submitted"},{"type":"string","const":"approved"},{"type":"string","const":"rejected"},{"type":"string","const":"needs_correction"}]},"reference":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[^\\p{C}]*$"}},"title":"BusinessCertificationEvidenceRequest","additionalProperties":false},"BusinessCertificationInProgress":{"type":"object","required":["object","id","revision","status","path","software","dgiiProvider","phase","receiver","requirements","actions","progress","entryKit","steps"],"properties":{"object":{"type":"string","const":"business_certification"},"id":{"type":"string","pattern":"^cert_[a-z0-9]{24,}$"},"revision":{"type":"integer","minimum":1},"status":{"type":"string","const":"in_progress"},"path":{"anyOf":[{"type":"string","const":"own_software"},{"type":"string","const":"external_software"}]},"software":{"type":"object","required":["name","version"],"properties":{"name":{"type":"string","minLength":1,"maxLength":128},"version":{"type":"string","minLength":1,"maxLength":64}},"additionalProperties":false},"dgiiProvider":{"anyOf":[{"type":"object","required":["rnc","name"],"properties":{"rnc":{"type":"string","pattern":"^[0-9]{9}$"},"name":{"type":"string","minLength":1,"maxLength":128}},"additionalProperties":false},{"type":"null"}],"description":"The electronic-invoicing service provider DGII records for this business, which the business names in its postulation and which accepts the request in DGII's provider screens. Present on external_software, where every postulation names INDEXA SRL, and null on own_software. It is not the card acquirer."},"phase":{"anyOf":[{"type":"string","const":"preparation"},{"type":"string","const":"application"},{"type":"string","const":"tests"},{"type":"string","const":"authorization"}]},"receiver":{"type":"object","required":["host"],"properties":{"host":{"type":"string","minLength":1,"description":"Timbro's receiver address, written as DGII's boxes take it, for example ecf.timbro.do. The business enters it in Recepción, Aprobación comercial, and Autenticación, in the postulation and at steps 7 and 12."}},"description":"The one address DGII and other issuers reach the business at, in certification and in production.","additionalProperties":false},"requirements":{"type":"array","items":{"$ref":"#/components/schemas/BusinessCertificationRequirement"}},"actions":{"type":"array","items":{"anyOf":[{"type":"string","const":"report_evidence"},{"type":"string","const":"import_certificate"},{"type":"string","const":"upload_test_set"},{"type":"string","const":"start_production_reception"},{"type":"string","const":"sign_portal_document"},{"type":"string","const":"run_test_set"}]},"description":"What the caller can do now. `start_production_reception` appears when recording step 12 can ask Timbro to receive the business's documents in production: for an owner or an admin key, since that creates the production binding. `sign_portal_document` appears only when this deployment's Timbro signs DGII portal documents, the certification binding exists, and the caller confirms as itself: a person or an admin key, not an agent. `run_test_set` appears under the same conditions when this deployment's Timbro runs certification test sets."},"progress":{"anyOf":[{"$ref":"#/components/schemas/BusinessCertificationProgress"},{"type":"null"}]},"entryKit":{"type":"array","items":{"$ref":"#/components/schemas/BusinessCertificationEntryKitItem"},"maxItems":5},"steps":{"type":"array","items":{"$ref":"#/components/schemas/BusinessCertificationStep"},"minItems":15,"maxItems":15}},"title":"BusinessCertificationInProgress","additionalProperties":false},"BusinessCertificationInvoiceReadiness":{"type":"object","required":["object","status","documentTypes"],"properties":{"object":{"type":"string","const":"business_certification_invoice_readiness"},"status":{"anyOf":[{"type":"string","const":"available"},{"type":"string","const":"binding_required"},{"type":"string","const":"unavailable"}]},"documentTypes":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/DocumentTypeIssuanceReadiness"}},{"type":"null"}],"description":"Whether each e-CF type can be issued now in this environment, in type order, as Timbro reports it. Empty while the environment has no connected hosted binding; once bound, Timbro lists every e-CF type. `null` when Timbro's readiness could not be read; read the business again."}},"title":"BusinessCertificationInvoiceReadiness","additionalProperties":false},"BusinessCertificationNotStarted":{"type":"object","required":["object","status","requirements","availablePaths","recommendedPath","actions"],"properties":{"object":{"type":"string","const":"business_certification"},"status":{"type":"string","const":"not_started"},"requirements":{"type":"array","items":{"$ref":"#/components/schemas/BusinessCertificationRequirement"}},"availablePaths":{"type":"array","items":{"anyOf":[{"type":"string","const":"own_software"},{"type":"string","const":"external_software"}]},"minItems":1},"recommendedPath":{"anyOf":[{"type":"string","const":"own_software"},{"type":"string","const":"external_software"}]},"actions":{"type":"array","items":{"anyOf":[{"type":"string","const":"start"}]},"maxItems":1}},"title":"BusinessCertificationNotStarted","additionalProperties":false},"BusinessCertificationPortalDocumentSignature":{"type":"object","required":["object","id","kind","signedXmlBase64","sourceSha256","signedSha256","certificateSha256","signerSubjectSerialNumber","signedAt","confirmation"],"properties":{"object":{"type":"string","const":"business_certification_portal_document_signature"},"id":{"type":"string","pattern":"^certsign_[0-9a-z]{24}$"},"kind":{"anyOf":[{"type":"string","const":"postulation"},{"type":"string","const":"sworn_declaration"}]},"signedXmlBase64":{"type":"string","minLength":1,"description":"The signed document, base64-encoded, for upload in DGII's portal."},"sourceSha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"signedSha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"certificateSha256":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"SHA-256 of the DER certificate that signed."},"signerSubjectSerialNumber":{"type":"string","minLength":1},"signedAt":{"type":"string","format":"date-time"},"confirmation":{"type":"object","required":["statementVersion","language","statement","statementSha256","confirmedAt"],"properties":{"statementVersion":{"anyOf":[{"type":"string","const":"2026-10-13"}]},"language":{"anyOf":[{"type":"string","const":"es"},{"type":"string","const":"en"}]},"statement":{"type":"string","minLength":1},"statementSha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"confirmedAt":{"type":"string","format":"date-time"}},"additionalProperties":false}},"title":"BusinessCertificationPortalDocumentSignature","description":"A DGII certification portal document signed with the business's custodied certificate, with the confirmation recorded for it. Timbro does not submit it to DGII.","additionalProperties":false},"BusinessCertificationPortalDocumentSigningRequest":{"type":"object","required":["kind","xmlBase64","confirmation"],"properties":{"kind":{"anyOf":[{"type":"string","const":"postulation"},{"type":"string","const":"sworn_declaration"}]},"xmlBase64":{"type":"string","minLength":4,"maxLength":43692,"pattern":"^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$","description":"The XML file DGII's certification portal generated, base64-encoded byte for byte. At most 32 KiB before encoding."},"confirmation":{"type":"object","required":["statementVersion","language"],"properties":{"statementVersion":{"anyOf":[{"type":"string","const":"2026-10-13"}]},"language":{"anyOf":[{"type":"string","const":"es"},{"type":"string","const":"en"}]}},"description":"The statement the representative read and accepted for this one document. `{business}` is the business's legal name. Send a new Idempotency-Key for each confirmation. 2026-10-13, postulation, es: \"Firmo esta postulación como representante de {business} ante la DGII.\" 2026-10-13, postulation, en: \"I sign this application as the representative of {business} on record with DGII.\" 2026-10-13, sworn_declaration, es: \"Firmo esta declaración jurada como representante de {business} ante la DGII.\" 2026-10-13, sworn_declaration, en: \"I sign this sworn declaration as the representative of {business} on record with DGII.\"","additionalProperties":false}},"title":"BusinessCertificationPortalDocumentSigningRequest","additionalProperties":false},"BusinessCertificationProgress":{"type":"object","required":["dgiiStep","postulationSoftware","reportedAt"],"properties":{"dgiiStep":{"anyOf":[{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3},{"type":"number","const":4},{"type":"number","const":5},{"type":"number","const":6},{"type":"number","const":7},{"type":"number","const":8},{"type":"number","const":9},{"type":"number","const":10},{"type":"number","const":11},{"type":"number","const":12},{"type":"number","const":13},{"type":"number","const":14},{"type":"number","const":15}]},"postulationSoftware":{"anyOf":[{"type":"object","required":["kind"],"properties":{"kind":{"anyOf":[{"type":"string","const":"timbro"},{"type":"string","const":"other"},{"type":"string","const":"unknown"}]},"name":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\p{C}]*$"}},"description":"The software the business named in its DGII postulation. name is accepted only with kind other.","additionalProperties":false},{"type":"null"}]},"reportedAt":{"type":"string","format":"date-time"}},"title":"BusinessCertificationProgress","description":"The latest DGII step the business declared. Earlier steps count as done for sequencing and stay user-reported; a declaration never verifies a step or grants Live access.","additionalProperties":false},"BusinessCertificationProgressRequest":{"type":"object","required":["expectedRevision","dgiiStep"],"properties":{"expectedRevision":{"type":"integer","minimum":1},"dgiiStep":{"anyOf":[{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3},{"type":"number","const":4},{"type":"number","const":5},{"type":"number","const":6},{"type":"number","const":7},{"type":"number","const":8},{"type":"number","const":9},{"type":"number","const":10},{"type":"number","const":11},{"type":"number","const":12},{"type":"number","const":13},{"type":"number","const":14},{"type":"number","const":15}]},"postulationSoftware":{"type":"object","required":["kind"],"properties":{"kind":{"anyOf":[{"type":"string","const":"timbro"},{"type":"string","const":"other"},{"type":"string","const":"unknown"}]},"name":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[^\\p{C}]*$"}},"description":"The software the business named in its DGII postulation. name is accepted only with kind other.","additionalProperties":false}},"title":"BusinessCertificationProgressRequest","description":"The step the business's DGII certification portal shows. A lower step than the last declaration reports a DGII reset. Omitting postulationSoftware keeps the software last declared.","additionalProperties":false},"BusinessCertificationRequirement":{"type":"object","required":["code","owner","blocks"],"properties":{"code":{"anyOf":[{"type":"string","const":"invoices_not_requested"},{"type":"string","const":"fiscal_details_incomplete"},{"type":"string","const":"certification_binding_required"},{"type":"string","const":"certification_certificate_required"},{"type":"string","const":"provider_eligibility_unverified"},{"type":"string","const":"certification_test_set_processing_unavailable"},{"type":"string","const":"certification_provider_acceptance_pending"},{"type":"string","const":"production_reception_certificate_required"},{"type":"string","const":"production_reception_integration_required"},{"type":"string","const":"production_reception_held_elsewhere"},{"type":"string","const":"production_reception_not_started"},{"type":"string","const":"production_reception_owner_required"},{"type":"string","const":"production_reception_receiver_missing"},{"type":"string","const":"production_reception_operator_review"},{"type":"string","const":"production_reception_already_filed"}]},"owner":{"anyOf":[{"type":"string","const":"merchant"},{"type":"string","const":"dgii"},{"type":"string","const":"timbro"},{"type":"string","const":"operator"}]},"blocks":{"type":"array","items":{"anyOf":[{"type":"string","const":"start"},{"type":"string","const":"step_1"},{"type":"string","const":"step_2"},{"type":"string","const":"step_12"}]},"maxItems":4},"field":{"type":"string"}},"title":"BusinessCertificationRequirement","description":"What stands in the way, who resolves it, and which steps wait for it. From step 12, Timbro files the business's live deliveries in production; a production_reception requirement blocks step 12 until it does. Recording or declaring step 12 again retries when an owner or an admin key does it; one the operator owns waits for Timbro's team.","additionalProperties":false},"BusinessCertificationSequenceRegistration":{"type":"object","required":["object","status","verification","sequence"],"properties":{"object":{"type":"string","const":"business_certification_sequence_registration"},"status":{"type":"string","const":"recorded"},"verification":{"type":"string","const":"user_reported"},"sequence":{"type":"object","required":["documentType","firstNumber","lastNumber","nextNumber","expiresOn"],"properties":{"documentType":{"anyOf":[{"type":"string","const":"E31"},{"type":"string","const":"E32"},{"type":"string","const":"E33"},{"type":"string","const":"E34"},{"type":"string","const":"E41"},{"type":"string","const":"E43"},{"type":"string","const":"E44"},{"type":"string","const":"E45"},{"type":"string","const":"E46"},{"type":"string","const":"E47"}]},"firstNumber":{"type":"integer","minimum":1,"maximum":10000000,"description":"The first reported number."},"lastNumber":{"type":"integer","minimum":1,"maximum":10000000,"description":"The last reported number."},"nextNumber":{"type":"integer","minimum":1,"maximum":10000000,"description":"The next reported number."},"expiresOn":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}]}},"additionalProperties":false}},"title":"BusinessCertificationSequenceRegistration","additionalProperties":false},"BusinessCertificationSequenceRequest":{"type":"object","required":["documentType","firstNumber","lastNumber","nextNumber"],"properties":{"documentType":{"anyOf":[{"type":"string","const":"E31"},{"type":"string","const":"E32"},{"type":"string","const":"E33"},{"type":"string","const":"E34"},{"type":"string","const":"E41"},{"type":"string","const":"E43"},{"type":"string","const":"E44"},{"type":"string","const":"E45"},{"type":"string","const":"E46"},{"type":"string","const":"E47"}]},"firstNumber":{"type":"integer","minimum":1,"maximum":10000000,"description":"The first number shown in the DGII certification portal."},"lastNumber":{"type":"integer","minimum":1,"maximum":10000000,"description":"The last number shown in the DGII certification portal."},"nextNumber":{"type":"integer","minimum":1,"maximum":10000000,"description":"The next number not yet used, from `firstNumber` to `lastNumber`. Choose one not already used in this certification process."},"expiresOn":{"anyOf":[{"type":"string","format":"date","description":"The reported sequence expiry date. E32 and E34 have no expiry date."},{"type":"null"}]}},"title":"BusinessCertificationSequenceRequest","description":"A sequence the business reports from the DGII certification portal. Timbro records it as reported and does not treat the input as DGII-verified authorization.","additionalProperties":false},"BusinessCertificationStartRequest":{"type":"object","required":["path"],"properties":{"path":{"anyOf":[{"type":"string","const":"own_software"},{"type":"string","const":"external_software"}]}},"title":"BusinessCertificationStartRequest","additionalProperties":false},"BusinessCertificationStep":{"type":"object","required":["number","code","title","actor","status","basis","evidence"],"properties":{"number":{"anyOf":[{"type":"number","const":1},{"type":"number","const":2},{"type":"number","const":3},{"type":"number","const":4},{"type":"number","const":5},{"type":"number","const":6},{"type":"number","const":7},{"type":"number","const":8},{"type":"number","const":9},{"type":"number","const":10},{"type":"number","const":11},{"type":"number","const":12},{"type":"number","const":13},{"type":"number","const":14},{"type":"number","const":15}]},"code":{"type":"string","minLength":1},"title":{"type":"string","minLength":1},"actor":{"anyOf":[{"type":"string","const":"merchant"},{"type":"string","const":"dgii"},{"type":"string","const":"timbro"}]},"status":{"anyOf":[{"type":"string","const":"blocked"},{"type":"string","const":"action_required"},{"type":"string","const":"awaiting_dgii"},{"type":"string","const":"reported"},{"type":"string","const":"verified"}]},"basis":{"anyOf":[{"anyOf":[{"type":"string","const":"timbro_executed"},{"type":"string","const":"declared_progress"},{"type":"string","const":"business_report"},{"type":"string","const":"service_observed"}]},{"type":"null"}]},"evidence":{"type":"array","items":{"$ref":"#/components/schemas/BusinessCertificationEvidence"}}},"title":"BusinessCertificationStep","description":"One official DGII step. basis names the source of its status: declared_progress for a step below the declared DGII step, business_report for a reported outcome, and null when nothing is recorded.","additionalProperties":false},"BusinessCertificationTestRun":{"type":"object","required":["object","id","attemptReference","kind","testSetId","status","failureMessage","createdAt","completedAt","counts","cases","refusal","consumerInvoices"],"properties":{"object":{"type":"string","const":"certification_test_run"},"id":{"type":"string","format":"uuid"},"attemptReference":{"type":"string","minLength":1},"kind":{"anyOf":[{"type":"string","const":"ecf"},{"type":"string","const":"acecf"}]},"testSetId":{"type":"string","format":"uuid"},"status":{"anyOf":[{"type":"string","const":"running"},{"type":"string","const":"accepted"},{"type":"string","const":"rejected"},{"type":"string","const":"failed"},{"type":"string","const":"refused"}]},"failureMessage":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"counts":{"type":"array","items":{"type":"object","required":["documentType","total","accepted","rejected"],"properties":{"documentType":{"type":"string","description":"An e-CF type from 31 to 47, `RFCE`, or `ACECF`."},"total":{"type":"integer","minimum":0},"accepted":{"type":"integer","minimum":0},"rejected":{"type":"integer","minimum":0}},"additionalProperties":false}},"cases":{"type":"array","items":{"type":"object","required":["sourceRow","caseLabel","documentType","eNcf","status","dgiiMessage"],"properties":{"sourceRow":{"type":"integer","minimum":1,"description":"The workbook row the case came from."},"caseLabel":{"anyOf":[{"type":"string"},{"type":"null"}]},"documentType":{"type":"string"},"eNcf":{"type":"string"},"status":{"anyOf":[{"type":"string","const":"pending"},{"type":"string","const":"sent"},{"type":"string","const":"accepted"},{"type":"string","const":"rejected"},{"type":"string","const":"unknown"}]},"dgiiMessage":{"anyOf":[{"type":"string"},{"type":"null","description":"DGII's text for a rejected case; null otherwise."}]}},"additionalProperties":false}},"refusal":{"anyOf":[{"type":"object","required":["code","sheet","row","column"],"properties":{"code":{"type":"string"},"sheet":{"anyOf":[{"type":"string"},{"type":"null"}]},"row":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]},"column":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"consumerInvoices":{"type":"array","items":{"type":"object","required":["eNcf","sourceRow"],"properties":{"eNcf":{"type":"string"},"sourceRow":{"type":"integer","minimum":1}},"additionalProperties":false}}},"title":"BusinessCertificationTestRun","description":"One run of a retained DGII test workbook. Timbro signs each case with the business's custodied certificate and sends it to DGII in workbook order, and stops at the first rejection. `refused` means the workbook could not be built into documents and nothing was sent; `refusal` names the sheet, row, and column, never the cell text. `consumerInvoices` lists the signed consumer invoices (E32) to upload in DGII's portal box for step 2, and is empty for `acecf`. A run is evidence, not a DGII decision: it never changes a step's status.","additionalProperties":false},"BusinessCertificationTestRunRequest":{"type":"object","required":["kind","testSetId","confirmation"],"properties":{"kind":{"anyOf":[{"type":"string","const":"ecf"},{"type":"string","const":"acecf"}]},"testSetId":{"type":"string","format":"uuid","description":"The `id` of the retained workbook the representative saw. If a newer workbook of that kind has replaced it, the operation answers `business_certification_test_set_changed` and runs nothing."},"confirmation":{"type":"object","required":["statementVersion","language"],"properties":{"statementVersion":{"anyOf":[{"type":"string","const":"2026-10-21"}]},"language":{"anyOf":[{"type":"string","const":"es"},{"type":"string","const":"en"}]}},"description":"The statement the representative read and accepted for this workbook. `{business}` is the business's legal name. Send a new Idempotency-Key for each confirmation. 2026-10-21, es: \"Autorizo a Timbro a firmar con el certificado digital de {business} y a enviar a la DGII los casos de prueba de este archivo.\" 2026-10-21, en: \"I authorize Timbro to sign with {business}'s digital certificate and send the test cases in this file to DGII.\"","additionalProperties":false}},"title":"BusinessCertificationTestRunRequest","additionalProperties":false},"BusinessConfigureInvoicingRequest":{"type":"object","required":["mode"],"properties":{"mode":{"anyOf":[{"type":"string","const":"test"},{"type":"string","const":"live"}]}},"title":"BusinessConfigureInvoicingRequest","additionalProperties":false},"BusinessConfigureInvoicingResponse":{"type":"object","required":["object","mode"],"properties":{"object":{"type":"string","const":"business_invoicing_setup"},"mode":{"anyOf":[{"type":"string","const":"test"},{"type":"string","const":"live"}]}},"title":"BusinessConfigureInvoicingResponse","additionalProperties":false},"BusinessFiscalBinding":{"title":"BusinessFiscalBinding","description":"The Timbro Organization, Legal issuer, Source connection, and webhook.","oneOf":[{"$ref":"#/components/schemas/BusinessBindingUnbound"},{"$ref":"#/components/schemas/BusinessBindingProvisioning"},{"$ref":"#/components/schemas/BusinessBindingBound"},{"$ref":"#/components/schemas/BusinessBindingFailed"},{"$ref":"#/components/schemas/BusinessBindingConflict"}],"discriminator":{"propertyName":"status","mapping":{"unbound":"#/components/schemas/BusinessBindingUnbound","provisioning":"#/components/schemas/BusinessBindingProvisioning","bound":"#/components/schemas/BusinessBindingBound","failed":"#/components/schemas/BusinessBindingFailed","conflict":"#/components/schemas/BusinessBindingConflict"}}},"BusinessFiscalSetup":{"anyOf":[{"$ref":"#/components/schemas/BusinessFiscalSetupUnavailable"},{"$ref":"#/components/schemas/BusinessFiscalSetupAvailable"}],"title":"BusinessFiscalSetup","description":"Timbro's view of electronic invoicing provisioning, or why it cannot be read."},"BusinessFiscalSetupAvailable":{"type":"object","required":["status","binding","legalIssuer","signingCertificate","testFiscalDocument","documentTypes"],"properties":{"status":{"type":"string","const":"available"},"binding":{"$ref":"#/components/schemas/BusinessFiscalBinding"},"legalIssuer":{"$ref":"#/components/schemas/BusinessLegalIssuer"},"signingCertificate":{"$ref":"#/components/schemas/BusinessSigningCertificate"},"testFiscalDocument":{"$ref":"#/components/schemas/BusinessTestFiscalDocument"},"documentTypes":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/DocumentTypeIssuanceReadiness"}},{"type":"null"}],"description":"Whether each e-CF type can be issued now in this environment, in type order, as Timbro reports it. Empty while the environment has no connected hosted binding; once bound, Timbro lists every e-CF type. `null` when Timbro's readiness could not be read; read the business again."}},"title":"BusinessFiscalSetupAvailable","additionalProperties":false},"BusinessFiscalSetupUnavailable":{"type":"object","required":["status","cause"],"properties":{"status":{"type":"string","const":"unavailable"},"cause":{"type":"string","const":"timbro_unreachable"}},"title":"BusinessFiscalSetupUnavailable","additionalProperties":false},"BusinessLegalIssuer":{"title":"BusinessLegalIssuer","description":"Whether Timbro holds every profile field the hosted Legal issuer requires.","oneOf":[{"$ref":"#/components/schemas/BusinessLegalIssuerMissing"},{"$ref":"#/components/schemas/BusinessLegalIssuerIncomplete"},{"$ref":"#/components/schemas/BusinessLegalIssuerComplete"}],"discriminator":{"propertyName":"status","mapping":{"missing":"#/components/schemas/BusinessLegalIssuerMissing","incomplete":"#/components/schemas/BusinessLegalIssuerIncomplete","complete":"#/components/schemas/BusinessLegalIssuerComplete"}}},"BusinessLegalIssuerComplete":{"type":"object","required":["status"],"properties":{"status":{"type":"string","const":"complete"}},"title":"BusinessLegalIssuerComplete","additionalProperties":false},"BusinessLegalIssuerIncomplete":{"type":"object","required":["status"],"properties":{"status":{"type":"string","const":"incomplete"}},"title":"BusinessLegalIssuerIncomplete","additionalProperties":false},"BusinessLegalIssuerMissing":{"type":"object","required":["status"],"properties":{"status":{"type":"string","const":"missing"}},"title":"BusinessLegalIssuerMissing","additionalProperties":false},"BusinessLiveFiscalSetup":{"anyOf":[{"$ref":"#/components/schemas/BusinessFiscalSetupUnavailable"},{"$ref":"#/components/schemas/BusinessLiveFiscalSetupAvailable"}],"title":"BusinessLiveFiscalSetup","description":"Production binding and custody facts. These do not establish DGII production qualification."},"BusinessLiveFiscalSetupAvailable":{"type":"object","required":["status","binding","legalIssuer","signingCertificate","documentTypes","sequences"],"properties":{"status":{"type":"string","const":"available"},"binding":{"$ref":"#/components/schemas/BusinessFiscalBinding"},"legalIssuer":{"$ref":"#/components/schemas/BusinessLegalIssuer"},"signingCertificate":{"$ref":"#/components/schemas/BusinessSigningCertificate"},"documentTypes":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/DocumentTypeIssuanceReadiness"}},{"type":"null"}],"description":"Whether each e-CF type can be issued now in this environment, in type order, as Timbro reports it. Empty while the environment has no connected hosted binding; once bound, Timbro lists every e-CF type. `null` when Timbro's readiness could not be read; read the business again."},"sequences":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/BusinessSequence"}},{"type":"null"}],"description":"The sequences the business recorded for live invoicing, by e-CF type and first number. `null` when the caller is not an owner or administrator, or when Timbro could not be read."}},"title":"BusinessLiveFiscalSetupAvailable","additionalProperties":false},"BusinessRequirement":{"type":"object","required":["code","owner","blocks"],"properties":{"code":{"anyOf":[{"type":"string","const":"capabilities_required"},{"type":"string","const":"commercial_name_required"},{"type":"string","const":"address_required"},{"type":"string","const":"location_required"},{"type":"string","const":"phone_required"},{"type":"string","const":"default_income_type_required"},{"type":"string","const":"contact_email_verification_required"},{"type":"string","const":"fiscal_details_rejected"},{"type":"string","const":"taxpayer_registration_required"},{"type":"string","const":"signing_certificate_required"},{"type":"string","const":"signing_certificate_expiring"},{"type":"string","const":"legal_issuer_profile_required"},{"type":"string","const":"sequence_required"},{"type":"string","const":"sequence_confirmation_pending"},{"type":"string","const":"test_fiscal_document_rejected"},{"type":"string","const":"test_fiscal_document_pending"},{"type":"string","const":"test_fiscal_document_send_pending"},{"type":"string","const":"fiscal_binding_pending"},{"type":"string","const":"legal_issuer_sync_pending"},{"type":"string","const":"fiscal_setup_unavailable"},{"type":"string","const":"fiscal_binding_conflict"},{"type":"string","const":"fiscal_issuer_rejected"},{"type":"string","const":"test_fiscal_document_operator_required"},{"type":"string","const":"checkout_display_confirmation_required"},{"type":"string","const":"test_payments_unavailable"},{"type":"string","const":"merchant_account_required"},{"type":"string","const":"merchant_account_selection_required"},{"type":"string","const":"merchant_account_disabled"},{"type":"string","const":"active_credential_required"},{"type":"string","const":"credential_material_invalid"},{"type":"string","const":"test_live_mode_mismatch"},{"type":"string","const":"callback_configuration_failed"},{"type":"string","const":"callback_configuration_required"},{"type":"string","const":"connectivity_check_failed"},{"type":"string","const":"connectivity_check_required"},{"type":"string","const":"provider_qualification_failed"},{"type":"string","const":"provider_qualification_required"},{"type":"string","const":"provider_adapter_unavailable"}]},"owner":{"anyOf":[{"type":"string","const":"merchant"},{"type":"string","const":"dgii"},{"type":"string","const":"timbro"},{"type":"string","const":"provider"},{"type":"string","const":"operator"}]},"blocks":{"type":"array","items":{"anyOf":[{"type":"string","const":"payments"},{"type":"string","const":"invoices"}]},"maxItems":2},"mode":{"anyOf":[{"type":"string","const":"test"},{"type":"string","const":"live"}]},"documentTypes":{"type":"array","items":{"anyOf":[{"type":"string","const":"E31"},{"type":"string","const":"E32"},{"type":"string","const":"E33"},{"type":"string","const":"E34"},{"type":"string","const":"E41"},{"type":"string","const":"E43"},{"type":"string","const":"E44"},{"type":"string","const":"E45"},{"type":"string","const":"E46"},{"type":"string","const":"E47"}]},"minItems":1,"description":"The e-CF types this requirement keeps from being issued, in type order. Absent when it applies to the whole environment."},"field":{"type":"string","description":"JSON Pointer into this representation the requirement names."},"errors":{"type":"array","items":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}},"additionalProperties":false},"minItems":1}},"title":"BusinessRequirement","description":"One thing that must happen before a capability is active, and who acts on it. While a capability is active, a requirement it would otherwise block blocks nothing and is a warning. Live invoicing lists at most one requirement per reason class (`legal_issuer_profile_required`, `signing_certificate_required`, `sequence_required`, `sequence_confirmation_pending`), each with the e-CF `documentTypes` it affects. When Timbro refused the live Legal issuer profile, the first entry is `fiscal_details_rejected` instead, with `field` `/fiscalDetails`. The `merchant` owns all but `sequence_confirmation_pending`, which waits on `dgii`. `default_income_type_required` is deprecated and no longer returned: an invoicing business without a stored income type reads `01`.","additionalProperties":false},"BusinessRncVerification":{"type":"object","required":["rnc","legalName"],"properties":{"rnc":{"type":"string","pattern":"^\\d{9}$"},"legalName":{"type":"string","minLength":1,"maxLength":256}},"title":"BusinessRncVerification","description":"The Directory-owned legal identity for a verified RNC.","additionalProperties":false},"BusinessRncVerificationRequest":{"type":"object","required":["rnc"],"properties":{"rnc":{"type":"string","pattern":"^\\d{9}$","description":"The nine-digit RNC to verify against the active DGII directory snapshot."}},"title":"BusinessRncVerificationRequest","description":"A request to verify an RNC before any business exists.","additionalProperties":false},"BusinessSequence":{"type":"object","required":["documentType","firstNumber","lastNumber","nextNumber","expiresOn"],"properties":{"documentType":{"anyOf":[{"type":"string","const":"E31"},{"type":"string","const":"E32"},{"type":"string","const":"E33"},{"type":"string","const":"E34"},{"type":"string","const":"E41"},{"type":"string","const":"E43"},{"type":"string","const":"E44"},{"type":"string","const":"E45"},{"type":"string","const":"E46"},{"type":"string","const":"E47"}]},"firstNumber":{"type":"integer","minimum":1,"maximum":9999999999,"description":"The first number DGII granted."},"lastNumber":{"type":"integer","minimum":1,"maximum":9999999999,"description":"The last number DGII granted."},"nextNumber":{"anyOf":[{"type":"integer","minimum":1,"maximum":9999999999,"description":"The next number that was unused when the business recorded the sequence, or `null` once every number is used. Timbro moves on from there as it issues; `documentTypes` reports how many numbers remain."},{"type":"null"}]},"expiresOn":{"anyOf":[{"type":"string","format":"date","description":"The day the sequence expires, or `null` for E32 and E34, which never expire."},{"type":"null"}]}},"title":"BusinessSequence","description":"An e-NCF sequence the business recorded from DGII's Oficina Virtual, as recorded. DGII's answers confirm it; `documentTypes[].numbering.confirmation` and `sequence_rejected_by_dgii` report that.","additionalProperties":false},"BusinessSequenceRequest":{"type":"object","required":["documentType","firstNumber","lastNumber"],"properties":{"documentType":{"anyOf":[{"type":"string","const":"E31"},{"type":"string","const":"E32"},{"type":"string","const":"E33"},{"type":"string","const":"E34"},{"type":"string","const":"E41"},{"type":"string","const":"E43"},{"type":"string","const":"E44"},{"type":"string","const":"E45"},{"type":"string","const":"E46"},{"type":"string","const":"E47"}]},"firstNumber":{"type":"integer","minimum":1,"maximum":9999999999,"description":"The first number of the sequence DGII granted."},"lastNumber":{"type":"integer","minimum":1,"maximum":9999999999,"description":"The last number of the sequence DGII granted."},"nextNumber":{"type":"integer","minimum":1,"maximum":9999999999,"description":"The next number not yet used, from `firstNumber` to `lastNumber`. Defaults to `firstNumber`; send it when another system already used numbers from this sequence."},"expiresOn":{"anyOf":[{"type":"string","format":"date","description":"The day DGII shows the sequence expires. Required, and not before today in the Dominican Republic, except for E32 and E34, which never expire and take no date."},{"type":"null"}]}},"title":"BusinessSequenceRequest","description":"An e-NCF sequence DGII granted the business in its Oficina Virtual, to use for live invoicing. Recording the same first and last number again, or a sequence DGII has not confirmed, replaces it.","additionalProperties":false},"BusinessSigningCertificate":{"title":"BusinessSigningCertificate","description":"The certificate Timbro's custody holds for the Legal issuer.","oneOf":[{"$ref":"#/components/schemas/BusinessSigningCertificateMissing"},{"$ref":"#/components/schemas/BusinessSigningCertificateActive"}],"discriminator":{"propertyName":"status","mapping":{"missing":"#/components/schemas/BusinessSigningCertificateMissing","active":"#/components/schemas/BusinessSigningCertificateActive"}}},"BusinessSigningCertificateActive":{"type":"object","required":["status","sha256","signerSerialNumber","notBefore","notAfter"],"properties":{"status":{"type":"string","const":"active"},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"signerSerialNumber":{"type":"string","minLength":1},"notBefore":{"type":"string","format":"date-time"},"notAfter":{"type":"string","format":"date-time"}},"title":"BusinessSigningCertificateActive","additionalProperties":false},"BusinessSigningCertificateMissing":{"type":"object","required":["status"],"properties":{"status":{"type":"string","const":"missing"}},"title":"BusinessSigningCertificateMissing","additionalProperties":false},"BusinessSigningCertificateRequest":{"type":"object","required":["certificateP12Base64","password"],"properties":{"certificateP12Base64":{"type":"string","minLength":24,"maxLength":200000},"password":{"type":"string","minLength":1,"maxLength":256}},"title":"BusinessSigningCertificateRequest","additionalProperties":false},"BusinessTestFiscalDocument":{"title":"BusinessTestFiscalDocument","description":"The TesteCF document DGII must accept for this RNC and certificate.","oneOf":[{"$ref":"#/components/schemas/BusinessTestFiscalDocumentNotSent"},{"$ref":"#/components/schemas/BusinessTestFiscalDocumentProcessing"},{"$ref":"#/components/schemas/BusinessTestFiscalDocumentAccepted"},{"$ref":"#/components/schemas/BusinessTestFiscalDocumentRejected"},{"$ref":"#/components/schemas/BusinessTestFiscalDocumentOperatorRequired"}],"discriminator":{"propertyName":"status","mapping":{"not_sent":"#/components/schemas/BusinessTestFiscalDocumentNotSent","processing":"#/components/schemas/BusinessTestFiscalDocumentProcessing","accepted":"#/components/schemas/BusinessTestFiscalDocumentAccepted","rejected":"#/components/schemas/BusinessTestFiscalDocumentRejected","operator_required":"#/components/schemas/BusinessTestFiscalDocumentOperatorRequired"}}},"BusinessTestFiscalDocumentAccepted":{"type":"object","required":["status","id","documentType"],"properties":{"status":{"type":"string","const":"accepted"},"id":{"type":"string","minLength":1},"documentType":{"anyOf":[{"type":"string","const":"31"},{"type":"string","const":"32"},{"type":"string","const":"33"},{"type":"string","const":"34"},{"type":"string","const":"41"},{"type":"string","const":"43"},{"type":"string","const":"44"},{"type":"string","const":"45"},{"type":"string","const":"46"},{"type":"string","const":"47"}]}},"title":"BusinessTestFiscalDocumentAccepted","additionalProperties":false},"BusinessTestFiscalDocumentNotSent":{"type":"object","required":["status"],"properties":{"status":{"type":"string","const":"not_sent"}},"title":"BusinessTestFiscalDocumentNotSent","additionalProperties":false},"BusinessTestFiscalDocumentOperatorRequired":{"type":"object","required":["status","id","documentType"],"properties":{"status":{"type":"string","const":"operator_required"},"id":{"type":"string","minLength":1},"documentType":{"anyOf":[{"type":"string","const":"31"},{"type":"string","const":"32"},{"type":"string","const":"33"},{"type":"string","const":"34"},{"type":"string","const":"41"},{"type":"string","const":"43"},{"type":"string","const":"44"},{"type":"string","const":"45"},{"type":"string","const":"46"},{"type":"string","const":"47"}]}},"title":"BusinessTestFiscalDocumentOperatorRequired","additionalProperties":false},"BusinessTestFiscalDocumentProcessing":{"type":"object","required":["status","id","documentType"],"properties":{"status":{"type":"string","const":"processing"},"id":{"type":"string","minLength":1},"documentType":{"anyOf":[{"type":"string","const":"31"},{"type":"string","const":"32"},{"type":"string","const":"33"},{"type":"string","const":"34"},{"type":"string","const":"41"},{"type":"string","const":"43"},{"type":"string","const":"44"},{"type":"string","const":"45"},{"type":"string","const":"46"},{"type":"string","const":"47"}]}},"title":"BusinessTestFiscalDocumentProcessing","additionalProperties":false},"BusinessTestFiscalDocumentRejected":{"type":"object","required":["status","id","documentType","reason","messages"],"properties":{"status":{"type":"string","const":"rejected"},"id":{"type":"string","minLength":1},"documentType":{"anyOf":[{"type":"string","const":"31"},{"type":"string","const":"32"},{"type":"string","const":"33"},{"type":"string","const":"34"},{"type":"string","const":"41"},{"type":"string","const":"43"},{"type":"string","const":"44"},{"type":"string","const":"45"},{"type":"string","const":"46"},{"type":"string","const":"47"}]},"reason":{"anyOf":[{"type":"string","const":"timbro_rejected"},{"type":"string","const":"authority_rejected"}]},"messages":{"type":"array","items":{"type":"string"}}},"title":"BusinessTestFiscalDocumentRejected","additionalProperties":false},"BusinessTestFiscalDocumentRequest":{"type":"object","properties":{"documentType":{"anyOf":[{"type":"string","const":"31"},{"type":"string","const":"32"},{"type":"string","const":"41"},{"type":"string","const":"43"},{"type":"string","const":"44"},{"type":"string","const":"45"},{"type":"string","const":"46"},{"type":"string","const":"47"}]}},"title":"BusinessTestFiscalDocumentRequest","additionalProperties":false},"BusinessUpdateRequest":{"type":"object","properties":{"expectedRevision":{"type":"integer","minimum":0},"capabilities":{"type":"object","properties":{"payments":{"type":"object","required":["requested"],"properties":{"requested":{"type":"boolean"}},"title":"BusinessCapabilityRequest","additionalProperties":false},"invoices":{"type":"object","required":["requested"],"properties":{"requested":{"type":"boolean"}},"title":"BusinessCapabilityRequest","additionalProperties":false}},"additionalProperties":false},"fiscalDetails":{"type":"object","properties":{"commercialName":{"type":"string","minLength":1,"maxLength":150,"pattern":"^(?=[\\s\\S]*\\p{L})(?=\\s*\\S(?:[\\s\\S]*\\S){1})(?!\\s*(\\S)\\1*\\s*$)[\\s\\S]{1,150}$"},"address":{"type":"string","minLength":1,"maxLength":100,"pattern":"^(?=[\\s\\S]*\\p{L})(?=\\s*\\S(?:[\\s\\S]*\\S){2})(?!\\s*(\\S)\\1*\\s*$)[\\s\\S]{1,100}$"},"location":{"anyOf":[{"type":"object","required":["placeId","catalogReleaseId"],"properties":{"placeId":{"type":"string","pattern":"^place_[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"},"catalogReleaseId":{"type":"string","pattern":"^dr_[A-Za-z0-9._-]+$"}},"title":"BusinessLocationPlace","additionalProperties":false},{"type":"object","required":["municipalityCode"],"properties":{"municipalityCode":{"type":"string","pattern":"^(?![0-9]{2}0000$)[0-9]{6}$","description":"An official e-CF municipality code, resolved to its place in the active location catalog release. A province code is refused."}},"title":"BusinessLocationMunicipality","additionalProperties":false}]},"phone":{"type":"string","pattern":"^\\+1(?:809|829|849)[0-9]{7}$","description":"A Dominican business number in E.164 format."},"defaultIncomeType":{"anyOf":[{"type":"string","const":"01"},{"type":"string","const":"02"},{"type":"string","const":"03"},{"type":"string","const":"04"},{"type":"string","const":"05"},{"type":"string","const":"06"}]}},"additionalProperties":false},"paymentsProfile":{"$ref":"#/components/schemas/MerchantPaymentsProfile"}},"title":"BusinessUpdateRequest","description":"Each member the request carries replaces that member of the business.","additionalProperties":false},"BuyerDeliveryTerminalResultCode":{"type":"string","description":"Terminal lifecycle outcomes that can make buyer delivery permanently unavailable.","enum":["authority_status_accepted","authority_status_accepted_with_findings","authority_status_rejected","authority_submission_rejected","consumer_summary_accepted","consumer_summary_accepted_with_findings","consumer_summary_rejected","fiscal_operation_closed"],"title":"BuyerDeliveryTerminalResultCode"},"CapturedPayment":{"type":"object","required":["allocations"],"properties":{"allocations":{"type":"array","items":{"$ref":"#/components/schemas/CapturedPaymentAllocation"},"minItems":1}},"title":"CapturedPayment","additionalProperties":false},"CapturedPaymentAllocation":{"type":"object","required":["id","amount","paymentMethodSummary"],"properties":{"id":{"type":"string","pattern":"^payment_allocation_[0-9a-hjkmnp-tv-z]{24,}$","description":"Stable identifier for one captured payment allocation."},"amount":{"$ref":"#/components/schemas/Money"},"paymentMethodSummary":{"anyOf":[{"$ref":"#/components/schemas/PaymentMethodSummary"},{"type":"null"}]}},"title":"CapturedPaymentAllocation","additionalProperties":false},"CardPaymentMethodSummary":{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","const":"card"},"brand":{"type":"string","minLength":1,"maxLength":32},"last4":{"type":"string","pattern":"^\\d{4}$"}},"title":"CardPaymentMethodSummary","additionalProperties":false},"CertificationTestSetKind":{"type":"string","description":"The DGII workbook a test set retains: step 2's e-CF cases or step 3's commercial approvals.","enum":["ecf","acecf"],"title":"CertificationTestSetKind"},"CertificationTestSetObject":{"type":"string","enum":["certification_test_set"],"title":"CertificationTestSetObject"},"CertificationTestSetRequirement":{"type":"string","enum":["case_mapping_pending"],"title":"CertificationTestSetRequirement"},"CertificationTestSetResource":{"type":"object","required":["object","id","attemptReference","kind","generation","file","review","createdAt"],"properties":{"attemptReference":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"file":{"$ref":"#/components/schemas/RetainedCertificationWorkbook"},"generation":{"type":"string","pattern":"^[1-9][0-9]*$"},"id":{"type":"string","format":"uuid"},"kind":{"$ref":"#/components/schemas/CertificationTestSetKind"},"object":{"$ref":"#/components/schemas/CertificationTestSetObject"},"review":{"$ref":"#/components/schemas/CertificationTestSetReview"}},"additionalProperties":false,"title":"CertificationTestSetResource"},"CertificationTestSetReview":{"oneOf":[{"type":"object","required":["worksheets","requirements","status"],"properties":{"requirements":{"type":"array","items":{"$ref":"#/components/schemas/CertificationTestSetRequirement"}},"status":{"type":"string","enum":["review_required"]},"worksheets":{"type":"array","items":{"$ref":"#/components/schemas/CertificationWorksheetSummary"}}},"additionalProperties":false}],"title":"CertificationTestSetReview"},"CertificationTestSetUploadRequest":{"type":"object","required":["kind","file"],"properties":{"file":{"$ref":"#/components/schemas/CertificationWorkbookFile"},"kind":{"$ref":"#/components/schemas/CertificationTestSetKind"}},"additionalProperties":false,"title":"CertificationTestSetUploadRequest"},"CertificationWorkbookFile":{"type":"object","required":["name","contentBase64"],"properties":{"contentBase64":{"type":"string","maxLength":4194304,"minLength":1},"name":{"type":"string","maxLength":128,"minLength":1}},"additionalProperties":false,"title":"CertificationWorkbookFile"},"CertificationWorksheetName":{"type":"string","enum":["ECF","RFCE","ACECF"],"title":"CertificationWorksheetName"},"CertificationWorksheetSummary":{"type":"object","required":["name","caseCount"],"properties":{"caseCount":{"type":"integer","format":"int32","maximum":1000,"minimum":1},"name":{"$ref":"#/components/schemas/CertificationWorksheetName"}},"additionalProperties":false,"title":"CertificationWorksheetSummary"},"CheckoutDisplay":{"type":"object","required":["mode","locale","merchant","statementDescriptor","fiscal","serviceCharges","wallets"],"properties":{"mode":{"type":"string","enum":["itemized","grouped","amount_only"]},"locale":{"type":"string","enum":["es","en"],"description":"Interface language. Amount notation and currency are independent of language."},"merchant":{"$ref":"#/components/schemas/CheckoutDisplayMerchant"},"statementDescriptor":{"type":"string","minLength":1,"maxLength":22},"fiscal":{"$ref":"#/components/schemas/CheckoutDisplayFiscal"},"serviceCharges":{"$ref":"#/components/schemas/CheckoutDisplayServiceCharges"},"wallets":{"type":"array","items":{"type":"string","enum":["apple_pay","google_pay"]}},"acceptedCardBrands":{"type":"array","items":{"type":"string","enum":["visa","mastercard","amex"]},"uniqueItems":true,"maxItems":3,"description":"Card brands certified for this Payment's Merchant Account snapshot."},"threeDsPrograms":{"type":"array","items":{"type":"string","enum":["visa_secure","mastercard_identity_check","amex_safekey"]},"uniqueItems":true,"maxItems":3,"description":"3-D Secure programs selected for this immutable Payment journey. An empty list means card submission does not use 3DS."}},"title":"CheckoutDisplay","description":"Read-only checkout presentation assembled from merchant configuration.","additionalProperties":false},"CheckoutDisplayDeliveryPolicy":{"anyOf":[{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","const":"not_offered"}},"additionalProperties":false},{"type":"object","required":["kind","summary"],"properties":{"kind":{"type":"string","const":"merchant_managed"},"summary":{"type":"string","minLength":1,"maxLength":160},"url":{"type":"string","format":"uri","pattern":"^https?://","maxLength":2048}},"additionalProperties":false}],"title":"CheckoutDisplayDeliveryPolicy"},"CheckoutDisplayFiscal":{"type":"object","required":["availableKinds","isLocked"],"properties":{"availableKinds":{"type":"array","items":{"$ref":"#/components/schemas/FiscalAvailableKind"}},"isLocked":{"type":"boolean"}},"title":"CheckoutDisplayFiscal","additionalProperties":false},"CheckoutDisplayMerchant":{"type":"object","required":["legalName","rnc","displayName","supportPhone"],"properties":{"legalName":{"type":"string","minLength":1,"maxLength":256},"rnc":{"type":"string","pattern":"^\\d{9}$"},"displayName":{"type":"string","minLength":1,"maxLength":128},"supportPhone":{"type":"string","minLength":1,"maxLength":32},"supportEmail":{"type":"string","format":"email","maxLength":254},"permanentAddress":{"$ref":"#/components/schemas/CheckoutDisplayPermanentAddress"},"deliveryPolicy":{"$ref":"#/components/schemas/CheckoutDisplayDeliveryPolicy"}},"title":"CheckoutDisplayMerchant","additionalProperties":false},"CheckoutDisplayModeInput":{"type":"object","required":["mode"],"properties":{"mode":{"type":"string","enum":["itemized","grouped","amount_only"]}},"title":"CheckoutDisplayModeInput","additionalProperties":false},"CheckoutDisplayPermanentAddress":{"type":"object","required":["line1","city","countryCode"],"properties":{"line1":{"type":"string","minLength":1,"maxLength":160},"line2":{"type":"string","minLength":1,"maxLength":160},"city":{"type":"string","minLength":1,"maxLength":80},"province":{"type":"string","minLength":1,"maxLength":80},"postalCode":{"type":"string","minLength":1,"maxLength":20},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"}},"title":"CheckoutDisplayPermanentAddress","additionalProperties":false},"CheckoutDisplayServiceCharges":{"type":"object","required":["isPropinaApplicable"],"properties":{"isPropinaApplicable":{"type":"boolean"}},"title":"CheckoutDisplayServiceCharges","additionalProperties":false},"CollectionObject":{"type":"string","description":"The wire family a Collection page announces.","enum":["list"],"title":"CollectionObject"},"CommercialResponse":{"oneOf":[{"type":"object","description":"DGII `Estado` 1: e-CF Aceptado.","required":["decision"],"properties":{"decision":{"type":"string","enum":["accepted"]}},"additionalProperties":false},{"type":"object","description":"DGII `Estado` 2: e-CF Rechazado.","required":["motive","decision"],"properties":{"decision":{"type":"string","enum":["rejected"]},"motive":{"type":"string","description":"`DetalleMotivoRechazo`: required and non-blank whenever `Estado` is 2."}},"additionalProperties":false}],"description":"The receiver's commercial decision over one received e-CF.\n\nDGII's ACECF XSD requires `DetalleMotivoRechazo` exactly when `Estado` is 2 (rejected).\nModeling the decision as a tagged enum makes an accepted response carrying a motive\nunrepresentable, instead of a nullable field every consumer re-checks.","discriminator":{"propertyName":"decision"},"title":"CommercialResponse"},"CommercialResponseSubmissionStateResource":{"type":"string","description":"The outbound ACECF submission's advisory state, shown to the workspace as context only.","enum":["pending","inFlight","submitted","dgiiRejected","submissionRefused","signingRefused","constructionRefused","authenticationFailed","unavailable","outcomeUnknown","attemptsExhausted"],"title":"CommercialResponseSubmissionStateResource"},"CreateAmountPaymentRequest":{"type":"object","required":["paymentReference","amount","description"],"properties":{"returnUrl":{"type":"string","format":"uri","pattern":"^https?://","maxLength":2048,"description":"Optional merchant web destination offered after Checkout. Omit for QR or POS checkout."},"serviceLabel":{"type":"string","maxLength":24,"description":"Merchant-authored context label such as Mesa 12."},"expiresAfterSeconds":{"type":"integer","minimum":300,"maximum":86400,"description":"Seconds the hosted checkout stays open, from 300 (5 minutes) to 86400 (24 hours). Omitted: 1800 with `returnUrl`, 3600 without. Renewing an expired split bill reopens it for at most this long, never longer than 1800. Part of the request identity."},"checkoutDisplay":{"$ref":"#/components/schemas/CheckoutDisplayModeInput"},"metadata":{"type":"object","maxProperties":20,"propertyNames":{"minLength":1,"maxLength":40},"description":"Merchant-owned keys carried with this Payment: at most 20 keys of 1 to 40 characters, each holding a string of at most 500 characters. Checkout stores it opaquely, never branches on it, never sends it to a payment provider, and never repeats it in a webhook body or a payer projection. It lives as long as its Payment and is deleted with it. Never put personal data or card data in it.","additionalProperties":{"type":"string","maxLength":500}},"merchantAccountId":{"type":"string","pattern":"^merchant_account_[0-9a-hjkmnp-tv-z]{24,}$","description":"Optional Merchant Account pin for this Payment."},"checkoutPreferences":{"type":"object","properties":{"splits":{"type":"boolean"},"tips":{"type":"boolean"},"wallets":{"type":"array","items":{"anyOf":[{"type":"string","const":"apple_pay"},{"type":"string","const":"google_pay"}]},"uniqueItems":true,"maxItems":2},"banks":{"type":"array","items":{"anyOf":[{"type":"string","const":"popular"},{"type":"string","const":"bhd"}]},"uniqueItems":true,"maxItems":2,"description":"Bank alternatives this Payment offers, from the banks the Checkout policy adopted. An empty list offers none; omit it to follow the policy."},"paymentPage":{"type":"boolean","description":"TEST only. `true` collects on the acquirer's own payment page (Azul Payment Page or CardNet Botón de Pago) of the Merchant Account that enabled one, instead of Checkout's card form. The page is then the only method, so it cannot be combined with splits, tips, wallets, or banks. Omit it or send `false` to use Checkout's methods."}},"title":"CheckoutPreferences","additionalProperties":false},"testOptions":{"type":"object","properties":{"threeDs":{"type":"boolean"}},"title":"PaymentTestOptions","additionalProperties":false},"paymentReference":{"type":"string","minLength":1,"maxLength":128,"description":"Immutable payment request identity within merchant and TEST/LIVE scope."},"source":{"$ref":"#/components/schemas/SaleSource"},"saleReference":{"type":"string","minLength":1,"maxLength":128},"amount":{"$ref":"#/components/schemas/Money"},"description":{"type":"string","minLength":1,"maxLength":80},"tax":{"type":"object","required":["includedAmount"],"properties":{"includedAmount":{"type":"string","pattern":"^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,2})?$","description":"Exact nonnegative decimal amount, with at most two fractional digits."}},"additionalProperties":false}},"title":"CreateAmountPaymentRequest","additionalProperties":false},"CreateInvoiceDeliveryRequest":{"type":"object","required":["recipientEmail"],"properties":{"accountClaimUrl":{"type":"string","format":"uri","description":"An `https` page where the buyer keeps this purchase; the email links it, and it grants no access.","maxLength":2048,"pattern":"^https://"},"attachments":{"$ref":"#/components/schemas/InvoiceDeliveryAttachmentSelection"},"recipientEmail":{"type":"string","format":"email","maxLength":320,"minLength":3}},"additionalProperties":false,"title":"CreateInvoiceDeliveryRequest"},"CreateInvoicePartPaymentRequest":{"type":"object","required":["paymentReference","invoicing","amount"],"properties":{"returnUrl":{"type":"string","format":"uri","pattern":"^https?://","maxLength":2048,"description":"Optional merchant web destination offered after Checkout. Omit for QR or POS checkout."},"serviceLabel":{"type":"string","maxLength":24,"description":"Merchant-authored context label such as Mesa 12."},"expiresAfterSeconds":{"type":"integer","minimum":300,"maximum":86400,"description":"Seconds the hosted checkout stays open, from 300 (5 minutes) to 86400 (24 hours). Omitted: 1800 with `returnUrl`, 3600 without. Renewing an expired split bill reopens it for at most this long, never longer than 1800. Part of the request identity."},"metadata":{"type":"object","maxProperties":20,"propertyNames":{"minLength":1,"maxLength":40},"description":"Merchant-owned keys carried with this Payment: at most 20 keys of 1 to 40 characters, each holding a string of at most 500 characters. Checkout stores it opaquely, never branches on it, never sends it to a payment provider, and never repeats it in a webhook body or a payer projection. It lives as long as its Payment and is deleted with it. Never put personal data or card data in it.","additionalProperties":{"type":"string","maxLength":500}},"merchantAccountId":{"type":"string","pattern":"^merchant_account_[0-9a-hjkmnp-tv-z]{24,}$","description":"Optional Merchant Account pin for this Payment."},"checkoutPreferences":{"type":"object","properties":{"splits":{"type":"boolean"},"tips":{"type":"boolean"},"wallets":{"type":"array","items":{"anyOf":[{"type":"string","const":"apple_pay"},{"type":"string","const":"google_pay"}]},"uniqueItems":true,"maxItems":2},"banks":{"type":"array","items":{"anyOf":[{"type":"string","const":"popular"},{"type":"string","const":"bhd"}]},"uniqueItems":true,"maxItems":2,"description":"Bank alternatives this Payment offers, from the banks the Checkout policy adopted. An empty list offers none; omit it to follow the policy."},"paymentPage":{"type":"boolean","description":"TEST only. `true` collects on the acquirer's own payment page (Azul Payment Page or CardNet Botón de Pago) of the Merchant Account that enabled one, instead of Checkout's card form. The page is then the only method, so it cannot be combined with splits, tips, wallets, or banks. Omit it or send `false` to use Checkout's methods."}},"title":"CheckoutPreferences","additionalProperties":false},"testOptions":{"type":"object","properties":{"threeDs":{"type":"boolean"}},"title":"PaymentTestOptions","additionalProperties":false},"paymentReference":{"type":"string","minLength":1,"maxLength":128,"description":"Immutable payment request identity within merchant and TEST/LIVE scope."},"source":{"$ref":"#/components/schemas/SaleSource"},"saleReference":{"type":"string","minLength":1,"maxLength":128},"invoicing":{"$ref":"#/components/schemas/InvoicePartInvoicing"},"amount":{"$ref":"#/components/schemas/Money"},"tax":{"type":"object","required":["includedAmount"],"properties":{"includedAmount":{"type":"string","pattern":"^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,2})?$","description":"Exact nonnegative decimal amount, with at most two fractional digits."}},"description":"The ITBIS included in a part `amount`. If you omit it, Timbro gives the part the share of the Invoice's ITBIS that matches its amount, rounded to the cent (half a cent rounds up). When every other part used this share, the part that completes the total takes the ITBIS left. A part's ITBIS cannot be more than the part's amount or the Invoice's ITBIS the other parts do not yet cover.","additionalProperties":false},"description":{"type":"string","minLength":1,"maxLength":80,"description":"Description of a part Payment. Defaults to `Factura <e-NCF>`."}},"title":"CreateInvoicePartPaymentRequest","description":"Collects part of an accepted Invoice's payable total by its id. The Payment collects only `amount`, with no lines of its own, and stays linked to the Invoice.","additionalProperties":false},"CreateInvoicePaymentRequest":{"type":"object","required":["paymentReference","invoicing"],"properties":{"returnUrl":{"type":"string","format":"uri","pattern":"^https?://","maxLength":2048,"description":"Optional merchant web destination offered after Checkout. Omit for QR or POS checkout."},"serviceLabel":{"type":"string","maxLength":24,"description":"Merchant-authored context label such as Mesa 12."},"expiresAfterSeconds":{"type":"integer","minimum":300,"maximum":86400,"description":"Seconds the hosted checkout stays open, from 300 (5 minutes) to 86400 (24 hours). Omitted: 1800 with `returnUrl`, 3600 without. Renewing an expired split bill reopens it for at most this long, never longer than 1800. Part of the request identity."},"metadata":{"type":"object","maxProperties":20,"propertyNames":{"minLength":1,"maxLength":40},"description":"Merchant-owned keys carried with this Payment: at most 20 keys of 1 to 40 characters, each holding a string of at most 500 characters. Checkout stores it opaquely, never branches on it, never sends it to a payment provider, and never repeats it in a webhook body or a payer projection. It lives as long as its Payment and is deleted with it. Never put personal data or card data in it.","additionalProperties":{"type":"string","maxLength":500}},"merchantAccountId":{"type":"string","pattern":"^merchant_account_[0-9a-hjkmnp-tv-z]{24,}$","description":"Optional Merchant Account pin for this Payment."},"checkoutPreferences":{"type":"object","properties":{"splits":{"type":"boolean"},"tips":{"type":"boolean"},"wallets":{"type":"array","items":{"anyOf":[{"type":"string","const":"apple_pay"},{"type":"string","const":"google_pay"}]},"uniqueItems":true,"maxItems":2},"banks":{"type":"array","items":{"anyOf":[{"type":"string","const":"popular"},{"type":"string","const":"bhd"}]},"uniqueItems":true,"maxItems":2,"description":"Bank alternatives this Payment offers, from the banks the Checkout policy adopted. An empty list offers none; omit it to follow the policy."},"paymentPage":{"type":"boolean","description":"TEST only. `true` collects on the acquirer's own payment page (Azul Payment Page or CardNet Botón de Pago) of the Merchant Account that enabled one, instead of Checkout's card form. The page is then the only method, so it cannot be combined with splits, tips, wallets, or banks. Omit it or send `false` to use Checkout's methods."}},"title":"CheckoutPreferences","additionalProperties":false},"testOptions":{"type":"object","properties":{"threeDs":{"type":"boolean"}},"title":"PaymentTestOptions","additionalProperties":false},"paymentReference":{"type":"string","minLength":1,"maxLength":128,"description":"Immutable payment request identity within merchant and TEST/LIVE scope."},"source":{"$ref":"#/components/schemas/SaleSource"},"saleReference":{"type":"string","minLength":1,"maxLength":128},"invoicing":{"$ref":"#/components/schemas/ExistingInvoicing"}},"title":"CreateInvoicePaymentRequest","description":"Collects an accepted Invoice's full payable total by its id. The Payment takes the sale, its currency, and its totals from the Invoice. To collect part of the total, send `CreateInvoicePartPaymentRequest` with an `amount`. An Invoice is collected in full by one Payment or in parts by several, never both ways at once.","additionalProperties":false},"CreateItemizedPaymentRequest":{"type":"object","required":["paymentReference","currency","items"],"properties":{"returnUrl":{"type":"string","format":"uri","pattern":"^https?://","maxLength":2048,"description":"Optional merchant web destination offered after Checkout. Omit for QR or POS checkout."},"serviceLabel":{"type":"string","maxLength":24,"description":"Merchant-authored context label such as Mesa 12."},"expiresAfterSeconds":{"type":"integer","minimum":300,"maximum":86400,"description":"Seconds the hosted checkout stays open, from 300 (5 minutes) to 86400 (24 hours). Omitted: 1800 with `returnUrl`, 3600 without. Renewing an expired split bill reopens it for at most this long, never longer than 1800. Part of the request identity."},"checkoutDisplay":{"$ref":"#/components/schemas/CheckoutDisplayModeInput"},"metadata":{"type":"object","maxProperties":20,"propertyNames":{"minLength":1,"maxLength":40},"description":"Merchant-owned keys carried with this Payment: at most 20 keys of 1 to 40 characters, each holding a string of at most 500 characters. Checkout stores it opaquely, never branches on it, never sends it to a payment provider, and never repeats it in a webhook body or a payer projection. It lives as long as its Payment and is deleted with it. Never put personal data or card data in it.","additionalProperties":{"type":"string","maxLength":500}},"merchantAccountId":{"type":"string","pattern":"^merchant_account_[0-9a-hjkmnp-tv-z]{24,}$","description":"Optional Merchant Account pin for this Payment."},"checkoutPreferences":{"type":"object","properties":{"splits":{"type":"boolean"},"tips":{"type":"boolean"},"wallets":{"type":"array","items":{"anyOf":[{"type":"string","const":"apple_pay"},{"type":"string","const":"google_pay"}]},"uniqueItems":true,"maxItems":2},"banks":{"type":"array","items":{"anyOf":[{"type":"string","const":"popular"},{"type":"string","const":"bhd"}]},"uniqueItems":true,"maxItems":2,"description":"Bank alternatives this Payment offers, from the banks the Checkout policy adopted. An empty list offers none; omit it to follow the policy."},"paymentPage":{"type":"boolean","description":"TEST only. `true` collects on the acquirer's own payment page (Azul Payment Page or CardNet Botón de Pago) of the Merchant Account that enabled one, instead of Checkout's card form. The page is then the only method, so it cannot be combined with splits, tips, wallets, or banks. Omit it or send `false` to use Checkout's methods."}},"title":"CheckoutPreferences","additionalProperties":false},"testOptions":{"type":"object","properties":{"threeDs":{"type":"boolean"}},"title":"PaymentTestOptions","additionalProperties":false},"paymentReference":{"type":"string","minLength":1,"maxLength":128,"description":"Immutable payment request identity within merchant and TEST/LIVE scope."},"source":{"$ref":"#/components/schemas/SaleSource"},"saleReference":{"type":"string","minLength":1,"maxLength":128},"invoicing":{"$ref":"#/components/schemas/Invoicing"},"currency":{"type":"string","pattern":"^[A-Z]{3}$","examples":["DOP"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/PaymentItem"},"minItems":1},"expectedTotals":{"$ref":"#/components/schemas/SaleTotals"}},"title":"CreateItemizedPaymentRequest","additionalProperties":false},"CreatePaymentRequest":{"title":"CreatePaymentRequest","oneOf":[{"$ref":"#/components/schemas/CreateAmountPaymentRequest"},{"$ref":"#/components/schemas/CreateItemizedPaymentRequest"},{"$ref":"#/components/schemas/CreateInvoicePaymentRequest"},{"$ref":"#/components/schemas/CreateInvoicePartPaymentRequest"}]},"CreateRefundRequest":{"type":"object","required":["paymentId","refundReference"],"properties":{"paymentId":{"type":"string","pattern":"^payment_[0-9a-hjkmnp-tv-z]{24,}$","description":"Payment with captured money to refund."},"source":{"$ref":"#/components/schemas/SaleSource"},"refundReference":{"type":"string","minLength":1,"maxLength":128,"description":"Stable Refund identity. Retrying the same intent returns the current Refund; changed intent conflicts."},"amount":{"$ref":"#/components/schemas/Money"},"taxAmount":{"type":"object","required":["currency","value"],"properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$","examples":["DOP"]},"value":{"type":"string","pattern":"^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,2})?$","description":"Exact nonnegative decimal amount, with at most two fractional digits."}},"title":"Money","description":"Exact returned ITBIS, never inferred proportionally. A full original refund uses captured tax when omitted.","additionalProperties":false},"voluntaryTipAmount":{"type":"object","required":["currency","value"],"properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$","examples":["DOP"]},"value":{"type":"string","pattern":"^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,2})?$","description":"Exact nonnegative decimal amount, with at most two fractional digits."}},"title":"Money","description":"Exact voluntary-tip portion of the refund's returned money, excluded from the fiscal credit-note amount.","additionalProperties":false},"allocationIds":{"type":"array","items":{"type":"string","pattern":"^payment_allocation_[0-9a-hjkmnp-tv-z]{24,}$","description":"Captured allocation to target for this refund."},"minItems":1,"maxItems":100}},"title":"CreateRefundRequest","description":"Creates a full refund when amount equals the remaining captured balance, or a partial refund for a lower amount.","additionalProperties":false},"CreateSubscriptionRequest":{"type":"object","required":["subscriptionReference","customer","currency","items","interval","invoicing"],"properties":{"subscriptionReference":{"type":"string","minLength":1,"maxLength":128},"customer":{"$ref":"#/components/schemas/SubscriptionCustomer"},"currency":{"type":"string","const":"DOP"},"items":{"type":"array","items":{"$ref":"#/components/schemas/PaymentItem"},"minItems":1,"maxItems":100},"interval":{"type":"object","required":["unit"],"properties":{"unit":{"type":"string","const":"month"}},"additionalProperties":false},"invoicing":{"$ref":"#/components/schemas/SubscriptionInvoicing"}},"title":"CreateSubscriptionRequest","additionalProperties":false},"CreateWebhookEndpointRequest":{"type":"object","required":["url","enabledEvents"],"properties":{"url":{"type":"string","format":"uri","description":"HTTPS endpoint that receives signed events."},"enabledEvents":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEventType"},"minItems":1,"maxItems":17,"uniqueItems":true}},"title":"CreateWebhookEndpointRequest","additionalProperties":false},"CurrentBusinessCertificationTestRun":{"type":"object","required":["current"],"properties":{"current":{"anyOf":[{"$ref":"#/components/schemas/BusinessCertificationTestRun"},{"type":"null"}]}},"title":"CurrentBusinessCertificationTestRun","additionalProperties":false},"CurrentCertificationTestSet":{"type":"object","required":["current"],"properties":{"current":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/CertificationTestSetResource"}]}},"additionalProperties":false,"title":"CurrentCertificationTestSet"},"DeliveryNotOffered":{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","const":"not_offered"}},"title":"DeliveryNotOffered","additionalProperties":false},"DocumentTypeActionRequired":{"type":"object","required":["type","status","reasons","numbering"],"properties":{"type":{"anyOf":[{"type":"string","const":"E31"},{"type":"string","const":"E32"},{"type":"string","const":"E33"},{"type":"string","const":"E34"},{"type":"string","const":"E41"},{"type":"string","const":"E43"},{"type":"string","const":"E44"},{"type":"string","const":"E45"},{"type":"string","const":"E46"},{"type":"string","const":"E47"}]},"status":{"type":"string","const":"actionRequired"},"reasons":{"type":"array","items":{"anyOf":[{"type":"string","const":"legal_issuer_profile_incomplete"},{"type":"string","const":"signing_certificate_missing"},{"type":"string","const":"signing_certificate_expired"},{"type":"string","const":"signing_certificate_not_yet_valid"},{"type":"string","const":"sequence_missing"},{"type":"string","const":"sequence_not_active"},{"type":"string","const":"sequence_rejected_by_dgii"},{"type":"string","const":"sequence_not_observed"},{"type":"string","const":"range_exhausted"},{"type":"string","const":"sequence_expiration_invalid"},{"type":"string","const":"sequence_expired"},{"type":"string","const":"sequence_range_overlap"}]},"minItems":1,"description":"Every condition that blocks this type: issuer, then certificate, then numbering."},"numbering":{"anyOf":[{"$ref":"#/components/schemas/NumberingRange"},{"type":"null"}]}},"title":"DocumentTypeActionRequired","additionalProperties":false},"DocumentTypeIssuanceReadiness":{"title":"DocumentTypeIssuanceReadiness","description":"Whether Timbro can issue one e-CF type now, as Timbro reports it.","oneOf":[{"$ref":"#/components/schemas/DocumentTypeReadyToIssue"},{"$ref":"#/components/schemas/DocumentTypeActionRequired"}],"discriminator":{"propertyName":"status","mapping":{"ready":"#/components/schemas/DocumentTypeReadyToIssue","actionRequired":"#/components/schemas/DocumentTypeActionRequired"}}},"DocumentTypeReadyToIssue":{"type":"object","required":["type","status","numbering"],"properties":{"type":{"anyOf":[{"type":"string","const":"E31"},{"type":"string","const":"E32"},{"type":"string","const":"E33"},{"type":"string","const":"E34"},{"type":"string","const":"E41"},{"type":"string","const":"E43"},{"type":"string","const":"E44"},{"type":"string","const":"E45"},{"type":"string","const":"E46"},{"type":"string","const":"E47"}]},"status":{"type":"string","const":"ready"},"numbering":{"$ref":"#/components/schemas/NumberingRange"}},"title":"DocumentTypeReadyToIssue","additionalProperties":false},"ExchangeRateObservation":{"type":"object","required":["object","currency","rate","rateDate","source"],"properties":{"object":{"type":"string","const":"exchange_rate_observation"},"currency":{"type":"string","enum":["USD","EUR"],"description":"The foreign currency, priced in Dominican pesos per one unit."},"rate":{"type":"string","pattern":"^[0-9]{1,3}\\.[0-9]{4}$","description":"Dominican pesos per one unit of `currency`, at four decimals.","examples":["61.1168"]},"rateDate":{"type":"string","format":"date","description":"The date of the observation this rate was read from, in Santo Domingo."},"source":{"type":"string","enum":["dgii","operator"],"description":"Where the observation came from."}},"title":"ExchangeRateObservation","description":"The reference rate for a date: the latest accepted observation dated from three days before the date up to the day before it.","additionalProperties":false},"ExistingInvoicing":{"type":"object","required":["mode","invoiceId"],"properties":{"mode":{"type":"string","const":"existing"},"invoiceId":{"type":"string","format":"uuid"},"receipt":{"$ref":"#/components/schemas/InvoiceReceiptCredential"},"recipientEmail":{"type":"string","format":"email","maxLength":254,"description":"Buyer email the Invoice is delivered to. Not accepted together with `receipt`; Invoices owned by an independent Source are delivered by their owner."}},"title":"ExistingInvoicing","additionalProperties":false},"FiscalAdmissionProblem":{"type":"object","description":"One stable public document problem retained for a rejected admission.","required":["path","code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"}},"additionalProperties":false,"title":"FiscalAdmissionProblem"},"FiscalArtifactMediaType":{"type":"string","enum":["application/xml","application/pdf"],"title":"FiscalArtifactMediaType"},"FiscalAuthorityRoute":{"type":"string","description":"DGII authority protocol selected by the Rust decision core from admitted fiscal facts.","enum":["complete_ecf_reception","consumer_summary_reception"],"title":"FiscalAuthorityRoute"},"FiscalAvailableKind":{"type":"object","required":["kind","isAvailable","buyerRequirement"],"properties":{"kind":{"type":"string","enum":["consumer","fiscal_credit","government"]},"isAvailable":{"type":"boolean"},"buyerRequirement":{"type":"string","enum":["none","optional","required"]}},"title":"FiscalAvailableKind","additionalProperties":false},"FiscalDeliveryState":{"type":"string","enum":["pending","submitted","delivered","bounced","failed","suppressed"],"title":"FiscalDeliveryState"},"FiscalDocumentRelationshipKind":{"type":"string","description":"Stable semantic kind for a cross-document fiscal relationship.","enum":["modification"],"title":"FiscalDocumentRelationshipKind"},"FiscalEnvironment":{"type":"string","description":"DGII execution environment selected before lifecycle admission.","enum":["sandbox","certification","production"],"title":"FiscalEnvironment"},"FiscalGovernmentEligibility":{"anyOf":[{"type":"object","required":["entityKind","authorityReference"],"properties":{"entityKind":{"type":"string","const":"central_government"},"authorityReference":{"type":"string","minLength":1,"maxLength":128}},"additionalProperties":false},{"type":"object","required":["entityKind","authorityReference"],"properties":{"entityKind":{"type":"string","const":"decentralized_or_autonomous"},"authorityReference":{"type":"string","minLength":1,"maxLength":128}},"additionalProperties":false},{"type":"object","required":["entityKind","authorityReference"],"properties":{"entityKind":{"type":"string","const":"social_security"},"authorityReference":{"type":"string","minLength":1,"maxLength":128}},"additionalProperties":false},{"type":"object","required":["entityKind","authorityReference"],"properties":{"entityKind":{"type":"string","const":"other_noncommercial_government"},"authorityReference":{"type":"string","minLength":1,"maxLength":128}},"additionalProperties":false}],"title":"FiscalGovernmentEligibility"},"GooglePayPaymentMethodSummary":{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","const":"google_pay"}},"title":"GooglePayPaymentMethodSummary","additionalProperties":false},"InvoiceAdditionalInformation":{"type":"object","properties":{"referenceNumber":{"oneOf":[{"type":"null"},{"type":"string","maxLength":20,"minLength":1,"pattern":"^[0-9]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"shipment":{"type":"object","properties":{"containerNumber":{"oneOf":[{"type":"null"},{"type":"string","maxLength":100,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"deliveryNoteNumber":{"oneOf":[{"type":"null"},{"type":"string","maxLength":20,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"driver":{"oneOf":[{"type":"null"},{"type":"string","maxLength":20,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"grossWeight":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]}]},"grossWeightUnit":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^([1-9]|[1-5][0-9]|6[0-2])$","x-timbro-submission-validation":["pattern"]}]},"netWeight":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]}]},"netWeightUnit":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^([1-9]|[1-5][0-9]|6[0-2])$","x-timbro-submission-validation":["pattern"]}]},"packageCount":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]}]},"packageUnit":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^([1-9]|[1-5][0-9]|6[0-2])$","x-timbro-submission-validation":["pattern"]}]},"packageVolume":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^(?=[0-9.]*[1-9])[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]}]},"route":{"oneOf":[{"type":"null"},{"type":"string","maxLength":20,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"shipmentDate":{"oneOf":[{"type":"null"},{"type":"string","format":"date","description":"A calendar date in the public API's ISO 8601 date form.","pattern":"^(19|20)[0-9]{2}-[0-9]{2}-[0-9]{2}$"}]},"shipmentNumber":{"oneOf":[{"type":"null"},{"type":"string","maxLength":25,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"transportDocumentNumber":{"oneOf":[{"type":"null"},{"type":"string","maxLength":20,"minLength":1,"pattern":"^[0-9]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"transportZone":{"oneOf":[{"type":"null"},{"type":"string","maxLength":20,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"vehicleFiche":{"oneOf":[{"type":"null"},{"type":"string","maxLength":10,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"vehiclePlate":{"oneOf":[{"type":"null"},{"type":"string","maxLength":7,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"volumeUnit":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^([1-9]|[1-5][0-9]|6[0-2])$","x-timbro-submission-validation":["pattern"]}]}},"additionalProperties":false}},"additionalProperties":false,"title":"InvoiceAdditionalInformation"},"InvoiceAdditionalInformationResource":{"type":"object","required":["referenceNumber","shipment"],"properties":{"referenceNumber":{"type":["string","null"],"maxLength":20},"shipment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceShipmentInformationResource"}]}},"additionalProperties":false,"title":"InvoiceAdditionalInformationResource"},"InvoiceAffectedDocumentAttribution":{"oneOf":[{"type":"object","required":["invoiceId","kind"],"properties":{"invoiceId":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["internalOperation"]}},"additionalProperties":false},{"type":"object","required":["sourceReference","kind"],"properties":{"kind":{"type":"string","enum":["externalDocument"]},"sourceReference":{"type":"string"}},"additionalProperties":false}],"discriminator":{"propertyName":"kind"},"title":"InvoiceAffectedDocumentAttribution"},"InvoiceAffectedFiscalDocument":{"type":"object","required":["attribution","environment","issuerTaxId","fiscalNumber","issuedOn"],"properties":{"attribution":{"$ref":"#/components/schemas/InvoiceAffectedDocumentAttribution"},"environment":{"$ref":"#/components/schemas/FiscalEnvironment"},"fiscalNumber":{"type":"string"},"issuedOn":{"type":"string"},"issuerTaxId":{"type":"string"}},"additionalProperties":false,"title":"InvoiceAffectedFiscalDocument"},"InvoiceBuyer":{"type":"object","required":["taxId","legalName"],"properties":{"address":{"oneOf":[{"type":"null"},{"type":"string","maxLength":100,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"deliveryPhone":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^[0-9]{3}-[0-9]{3}-[0-9]{4}$","x-timbro-submission-validation":["pattern"]}]},"email":{"oneOf":[{"type":"null"},{"type":"string","maxLength":80,"pattern":"^[\\p{L}\\p{M}\\p{N}\\p{S}_]+(?:[-.][\\p{L}\\p{M}\\p{N}\\p{S}_]+)*@[\\p{L}\\p{M}\\p{N}\\p{S}]+(?:[-.][\\p{L}\\p{M}\\p{N}\\p{S}]+)*\\.[\\p{L}\\p{M}\\p{N}\\p{S}]+(?:[-.][\\p{L}\\p{M}\\p{N}\\p{S}]+)*$","x-timbro-submission-validation":["maxLength","pattern"]}]},"legalName":{"type":"string","maxLength":150,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"taxId":{"type":"string","pattern":"^[0-9]{9}([0-9]{2})?$","x-timbro-submission-validation":["pattern"]}},"additionalProperties":false,"title":"InvoiceBuyer"},"InvoiceBuyerDeliveryReadiness":{"oneOf":[{"type":"object","title":"NotApplicableReadiness","required":["status"],"properties":{"status":{"type":"string","enum":["notApplicable"]}},"additionalProperties":false},{"type":"object","required":["authorityRoute","status"],"properties":{"authorityRoute":{"$ref":"#/components/schemas/FiscalAuthorityRoute"},"status":{"type":"string","enum":["pending"]}},"additionalProperties":false},{"type":"object","required":["authorityRoute","readyAt","status"],"properties":{"authorityRoute":{"$ref":"#/components/schemas/FiscalAuthorityRoute"},"readyAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["ready"]}},"additionalProperties":false},{"type":"object","required":["terminalResultCode","status"],"properties":{"status":{"type":"string","enum":["unavailable"]},"terminalResultCode":{"$ref":"#/components/schemas/BuyerDeliveryTerminalResultCode"}},"additionalProperties":false}],"description":"Whether the buyer may receive the e-CF: `ready` once DGII received it and answered `Aceptado`\nor `Aceptado Condicional`, never at signing or submission alone.","discriminator":{"propertyName":"status"},"title":"InvoiceBuyerDeliveryReadiness"},"InvoiceBuyerIdentity":{"oneOf":[{"type":"object","title":"AnonymousBuyer","required":["kind"],"properties":{"kind":{"type":"string","enum":["anonymous"]}},"additionalProperties":false},{"type":"object","title":"DomesticBuyer","required":["taxId","legalName","kind"],"properties":{"deliveryPhone":{"type":"string","pattern":"^[0-9]{3}-[0-9]{3}-[0-9]{4}$","x-timbro-submission-validation":["pattern"]},"kind":{"type":"string","enum":["domestic"]},"legalName":{"type":"string","maxLength":150,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"taxId":{"type":"string","pattern":"^[0-9]{9}([0-9]{2})?$","x-timbro-submission-validation":["pattern"]}},"additionalProperties":false},{"type":"object","title":"ForeignBuyer","required":["foreignId","legalName","kind"],"properties":{"deliveryPhone":{"type":"string","pattern":"^[0-9]{3}-[0-9]{3}-[0-9]{4}$","x-timbro-submission-validation":["pattern"]},"foreignId":{"type":"string","maxLength":20,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"kind":{"type":"string","enum":["foreign"]},"legalName":{"type":"string","maxLength":150,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}},"additionalProperties":false}],"discriminator":{"propertyName":"kind"},"title":"InvoiceBuyerIdentity"},"InvoiceConsumerBuyer":{"oneOf":[{"type":"object","title":"DomesticInvoiceBuyer","required":["taxId","legalName","kind"],"properties":{"deliveryPhone":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^[0-9]{3}-[0-9]{3}-[0-9]{4}$","x-timbro-submission-validation":["pattern"]}]},"kind":{"type":"string","enum":["domestic"]},"legalName":{"type":"string","maxLength":150,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"taxId":{"type":"string","pattern":"^[0-9]{9}([0-9]{2})?$","x-timbro-submission-validation":["pattern"]}},"additionalProperties":false},{"type":"object","title":"ForeignBuyer","required":["foreignId","legalName","kind"],"properties":{"deliveryPhone":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^[0-9]{3}-[0-9]{3}-[0-9]{4}$","x-timbro-submission-validation":["pattern"]}]},"foreignId":{"type":"string","maxLength":20,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"kind":{"type":"string","enum":["foreign"]},"legalName":{"type":"string","maxLength":150,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}},"additionalProperties":false}],"discriminator":{"propertyName":"kind"},"title":"InvoiceConsumerBuyer"},"InvoiceCorrection":{"type":"object","required":["relationshipKind","affectedDocument","modificationCode","reason","createdAt"],"properties":{"affectedDocument":{"$ref":"#/components/schemas/InvoiceAffectedFiscalDocument"},"createdAt":{"type":"string","format":"date-time"},"modificationCode":{"type":"string"},"reason":{"type":"string"},"relationshipKind":{"$ref":"#/components/schemas/FiscalDocumentRelationshipKind"}},"additionalProperties":false,"title":"InvoiceCorrection"},"InvoiceCreditNoteModificationCode":{"type":"string","enum":["1","2","3"],"title":"InvoiceCreditNoteModificationCode"},"InvoiceCreditNotePaymentTerms":{"oneOf":[{"type":"object","title":"ImmediatePaymentTerms","required":["type"],"properties":{"type":{"type":"string","enum":["immediate"]}},"additionalProperties":false},{"type":"object","title":"CreditPaymentTerms","required":["dueOn","type"],"properties":{"dueOn":{"type":"string","format":"date","description":"A calendar date in the public API's ISO 8601 date form.","pattern":"^(19|20)[0-9]{2}-[0-9]{2}-[0-9]{2}$"},"type":{"type":"string","enum":["credit"]}},"additionalProperties":false},{"type":"object","title":"FreePaymentTerms","required":["type"],"properties":{"type":{"type":"string","enum":["free"]}},"additionalProperties":false}],"discriminator":{"propertyName":"type"},"title":"InvoiceCreditNotePaymentTerms"},"InvoiceDate":{"type":"string","format":"date","description":"A calendar date in the public API's ISO 8601 date form.","pattern":"^(19|20)[0-9]{2}-[0-9]{2}-[0-9]{2}$","title":"InvoiceDate"},"InvoiceDebitNoteModificationCode":{"type":"string","enum":["2","3"],"title":"InvoiceDebitNoteModificationCode"},"InvoiceDeliveryAttachments":{"type":"object","description":"The files this email attaches beside its link.","required":["pdf","xml"],"properties":{"pdf":{"type":"boolean"},"xml":{"type":"boolean"}},"additionalProperties":false,"title":"InvoiceDeliveryAttachments"},"InvoiceDeliveryAttachmentSelection":{"type":"object","properties":{"pdf":{"type":"boolean","description":"Attach the printed representation as `{RNC}{e-NCF}.pdf`."},"xml":{"type":"boolean","description":"Attach the signed e-CF as `{RNC}{e-NCF}.xml`, DGII's file-name standard."}},"additionalProperties":false,"title":"InvoiceDeliveryAttachmentSelection"},"InvoiceDeliveryResource":{"type":"object","required":["id","invoiceId","recipientEmail","attachments","state","link","lastResultCode","providerDeliveryId","createdAt","updatedAt"],"properties":{"attachments":{"$ref":"#/components/schemas/InvoiceDeliveryAttachments"},"createdAt":{"type":"string","format":"date-time"},"id":{"type":"string","format":"uuid"},"invoiceId":{"type":"string","format":"uuid"},"lastResultCode":{"type":["string","null"]},"link":{"type":"string"},"providerDeliveryId":{"type":["string","null"]},"recipientEmail":{"type":"string"},"state":{"$ref":"#/components/schemas/FiscalDeliveryState"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":false,"title":"InvoiceDeliveryResource"},"InvoiceDiagnostic":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"}},"additionalProperties":false,"title":"InvoiceDiagnostic"},"InvoiceExchangeRate":{"type":"object","description":"The exchange rate of record: DOP per one unit of the Invoice's `currency`.","required":["rate"],"properties":{"rate":{"type":"string","pattern":"^(?=[0-9.]*[1-9])[0-9]{1,3}(\\.[0-9]{1,4})?$","x-timbro-submission-validation":["pattern"]}},"additionalProperties":false,"title":"InvoiceExchangeRate"},"InvoiceExpectedTotals":{"type":"object","required":["net","tax","total","nonBillable"],"properties":{"fiscal":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceFiscalExpectedTotals"}]},"net":{"type":"string","pattern":"^[0-9]{1,16}\\.[0-9]{2}$","x-timbro-submission-validation":["pattern"]},"nonBillable":{"type":"string","pattern":"^[0-9]{1,16}\\.[0-9]{2}$","x-timbro-submission-validation":["pattern"]},"tax":{"type":"string","pattern":"^[0-9]{1,16}\\.[0-9]{2}$","x-timbro-submission-validation":["pattern"]},"total":{"type":"string","pattern":"^[0-9]{1,16}\\.[0-9]{2}$","x-timbro-submission-validation":["pattern"]}},"additionalProperties":false,"title":"InvoiceExpectedTotals"},"InvoiceExportBuyer":{"oneOf":[{"type":"object","title":"ForeignBuyer","required":["foreignId","legalName","kind"],"properties":{"deliveryPhone":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^[0-9]{3}-[0-9]{3}-[0-9]{4}$","x-timbro-submission-validation":["pattern"]}]},"foreignId":{"type":"string","maxLength":20,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"kind":{"type":"string","enum":["foreign"]},"legalName":{"type":"string","maxLength":150,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}},"additionalProperties":false}],"discriminator":{"propertyName":"kind"},"title":"InvoiceExportBuyer"},"InvoiceExportEligibility":{"oneOf":[{"type":"object","required":["authorityReference","exporterKind"],"properties":{"authorityReference":{"type":"string","minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","pattern"]},"exporterKind":{"type":"string","enum":["national_exporter"]}},"additionalProperties":false},{"type":"object","required":["authorityReference","exporterKind"],"properties":{"authorityReference":{"type":"string","minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","pattern"]},"exporterKind":{"type":"string","enum":["free_zone_business"]}},"additionalProperties":false}],"discriminator":{"propertyName":"exporterKind"},"title":"InvoiceExportEligibility"},"InvoiceExportItem":{"type":"object","required":["description","quantity","unit","kind","unitPrice"],"properties":{"additionalDescription":{"oneOf":[{"type":"null"},{"type":"string","maxLength":1000,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])(?!.*[\\u0000-\\u0008\\u000B\\u000C\\u000E-\\u001F\\uD800-\\uDFFF\\uFFFE\\uFFFF])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"],"x-timbro-xml10-text":true}],"description":"More detail about the item, such as the options chosen on the order, sent to the DGII as the\nitem's `DescripcionItem`. The PDF prints only `description`."},"adjustments":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LinePriceAdjustments"}]},"description":{"type":"string","maxLength":80,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"id":{"oneOf":[{"type":"null"},{"type":"string","maxLength":128,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"itemCodes":{"oneOf":[{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItemCode"},"maxItems":5,"minItems":0,"x-timbro-submission-validation":["minItems","maxItems"]}]},"kind":{"$ref":"#/components/schemas/SourceItemKind"},"quantity":{"type":"string","pattern":"^(?=[0-9.]*[1-9])[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]},"unit":{"$ref":"#/components/schemas/SourceMeasurementUnit"},"unitPrice":{"type":"string","pattern":"^[0-9]{1,16}(\\.[0-9]{1,4})?$","x-timbro-submission-validation":["pattern"]}},"additionalProperties":false,"title":"InvoiceExportItem"},"InvoiceExternalOriginal":{"type":"object","description":"A document issued outside Timbro that a legal note modifies.\n\n`fiscalNumber` is the original e-NCF (`E`, the two type digits, and ten digits) or paper NCF\n(`B` and ten digits, or `A` or `P` and eighteen digits). `issuerTaxId` is DGII's RNC Otro\nContribuyente and applies only when the original was issued under a different RNC than the\nnote, for example after a merger or split. `buyer` is the original's buyer and may be omitted\nfor an anonymous consumer document. `total` is the original's total and is required when the\noriginal is an e-CF type 32, because DGII requires the buyer's identity on a note against a\ntype 32 of DOP 250,000.00 or more.","required":["fiscalNumber","issuedOn"],"properties":{"buyer":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceConsumerBuyer"}]},"fiscalNumber":{"type":"string","pattern":"^(B[0-9]{10}|E[0-9]{12}|[AP][0-9]{18})$","x-timbro-submission-validation":["pattern"]},"issuedOn":{"$ref":"#/components/schemas/InvoiceDate"},"issuerTaxId":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^[0-9]{9}([0-9]{2})?$","x-timbro-submission-validation":["pattern"]}]},"total":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]}]}},"additionalProperties":false,"title":"InvoiceExternalOriginal"},"InvoiceFiles":{"type":"object","required":["xml","pdf"],"properties":{"pdf":{"$ref":"#/components/schemas/InvoicePdfReadiness"},"xml":{"$ref":"#/components/schemas/InvoiceXmlReadiness"}},"additionalProperties":false,"title":"InvoiceFiles"},"InvoiceFiscalExpectedTotals":{"type":"object","description":"DOP accounting assertions against the e-CF's `MontoTotal` and its parts.","required":["net","tax","total"],"properties":{"net":{"type":"string","pattern":"^[0-9]{1,16}\\.[0-9]{2}$","x-timbro-submission-validation":["pattern"]},"tax":{"type":"string","pattern":"^[0-9]{1,16}\\.[0-9]{2}$","x-timbro-submission-validation":["pattern"]},"total":{"type":"string","pattern":"^[0-9]{1,16}\\.[0-9]{2}$","x-timbro-submission-validation":["pattern"]}},"additionalProperties":false,"title":"InvoiceFiscalExpectedTotals"},"InvoiceFiscalIdentity":{"type":"object","required":["type","eNcf","signature"],"properties":{"eNcf":{"type":"string","pattern":"^E(31|32|33|34|41|43|44|45|46|47)[0-9]{10}$"},"signature":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceSignature"}]},"type":{"$ref":"#/components/schemas/InvoiceType"}},"additionalProperties":false,"title":"InvoiceFiscalIdentity"},"InvoiceForeignPayee":{"type":"object","required":["foreignId","legalName"],"properties":{"foreignId":{"type":"string","maxLength":20,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"legalName":{"type":"string","maxLength":150,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}},"additionalProperties":false,"title":"InvoiceForeignPayee"},"InvoiceForeignPaymentBasis":{"oneOf":[{"type":"object","required":["authorityReference","basisKind"],"properties":{"authorityReference":{"type":"string","minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","pattern"]},"basisKind":{"type":"string","enum":["dominican_source_income"]}},"additionalProperties":false}],"discriminator":{"propertyName":"basisKind"},"title":"InvoiceForeignPaymentBasis"},"InvoiceForeignPaymentItem":{"type":"object","description":"One Type 47 item. Its `incomeTaxWithheld` is in DOP whatever the Invoice's `currency`.","required":["description","quantity","unit","kind","unitPrice","incomeTaxWithheld"],"properties":{"additionalDescription":{"oneOf":[{"type":"null"},{"type":"string","maxLength":1000,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])(?!.*[\\u0000-\\u0008\\u000B\\u000C\\u000E-\\u001F\\uD800-\\uDFFF\\uFFFE\\uFFFF])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"],"x-timbro-xml10-text":true}],"description":"More detail about the item, such as the options chosen on the order, sent to the DGII as the\nitem's `DescripcionItem`. The PDF prints only `description`."},"description":{"type":"string","maxLength":80,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"id":{"oneOf":[{"type":"null"},{"type":"string","maxLength":128,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"incomeTaxWithheld":{"type":"string","pattern":"^[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]},"itemCodes":{"oneOf":[{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItemCode"},"maxItems":5,"minItems":0,"x-timbro-submission-validation":["minItems","maxItems"]}]},"kind":{"$ref":"#/components/schemas/SourceItemKind"},"quantity":{"type":"string","pattern":"^(?=[0-9.]*[1-9])[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]},"unit":{"$ref":"#/components/schemas/SourceMeasurementUnit"},"unitPrice":{"type":"string","pattern":"^[0-9]{1,16}(\\.[0-9]{1,4})?$","x-timbro-submission-validation":["pattern"]}},"additionalProperties":false,"title":"InvoiceForeignPaymentItem"},"InvoiceForeignPaymentResource":{"type":"object","required":["payee","withholdingBasis"],"properties":{"payee":{"$ref":"#/components/schemas/InvoiceForeignPayee"},"withholdingBasis":{"$ref":"#/components/schemas/InvoiceForeignPaymentWithholdingBasis"}},"additionalProperties":false,"title":"InvoiceForeignPaymentResource"},"InvoiceForeignPaymentWithholdingBasis":{"oneOf":[{"type":"object","required":["authorityReference","kind"],"properties":{"authorityReference":{"type":"string","minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","pattern"]},"kind":{"type":"string","enum":["dominicanSourceIncome"]}},"additionalProperties":false}],"discriminator":{"propertyName":"kind"},"title":"InvoiceForeignPaymentWithholdingBasis"},"InvoiceForeignTotals":{"type":"object","description":"An Invoice's totals in the currency it is priced in. `total` equals the price total.","required":["currency","exchangeRate","net","tax","total"],"properties":{"currency":{"type":"string","enum":["BRL","CAD","CHF","CHY","XDR","DKK","EUR","GBP","JPY","NOK","SCP","SEK","USD","VEF","HTG","MXN","COP"],"x-timbro-submission-validation":["enum"]},"exchangeRate":{"$ref":"#/components/schemas/InvoiceExchangeRate"},"net":{"type":"string","pattern":"^[0-9]+\\.[0-9]{2}$"},"tax":{"type":"string","pattern":"^[0-9]+\\.[0-9]{2}$"},"total":{"type":"string","pattern":"^[0-9]+\\.[0-9]{2}$"}},"additionalProperties":false,"title":"InvoiceForeignTotals"},"InvoiceGovernmentAdditionalInformation":{"type":"object","properties":{"referenceNumber":{"oneOf":[{"type":"null"},{"type":"string","maxLength":20,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"shipment":{"type":"object","properties":{"containerNumber":{"oneOf":[{"type":"null"},{"type":"string","maxLength":100,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"deliveryNoteNumber":{"oneOf":[{"type":"null"},{"type":"string","maxLength":20,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"driver":{"oneOf":[{"type":"null"},{"type":"string","maxLength":20,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"grossWeight":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]}]},"grossWeightUnit":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^([1-9]|[1-5][0-9]|6[0-2])$","x-timbro-submission-validation":["pattern"]}]},"netWeight":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]}]},"netWeightUnit":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^([1-9]|[1-5][0-9]|6[0-2])$","x-timbro-submission-validation":["pattern"]}]},"packageCount":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]}]},"packageUnit":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^([1-9]|[1-5][0-9]|6[0-2])$","x-timbro-submission-validation":["pattern"]}]},"packageVolume":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^(?=[0-9.]*[1-9])[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]}]},"route":{"oneOf":[{"type":"null"},{"type":"string","maxLength":20,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"shipmentDate":{"oneOf":[{"type":"null"},{"type":"string","format":"date","description":"A calendar date in the public API's ISO 8601 date form.","pattern":"^(19|20)[0-9]{2}-[0-9]{2}-[0-9]{2}$"}]},"shipmentNumber":{"oneOf":[{"type":"null"},{"type":"string","maxLength":25,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"transportDocumentNumber":{"oneOf":[{"type":"null"},{"type":"string","maxLength":20,"minLength":1,"pattern":"^[0-9]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"transportZone":{"oneOf":[{"type":"null"},{"type":"string","maxLength":20,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"vehicleFiche":{"oneOf":[{"type":"null"},{"type":"string","maxLength":10,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"vehiclePlate":{"oneOf":[{"type":"null"},{"type":"string","maxLength":7,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"volumeUnit":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^([1-9]|[1-5][0-9]|6[0-2])$","x-timbro-submission-validation":["pattern"]}]}},"additionalProperties":false}},"additionalProperties":false,"title":"InvoiceGovernmentAdditionalInformation"},"InvoiceGovernmentEligibility":{"oneOf":[{"type":"object","required":["authorityReference","entityKind"],"properties":{"authorityReference":{"type":"string","minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","pattern"]},"entityKind":{"type":"string","enum":["central_government"]}},"additionalProperties":false},{"type":"object","required":["authorityReference","entityKind"],"properties":{"authorityReference":{"type":"string","minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","pattern"]},"entityKind":{"type":"string","enum":["decentralized_or_autonomous"]}},"additionalProperties":false},{"type":"object","required":["authorityReference","entityKind"],"properties":{"authorityReference":{"type":"string","minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","pattern"]},"entityKind":{"type":"string","enum":["social_security"]}},"additionalProperties":false},{"type":"object","required":["authorityReference","entityKind"],"properties":{"authorityReference":{"type":"string","minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","pattern"]},"entityKind":{"type":"string","enum":["other_noncommercial_government"]}},"additionalProperties":false}],"discriminator":{"propertyName":"entityKind"},"title":"InvoiceGovernmentEligibility"},"InvoiceItem":{"type":"object","required":["description","quantity","unit","kind","unitPrice","tax"],"properties":{"additionalDescription":{"oneOf":[{"type":"null"},{"type":"string","maxLength":1000,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])(?!.*[\\u0000-\\u0008\\u000B\\u000C\\u000E-\\u001F\\uD800-\\uDFFF\\uFFFE\\uFFFF])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"],"x-timbro-xml10-text":true}],"description":"More detail about the item, such as the options chosen on the order, sent to the DGII as the\nitem's `DescripcionItem`. The PDF prints only `description`."},"adjustments":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LinePriceAdjustments"}]},"description":{"type":"string","maxLength":80,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"id":{"oneOf":[{"type":"null"},{"type":"string","maxLength":128,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"itemCodes":{"oneOf":[{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItemCode"},"maxItems":5,"minItems":0,"x-timbro-submission-validation":["minItems","maxItems"]}]},"kind":{"$ref":"#/components/schemas/SourceItemKind"},"legalTip":{"type":["boolean","null"]},"quantity":{"type":"string","pattern":"^(?=[0-9.]*[1-9])[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]},"tax":{"$ref":"#/components/schemas/InvoiceTax"},"unit":{"$ref":"#/components/schemas/SourceMeasurementUnit"},"unitPrice":{"type":"string","pattern":"^[0-9]{1,16}(\\.[0-9]{1,4})?$","x-timbro-submission-validation":["pattern"]}},"additionalProperties":false,"title":"InvoiceItem"},"InvoiceItemCode":{"type":"object","required":["typeCode","code"],"properties":{"code":{"type":"string","maxLength":35,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"typeCode":{"type":"string","maxLength":14,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}},"additionalProperties":false,"title":"InvoiceItemCode"},"InvoiceItemCodeResource":{"type":"object","required":["typeCode","code"],"properties":{"code":{"type":"string","maxLength":35,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])(?!.*[\\u0000-\\u0008\\u000B\\u000C\\u000E-\\u001F\\uD800-\\uDFFF\\uFFFE\\uFFFF])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"],"x-timbro-xml10-text":true},"typeCode":{"type":"string","maxLength":14,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])(?!.*[\\u0000-\\u0008\\u000B\\u000C\\u000E-\\u001F\\uD800-\\uDFFF\\uFFFE\\uFFFF])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"],"x-timbro-xml10-text":true}},"additionalProperties":false,"title":"InvoiceItemCodeResource"},"InvoiceItemResource":{"type":"object","required":["id","description","additionalDescription","quantity","unit","kind","unitPrice","tax","legalTip","itemCodes","additionalTaxCodes","adjustments","withholding"],"properties":{"additionalDescription":{"oneOf":[{"type":"null"},{"type":"string","maxLength":1000,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])(?!.*[\\u0000-\\u0008\\u000B\\u000C\\u000E-\\u001F\\uD800-\\uDFFF\\uFFFE\\uFFFF])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"],"x-timbro-xml10-text":true}]},"additionalTaxCodes":{"type":"array","items":{"type":"string"}},"adjustments":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceLinePriceAdjustmentsResource"}]},"description":{"type":"string"},"id":{"type":"string"},"itemCodes":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItemCodeResource"}},"kind":{"$ref":"#/components/schemas/SourceItemKind"},"legalTip":{"type":"boolean"},"quantity":{"type":"string","pattern":"^(?=[0-9.]*[1-9])[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]},"tax":{"$ref":"#/components/schemas/InvoiceTax"},"unit":{"$ref":"#/components/schemas/SourceMeasurementUnit"},"unitPrice":{"type":"string","pattern":"^[0-9]{1,16}(\\.[0-9]{1,4})?$","x-timbro-submission-validation":["pattern"]},"withholding":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceItemWithholding"}]}},"additionalProperties":false,"title":"InvoiceItemResource"},"InvoiceItemWithholding":{"oneOf":[{"type":"object","required":["itbisAmount","incomeTaxAmount","kind"],"properties":{"incomeTaxAmount":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]}]},"itbisAmount":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]}]},"kind":{"type":"string","enum":["purchase"]}},"additionalProperties":false},{"type":"object","required":["incomeTaxWithheld","kind"],"properties":{"incomeTaxWithheld":{"type":"string","pattern":"^[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]},"kind":{"type":"string","enum":["foreignPayment"]}},"additionalProperties":false}],"description":"Amounts withheld on one item, in DOP whatever the Invoice's `currency`.","discriminator":{"propertyName":"kind"},"title":"InvoiceItemWithholding"},"InvoiceLatestEvent":{"type":"object","required":["eventId","sequence","occurredAt"],"properties":{"eventId":{"type":"string","format":"uuid"},"occurredAt":{"type":"string","format":"date-time"},"sequence":{"type":"string","pattern":"^[1-9][0-9]*$"}},"additionalProperties":false,"title":"InvoiceLatestEvent"},"InvoiceLinePriceAdjustmentResource":{"oneOf":[{"type":"object","required":["amount","kind"],"properties":{"amount":{"type":"string","pattern":"^[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]},"kind":{"type":"string","enum":["fixed_amount"]}},"additionalProperties":false},{"type":"object","required":["percentage","kind"],"properties":{"kind":{"type":"string","enum":["percentage"]},"percentage":{"type":"string","pattern":"^(?=[0-9.]*[1-9])[0-9]{1,3}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]}},"additionalProperties":false}],"discriminator":{"propertyName":"kind"},"title":"InvoiceLinePriceAdjustmentResource"},"InvoiceLinePriceAdjustmentsResource":{"type":"object","required":["discounts","surcharges"],"properties":{"discounts":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceLinePriceAdjustmentResource"}},"surcharges":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceLinePriceAdjustmentResource"}}},"additionalProperties":false,"title":"InvoiceLinePriceAdjustmentsResource"},"InvoiceMinorExpenseItem":{"type":"object","required":["description","quantity","unit","kind","unitPrice"],"properties":{"additionalDescription":{"oneOf":[{"type":"null"},{"type":"string","maxLength":1000,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])(?!.*[\\u0000-\\u0008\\u000B\\u000C\\u000E-\\u001F\\uD800-\\uDFFF\\uFFFE\\uFFFF])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"],"x-timbro-xml10-text":true}],"description":"More detail about the item, such as the options chosen on the order, sent to the DGII as the\nitem's `DescripcionItem`. The PDF prints only `description`."},"description":{"type":"string","maxLength":80,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"id":{"oneOf":[{"type":"null"},{"type":"string","maxLength":128,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"itemCodes":{"oneOf":[{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItemCode"},"maxItems":5,"minItems":0,"x-timbro-submission-validation":["minItems","maxItems"]}]},"kind":{"$ref":"#/components/schemas/SourceItemKind"},"quantity":{"type":"string","pattern":"^(?=[0-9.]*[1-9])[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]},"unit":{"$ref":"#/components/schemas/SourceMeasurementUnit"},"unitPrice":{"type":"string","pattern":"^[0-9]{1,16}(\\.[0-9]{1,4})?$","x-timbro-submission-validation":["pattern"]}},"additionalProperties":false,"title":"InvoiceMinorExpenseItem"},"InvoiceMinorExpensePaymentTerms":{"oneOf":[{"type":"object","title":"ImmediatePaymentTerms","required":["type"],"properties":{"type":{"type":"string","enum":["immediate"]}},"additionalProperties":false},{"type":"object","title":"FreePaymentTerms","required":["type"],"properties":{"type":{"type":"string","enum":["free"]}},"additionalProperties":false}],"discriminator":{"propertyName":"type"},"title":"InvoiceMinorExpensePaymentTerms"},"InvoiceNumbering":{"type":"object","required":["eNcf"],"properties":{"eNcf":{"type":"string","pattern":"^E(31|32|33|34|41|43|44|45|46|47)[0-9]{10}$"},"sequenceExpiresOn":{"type":["string","null"]}},"additionalProperties":false,"title":"InvoiceNumbering"},"InvoicePage":{"type":"object","required":["object","data","hasMore","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceResource"}},"hasMore":{"type":"boolean"},"nextCursor":{"type":["string","null"]},"object":{"$ref":"#/components/schemas/CollectionObject"}},"additionalProperties":false,"title":"InvoicePage"},"InvoicePartInvoicing":{"type":"object","required":["mode","invoiceId"],"properties":{"mode":{"type":"string","const":"existing"},"invoiceId":{"type":"string","format":"uuid"}},"title":"InvoicePartInvoicing","description":"The accepted Invoice a part collects. A part never delivers the Invoice and collects only an Invoice issued through this business's own Source, so it takes no `recipientEmail` or `receipt`.","additionalProperties":false},"InvoicePaymentAccountResource":{"type":"object","required":["accountNumber","bankName"],"properties":{"accountNumber":{"oneOf":[{"type":"null"},{"type":"string","maxLength":28,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"bankName":{"oneOf":[{"type":"null"},{"type":"string","maxLength":75,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]}},"additionalProperties":false,"title":"InvoicePaymentAccountResource"},"InvoicePaymentAllocation":{"type":"object","description":"One payment method and its amount, in DOP whatever the Invoice's `currency`. The allocations\nsum to the DOP total.","required":["method","amount"],"properties":{"amount":{"type":"string","pattern":"^(?=[0-9.]*[1-9])[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]},"method":{"$ref":"#/components/schemas/SourcePaymentMethod"}},"additionalProperties":false,"title":"InvoicePaymentAllocation"},"InvoicePaymentTerms":{"oneOf":[{"type":"object","required":["type"],"properties":{"allocations":{"oneOf":[{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/InvoicePaymentAllocation"},"maxItems":7,"minItems":1,"x-timbro-submission-validation":["minItems","maxItems"]}]},"paymentAccount":{"type":"object","properties":{"accountNumber":{"oneOf":[{"type":"null"},{"type":"string","maxLength":28,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"bankName":{"oneOf":[{"type":"null"},{"type":"string","maxLength":75,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]}},"additionalProperties":false},"type":{"type":"string","enum":["immediate"]}},"additionalProperties":false},{"type":"object","title":"CreditPaymentTerms","required":["dueOn","type"],"properties":{"dueOn":{"type":"string","format":"date","description":"A calendar date in the public API's ISO 8601 date form.","pattern":"^(19|20)[0-9]{2}-[0-9]{2}-[0-9]{2}$"},"type":{"type":"string","enum":["credit"]}},"additionalProperties":false},{"type":"object","title":"FreePaymentTerms","required":["type"],"properties":{"type":{"type":"string","enum":["free"]}},"additionalProperties":false}],"discriminator":{"propertyName":"type"},"title":"InvoicePaymentTerms"},"InvoicePaymentTermsResource":{"oneOf":[{"type":"object","required":["allocations","type"],"properties":{"allocations":{"type":"array","items":{"$ref":"#/components/schemas/InvoicePaymentAllocation"},"maxItems":7},"paymentAccount":{"$ref":"#/components/schemas/InvoicePaymentAccountResource"},"type":{"type":"string","enum":["immediate"]}},"additionalProperties":false},{"type":"object","title":"CreditPaymentTerms","required":["dueOn","type"],"properties":{"dueOn":{"type":"string","format":"date","description":"A calendar date in the public API's ISO 8601 date form.","pattern":"^(19|20)[0-9]{2}-[0-9]{2}-[0-9]{2}$"},"type":{"type":"string","enum":["credit"]}},"additionalProperties":false},{"type":"object","title":"FreePaymentTerms","required":["type"],"properties":{"type":{"type":"string","enum":["free"]}},"additionalProperties":false}],"discriminator":{"propertyName":"type"},"title":"InvoicePaymentTermsResource"},"InvoicePdfLayout":{"type":"string","enum":["a4","receipt80mm"],"title":"InvoicePdfLayout"},"InvoicePdfReadiness":{"oneOf":[{"type":"object","title":"NotApplicableReadiness","required":["status"],"properties":{"status":{"type":"string","enum":["notApplicable"]}},"additionalProperties":false},{"type":"object","required":["stage","status"],"properties":{"stage":{"$ref":"#/components/schemas/InvoicePdfStage"},"status":{"type":"string","enum":["pending"]}},"additionalProperties":false},{"type":"object","required":["mediaType","signedSourceSha256","pdfSha256","byteLength","pageCount","layout","createdAt","status"],"properties":{"byteLength":{"type":"integer","format":"int32","maximum":2147483647,"minimum":1},"createdAt":{"type":"string","format":"date-time"},"layout":{"$ref":"#/components/schemas/InvoicePdfLayout"},"mediaType":{"$ref":"#/components/schemas/PrintedRepresentationPdfMediaType"},"pageCount":{"type":"integer","format":"int32","maximum":100,"minimum":1},"pdfSha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"signedSourceSha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"status":{"type":"string","enum":["ready"]}},"additionalProperties":false},{"type":"object","required":["layout","resultCode","status"],"properties":{"layout":{"$ref":"#/components/schemas/InvoicePdfLayout"},"resultCode":{"type":"string"},"status":{"type":"string","enum":["unavailable"]}},"additionalProperties":false}],"discriminator":{"propertyName":"status"},"title":"InvoicePdfReadiness"},"InvoicePdfStage":{"type":"string","enum":["awaitingSignedSource","queued","rendering","retryScheduled"],"title":"InvoicePdfStage"},"InvoicePreview":{"oneOf":[{"type":"object","required":["totals","status"],"properties":{"status":{"type":"string","enum":["valid"]},"totals":{"$ref":"#/components/schemas/InvoiceTotals"}},"additionalProperties":false},{"type":"object","required":["totals","problems","status"],"properties":{"problems":{"type":"array","items":{"$ref":"#/components/schemas/FiscalAdmissionProblem"}},"status":{"type":"string","enum":["invalid"]},"totals":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceTotals"}]}},"additionalProperties":false}],"discriminator":{"propertyName":"status"},"title":"InvoicePreview"},"InvoiceProcessingStage":{"type":"string","enum":["admitted","signed","consumerSummarySigned","submitted","authorityProcessing"],"title":"InvoiceProcessingStage"},"InvoicePurchaseItem":{"type":"object","required":["description","quantity","unit","kind","unitPrice","tax"],"properties":{"additionalDescription":{"oneOf":[{"type":"null"},{"type":"string","maxLength":1000,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])(?!.*[\\u0000-\\u0008\\u000B\\u000C\\u000E-\\u001F\\uD800-\\uDFFF\\uFFFE\\uFFFF])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"],"x-timbro-xml10-text":true}],"description":"More detail about the item, such as the options chosen on the order, sent to the DGII as the\nitem's `DescripcionItem`. The PDF prints only `description`."},"adjustments":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LinePriceAdjustments"}]},"description":{"type":"string","maxLength":80,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"id":{"oneOf":[{"type":"null"},{"type":"string","maxLength":128,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"itemCodes":{"oneOf":[{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItemCode"},"maxItems":5,"minItems":0,"x-timbro-submission-validation":["minItems","maxItems"]}]},"kind":{"$ref":"#/components/schemas/SourceItemKind"},"quantity":{"type":"string","pattern":"^(?=[0-9.]*[1-9])[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]},"tax":{"$ref":"#/components/schemas/InvoicePurchaseTax"},"unit":{"$ref":"#/components/schemas/SourceMeasurementUnit"},"unitPrice":{"type":"string","pattern":"^[0-9]{1,16}(\\.[0-9]{1,4})?$","x-timbro-submission-validation":["pattern"]},"withholding":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoicePurchaseWithholding"}]}},"additionalProperties":false,"title":"InvoicePurchaseItem"},"InvoicePurchaseTax":{"oneOf":[{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["itbis_18"]}},"additionalProperties":false},{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["itbis_16"]}},"additionalProperties":false},{"type":"object","title":"ZeroRatedTax","required":["kind"],"properties":{"kind":{"type":"string","enum":["zero_rated"]}},"additionalProperties":false},{"type":"object","title":"ExemptTax","required":["kind"],"properties":{"kind":{"type":"string","enum":["exempt"]}},"additionalProperties":false}],"discriminator":{"propertyName":"kind"},"title":"InvoicePurchaseTax"},"InvoicePurchaseWithholding":{"type":"object","description":"ITBIS and income tax withheld on one item, in DOP whatever the Invoice's `currency`.","properties":{"incomeTaxAmount":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]}]},"itbisAmount":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]}]}},"additionalProperties":false,"title":"InvoicePurchaseWithholding"},"InvoiceReceipt":{"type":"object","required":["id","invoiceId","originalInvoiceId","replacesInvoiceId","issuerTaxId","environment","source","buyer","governmentEligibility","items","supplier","foreignPayment","paymentTerms","status","fiscalIdentity","totals","currency","exchangeRate","acceptedAt","files"],"properties":{"acceptedAt":{"type":"string","format":"date-time"},"buyer":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceBuyerIdentity"}]},"currency":{"oneOf":[{"type":"string","enum":["DOP","BRL","CAD","CHF","CHY","XDR","DKK","EUR","GBP","JPY","NOK","SCP","SEK","USD","VEF","HTG","MXN","COP"],"x-timbro-submission-validation":["enum"]}],"description":"The currency the Invoice is priced in."},"environment":{"$ref":"#/components/schemas/FiscalEnvironment"},"exchangeRate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExchangeRate"}]},"files":{"$ref":"#/components/schemas/InvoiceReceiptFiles"},"fiscalIdentity":{"$ref":"#/components/schemas/InvoiceFiscalIdentity"},"foreignPayment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceForeignPaymentResource"}]},"governmentEligibility":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceGovernmentEligibility"}]},"id":{"type":"string","format":"uuid"},"invoiceId":{"type":"string","format":"uuid"},"issuerTaxId":{"type":"string"},"items":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InvoiceItemResource"}},"originalInvoiceId":{"type":["string","null"],"format":"uuid"},"paymentTerms":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoicePaymentTermsResource"}]},"replacesInvoiceId":{"type":["string","null"],"format":"uuid"},"source":{"$ref":"#/components/schemas/InvoiceSource"},"status":{"$ref":"#/components/schemas/InvoiceReceiptStatus"},"supplier":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceSupplierResource"}]},"totals":{"$ref":"#/components/schemas/InvoiceTotals"}},"additionalProperties":false,"title":"InvoiceReceipt"},"InvoiceReceiptAccess":{"type":"object","required":["id","invoiceId","accessToken"],"properties":{"accessToken":{"type":"string","maxLength":43,"minLength":43,"pattern":"^[A-Za-z0-9_-]{43}$"},"id":{"type":"string","format":"uuid"},"invoiceId":{"type":"string","format":"uuid"}},"additionalProperties":false,"title":"InvoiceReceiptAccess"},"InvoiceReceiptCredential":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"accessToken":{"type":"string","maxLength":43,"minLength":43,"pattern":"^[A-Za-z0-9_-]{43}$"}},"required":["id","accessToken"],"additionalProperties":false,"title":"InvoiceReceiptCredential","description":"Restricted receipt access for an Invoice owned by an independent Source. Keep the token private."},"InvoiceReceiptFiles":{"type":"object","required":["pdf"],"properties":{"pdf":{"$ref":"#/components/schemas/InvoicePdfReadiness"}},"additionalProperties":false,"title":"InvoiceReceiptFiles"},"InvoiceReceiptStatus":{"type":"string","enum":["accepted","acceptedWithObservations"],"title":"InvoiceReceiptStatus"},"InvoiceReferenceAttributionResource":{"oneOf":[{"type":"object","title":"InternalOperationReference","required":["fiscalOperationId","kind"],"properties":{"fiscalOperationId":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","x-timbro-submission-validation":["pattern"]},"kind":{"type":"string","enum":["internal_operation"]}},"additionalProperties":false},{"type":"object","required":["issuerTaxId","environment","sourceReference","kind"],"properties":{"environment":{"$ref":"#/components/schemas/FiscalEnvironment"},"issuerTaxId":{"type":"string","pattern":"^[0-9]{9}([0-9]{2})?$","x-timbro-submission-validation":["pattern"]},"kind":{"type":"string","enum":["external_document"]},"sourceReference":{"type":"string","maxLength":250,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}},"additionalProperties":false}],"discriminator":{"propertyName":"kind"},"title":"InvoiceReferenceAttributionResource"},"InvoiceReferenceInformation":{"type":"object","required":["attribution","fiscalNumber","issuedOn","modificationCode"],"properties":{"attribution":{"oneOf":[{"type":"object","title":"InternalOperationReference","required":["fiscalOperationId","kind"],"properties":{"fiscalOperationId":{"type":"string","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$","x-timbro-submission-validation":["pattern"]},"kind":{"type":"string","enum":["internal_operation"]}},"additionalProperties":false},{"type":"object","required":["issuerTaxId","environment","sourceReference","kind"],"properties":{"environment":{"$ref":"#/components/schemas/FiscalEnvironment"},"issuerTaxId":{"type":"string","pattern":"^[0-9]{9}([0-9]{2})?$","x-timbro-submission-validation":["pattern"]},"kind":{"type":"string","enum":["external_document"]},"sourceReference":{"type":"string","maxLength":250,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}},"additionalProperties":false}],"discriminator":{"propertyName":"kind"}},"fiscalNumber":{"type":"string","pattern":"^(B[0-9]{10}|E[0-9]{12}|[AP][0-9]{18})$","x-timbro-submission-validation":["pattern"]},"issuedOn":{"type":"string","format":"date","description":"A calendar date in the public API's ISO 8601 date form.","pattern":"^(19|20)[0-9]{2}-[0-9]{2}-[0-9]{2}$"},"modificationCode":{"type":"string","enum":["4","5"],"x-timbro-submission-validation":["enum"]}},"additionalProperties":false,"title":"InvoiceReferenceInformation"},"InvoiceReferenceInformationResource":{"type":"object","required":["attribution","fiscalNumber","issuedOn","modificationCode"],"properties":{"attribution":{"$ref":"#/components/schemas/InvoiceReferenceAttributionResource"},"fiscalNumber":{"type":"string","pattern":"^(B[0-9]{10}|E[0-9]{12}|[AP][0-9]{18})$","x-timbro-submission-validation":["pattern"]},"issuedOn":{"type":"string","pattern":"^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$","x-timbro-submission-validation":["pattern"]},"modificationCode":{"type":"string","enum":["4","5"],"x-timbro-submission-validation":["enum"]}},"additionalProperties":false,"title":"InvoiceReferenceInformationResource"},"InvoiceRequest":{"oneOf":[{"type":"object","required":["invoiceReference","currency","paymentTerms","items","buyer","type"],"properties":{"additionalInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceAdditionalInformation"}]},"buyer":{"$ref":"#/components/schemas/InvoiceBuyer"},"currency":{"type":"string","enum":["DOP","BRL","CAD","CHF","CHY","XDR","DKK","EUR","GBP","JPY","NOK","SCP","SEK","USD","VEF","HTG","MXN","COP"],"x-timbro-submission-validation":["enum"]},"exchangeRate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExchangeRate"}]},"expectedTotals":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExpectedTotals"}]},"incomeType":{"oneOf":[{"type":"null"},{"type":"string","enum":["01","02","03","04","05","06"],"x-timbro-submission-validation":["enum"]}]},"invoiceReference":{"type":"string","description":"The only field a source-system reference travels in, bounded at 128 characters.","maxLength":128,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItem"},"maxItems":1000,"minItems":1,"x-timbro-submission-validation":["minItems","maxItems"]},"numbering":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceNumbering"}]},"paymentTerms":{"$ref":"#/components/schemas/InvoicePaymentTerms"},"pdfLayout":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoicePdfLayout"}]},"referenceInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceReferenceInformation"}]},"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceSourceInput"}]},"type":{"type":"string","enum":["E31"]}},"additionalProperties":false,"title":"InvoiceRequestE31"},{"type":"object","required":["invoiceReference","currency","paymentTerms","items","type"],"properties":{"additionalInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceAdditionalInformation"}]},"buyer":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceConsumerBuyer"}]},"currency":{"type":"string","enum":["DOP","BRL","CAD","CHF","CHY","XDR","DKK","EUR","GBP","JPY","NOK","SCP","SEK","USD","VEF","HTG","MXN","COP"],"x-timbro-submission-validation":["enum"]},"exchangeRate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExchangeRate"}]},"expectedTotals":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExpectedTotals"}]},"incomeType":{"oneOf":[{"type":"null"},{"type":"string","enum":["01","02","03","04","05","06"],"x-timbro-submission-validation":["enum"]}]},"invoiceReference":{"type":"string","description":"The only field a source-system reference travels in, bounded at 128 characters.","maxLength":128,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItem"},"maxItems":1000,"minItems":1,"x-timbro-submission-validation":["minItems","maxItems"]},"numbering":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceNumbering"}]},"paymentTerms":{"$ref":"#/components/schemas/InvoicePaymentTerms"},"pdfLayout":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoicePdfLayout"}]},"referenceInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceReferenceInformation"}]},"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceSourceInput"}]},"type":{"type":"string","enum":["E32"]}},"additionalProperties":false,"title":"InvoiceRequestE32"},{"type":"object","required":["invoiceReference","currency","paymentTerms","supplier","items","type"],"properties":{"additionalInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceAdditionalInformation"}]},"currency":{"type":"string","enum":["DOP","BRL","CAD","CHF","CHY","XDR","DKK","EUR","GBP","JPY","NOK","SCP","SEK","USD","VEF","HTG","MXN","COP"],"x-timbro-submission-validation":["enum"]},"exchangeRate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExchangeRate"}]},"expectedTotals":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExpectedTotals"}]},"invoiceReference":{"type":"string","description":"The only field a source-system reference travels in, bounded at 128 characters.","maxLength":128,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/InvoicePurchaseItem"},"maxItems":1000,"minItems":1,"x-timbro-submission-validation":["minItems","maxItems"]},"numbering":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceNumbering"}]},"paymentTerms":{"$ref":"#/components/schemas/InvoicePaymentTerms"},"pdfLayout":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoicePdfLayout"}]},"referenceInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceReferenceInformation"}]},"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceSourceInput"}]},"supplier":{"type":"object","required":["taxId","legalName"],"properties":{"address":{"oneOf":[{"type":"null"},{"type":"string","maxLength":100,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"contactName":{"oneOf":[{"type":"null"},{"type":"string","maxLength":80,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"email":{"oneOf":[{"type":"null"},{"type":"string","maxLength":80,"pattern":"^[\\p{L}\\p{M}\\p{N}\\p{S}_]+(?:[-.][\\p{L}\\p{M}\\p{N}\\p{S}_]+)*@[\\p{L}\\p{M}\\p{N}\\p{S}]+(?:[-.][\\p{L}\\p{M}\\p{N}\\p{S}]+)*\\.[\\p{L}\\p{M}\\p{N}\\p{S}]+(?:[-.][\\p{L}\\p{M}\\p{N}\\p{S}]+)*$","x-timbro-submission-validation":["maxLength","pattern"]}]},"internalCode":{"oneOf":[{"type":"null"},{"type":"string","maxLength":20,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"legalName":{"type":"string","maxLength":150,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"municipalityCode":{"oneOf":[{"type":"null"},{"type":"string","enum":["010000","010100","010101","020000","020100","020101","020102","020103","020104","020105","020106","020107","020108","020109","020200","020201","020202","020300","020301","020302","020303","020400","020401","020402","020403","020404","020405","020500","020501","020600","020601","020602","020603","020604","020700","020701","020702","020800","020801","020802","020803","020804","020900","020901","021000","021001","030000","030001","030101","030102","030200","030201","030202","030300","030301","030302","030303","030304","030305","030306","030307","030400","030401","030500","030501","030502","040000","040100","040101","040102","040103","040104","040200","040201","040300","040301","040302","040400","040401","040402","040500","040501","040502","040503","040504","040600","040601","040700","040701","040702","040800","040801","040802","040900","040901","041000","041001","041100","041101","041102","050000","050100","050101","050102","050200","050201","050202","050203","050300","050301","050400","050401","050500","050501","050502","060000","060100","060101","060102","060103","060104","060105","060200","060201","060202","060203","060300","060301","060400","060401","060500","060501","060502","060503","060504","060505","060600","060601","060700","060701","060702","070000","070100","070101","070102","070103","070200","070201","070202","070203","070300","070301","070302","070400","070401","070402","070500","070501","070502","070600","070601","080000","080100","080101","080102","080103","080104","080200","080201","080202","080203","090000","090100","090101","090102","090103","090104","090105","090106","090107","090108","090109","090200","090201","090300","090301","090302","090303","090304","090400","090401","100000","100100","100101","100102","100103","100200","100201","100202","100300","100301","100400","100401","100402","100500","100501","100502","100600","100601","100602","110000","110100","110101","110102","110103","110104","110200","110201","110202","110203","120000","120100","120101","120102","120200","120201","120300","120301","120302","130000","130100","130101","130102","130103","130104","130105","130200","130201","130202","130203","130300","130301","130302","130303","130400","130401","130402","140000","140100","140101","140102","140103","140104","140200","140201","140202","140203","140300","140301","140302","140400","140401","150000","150100","150101","150200","150201","150202","150300","150301","150302","150303","150304","150400","150401","150500","150501","150502","150600","150601","160000","160100","160101","160102","160200","160201","160202","170000","170100","170101","170102","170103","170104","170105","170106","170107","170108","170109","170110","170200","170201","170202","170203","170300","170301","180000","180100","180101","180102","180103","180200","180201","180202","180300","180301","180400","180401","180500","180501","180502","180600","180601","180602","180603","180604","180700","180701","180702","180703","180800","180801","180802","180803","180804","180900","180901","190000","190100","190101","190102","190200","190201","190202","190300","190301","200000","200100","200101","200102","200103","200104","200200","200201","200300","200301","210000","210100","210101","210102","210103","210200","210201","210300","210301","210302","210303","210400","210401","210402","210500","210501","210502","210503","210504","210600","210601","210602","210700","210701","210800","210801","220000","220100","220101","220102","220103","220104","220105","220106","220107","220108","220109","220110","220111","220200","220201","220202","220203","220300","220301","220302","220303","220400","220401","220402","220500","220501","220502","220503","220600","220601","220602","230000","230100","230101","230200","230201","230202","230203","230300","230301","230400","230401","230500","230501","230600","230601","240000","240100","240101","240102","240103","240104","240105","240106","240200","240201","240202","240300","240301","240400","240401","240402","240403","240404","250000","250100","250101","250102","250104","250105","250106","250107","250200","250201","250300","250301","250302","250303","250400","250401","250402","250500","250501","250502","250503","250504","250600","250601","250602","250700","250701","250702","250703","250800","250801","250802","250803","250900","250901","251000","251001","260000","260100","260101","260200","260201","260300","260301","270000","270100","270101","270102","270103","270104","270200","270201","270202","270203","270204","270205","270300","270301","270302","270303","270304","280000","280100","280101","280102","280103","280104","280105","280106","280200","280201","280300","280301","280302","280303","290000","290100","290101","290102","290103","290104","290200","290201","290300","290301","290302","290303","290400","290402","290403","290500","290501","300000","300100","300101","300102","300103","300104","300200","300201","300202","300300","300301","310000","310100","310101","310102","310103","310104","310105","310200","310201","310300","310301","320000","320100","320101","320102","320200","320201","320300","320301","320302","320400","320401","320402","320500","320501","320502","320600","320601","320602","320603","320700","320701","320702","320703"],"pattern":"^[0-9]{6}$","x-timbro-submission-validation":["pattern","enum"]}]},"provinceCode":{"oneOf":[{"type":"null"},{"type":"string","enum":["010000","010100","010101","020000","020100","020101","020102","020103","020104","020105","020106","020107","020108","020109","020200","020201","020202","020300","020301","020302","020303","020400","020401","020402","020403","020404","020405","020500","020501","020600","020601","020602","020603","020604","020700","020701","020702","020800","020801","020802","020803","020804","020900","020901","021000","021001","030000","030001","030101","030102","030200","030201","030202","030300","030301","030302","030303","030304","030305","030306","030307","030400","030401","030500","030501","030502","040000","040100","040101","040102","040103","040104","040200","040201","040300","040301","040302","040400","040401","040402","040500","040501","040502","040503","040504","040600","040601","040700","040701","040702","040800","040801","040802","040900","040901","041000","041001","041100","041101","041102","050000","050100","050101","050102","050200","050201","050202","050203","050300","050301","050400","050401","050500","050501","050502","060000","060100","060101","060102","060103","060104","060105","060200","060201","060202","060203","060300","060301","060400","060401","060500","060501","060502","060503","060504","060505","060600","060601","060700","060701","060702","070000","070100","070101","070102","070103","070200","070201","070202","070203","070300","070301","070302","070400","070401","070402","070500","070501","070502","070600","070601","080000","080100","080101","080102","080103","080104","080200","080201","080202","080203","090000","090100","090101","090102","090103","090104","090105","090106","090107","090108","090109","090200","090201","090300","090301","090302","090303","090304","090400","090401","100000","100100","100101","100102","100103","100200","100201","100202","100300","100301","100400","100401","100402","100500","100501","100502","100600","100601","100602","110000","110100","110101","110102","110103","110104","110200","110201","110202","110203","120000","120100","120101","120102","120200","120201","120300","120301","120302","130000","130100","130101","130102","130103","130104","130105","130200","130201","130202","130203","130300","130301","130302","130303","130400","130401","130402","140000","140100","140101","140102","140103","140104","140200","140201","140202","140203","140300","140301","140302","140400","140401","150000","150100","150101","150200","150201","150202","150300","150301","150302","150303","150304","150400","150401","150500","150501","150502","150600","150601","160000","160100","160101","160102","160200","160201","160202","170000","170100","170101","170102","170103","170104","170105","170106","170107","170108","170109","170110","170200","170201","170202","170203","170300","170301","180000","180100","180101","180102","180103","180200","180201","180202","180300","180301","180400","180401","180500","180501","180502","180600","180601","180602","180603","180604","180700","180701","180702","180703","180800","180801","180802","180803","180804","180900","180901","190000","190100","190101","190102","190200","190201","190202","190300","190301","200000","200100","200101","200102","200103","200104","200200","200201","200300","200301","210000","210100","210101","210102","210103","210200","210201","210300","210301","210302","210303","210400","210401","210402","210500","210501","210502","210503","210504","210600","210601","210602","210700","210701","210800","210801","220000","220100","220101","220102","220103","220104","220105","220106","220107","220108","220109","220110","220111","220200","220201","220202","220203","220300","220301","220302","220303","220400","220401","220402","220500","220501","220502","220503","220600","220601","220602","230000","230100","230101","230200","230201","230202","230203","230300","230301","230400","230401","230500","230501","230600","230601","240000","240100","240101","240102","240103","240104","240105","240106","240200","240201","240202","240300","240301","240400","240401","240402","240403","240404","250000","250100","250101","250102","250104","250105","250106","250107","250200","250201","250300","250301","250302","250303","250400","250401","250402","250500","250501","250502","250503","250504","250600","250601","250602","250700","250701","250702","250703","250800","250801","250802","250803","250900","250901","251000","251001","260000","260100","260101","260200","260201","260300","260301","270000","270100","270101","270102","270103","270104","270200","270201","270202","270203","270204","270205","270300","270301","270302","270303","270304","280000","280100","280101","280102","280103","280104","280105","280106","280200","280201","280300","280301","280302","280303","290000","290100","290101","290102","290103","290104","290200","290201","290300","290301","290302","290303","290400","290402","290403","290500","290501","300000","300100","300101","300102","300103","300104","300200","300201","300202","300300","300301","310000","310100","310101","310102","310103","310104","310105","310200","310201","310300","310301","320000","320100","320101","320102","320200","320201","320300","320301","320302","320400","320401","320402","320500","320501","320502","320600","320601","320602","320603","320700","320701","320702","320703"],"pattern":"^[0-9]{6}$","x-timbro-submission-validation":["pattern","enum"]}]},"taxId":{"type":"string","pattern":"^[0-9]{9}([0-9]{2})?$","x-timbro-submission-validation":["pattern"]}},"additionalProperties":false},"type":{"type":"string","enum":["E41"]}},"additionalProperties":false,"title":"InvoiceRequestE41"},{"type":"object","required":["invoiceReference","currency","paymentTerms","buyer","governmentEligibility","items","type"],"properties":{"additionalInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceGovernmentAdditionalInformation"}]},"buyer":{"type":"object","required":["taxId","legalName"],"properties":{"address":{"oneOf":[{"type":"null"},{"type":"string","maxLength":100,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"contactName":{"oneOf":[{"type":"null"},{"type":"string","maxLength":80,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"deliveryOn":{"oneOf":[{"type":"null"},{"type":"string","format":"date","description":"A calendar date in the public API's ISO 8601 date form.","pattern":"^(19|20)[0-9]{2}-[0-9]{2}-[0-9]{2}$"}]},"deliveryPhone":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^[0-9]{3}-[0-9]{3}-[0-9]{4}$","x-timbro-submission-validation":["pattern"]}]},"email":{"oneOf":[{"type":"null"},{"type":"string","maxLength":80,"pattern":"^[\\p{L}\\p{M}\\p{N}\\p{S}_]+(?:[-.][\\p{L}\\p{M}\\p{N}\\p{S}_]+)*@[\\p{L}\\p{M}\\p{N}\\p{S}]+(?:[-.][\\p{L}\\p{M}\\p{N}\\p{S}]+)*\\.[\\p{L}\\p{M}\\p{N}\\p{S}]+(?:[-.][\\p{L}\\p{M}\\p{N}\\p{S}]+)*$","x-timbro-submission-validation":["maxLength","pattern"]}]},"internalCode":{"oneOf":[{"type":"null"},{"type":"string","maxLength":20,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"legalName":{"type":"string","maxLength":150,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"municipalityCode":{"oneOf":[{"type":"null"},{"type":"string","enum":["010000","010100","010101","020000","020100","020101","020102","020103","020104","020105","020106","020107","020108","020109","020200","020201","020202","020300","020301","020302","020303","020400","020401","020402","020403","020404","020405","020500","020501","020600","020601","020602","020603","020604","020700","020701","020702","020800","020801","020802","020803","020804","020900","020901","021000","021001","030000","030001","030101","030102","030200","030201","030202","030300","030301","030302","030303","030304","030305","030306","030307","030400","030401","030500","030501","030502","040000","040100","040101","040102","040103","040104","040200","040201","040300","040301","040302","040400","040401","040402","040500","040501","040502","040503","040504","040600","040601","040700","040701","040702","040800","040801","040802","040900","040901","041000","041001","041100","041101","041102","050000","050100","050101","050102","050200","050201","050202","050203","050300","050301","050400","050401","050500","050501","050502","060000","060100","060101","060102","060103","060104","060105","060200","060201","060202","060203","060300","060301","060400","060401","060500","060501","060502","060503","060504","060505","060600","060601","060700","060701","060702","070000","070100","070101","070102","070103","070200","070201","070202","070203","070300","070301","070302","070400","070401","070402","070500","070501","070502","070600","070601","080000","080100","080101","080102","080103","080104","080200","080201","080202","080203","090000","090100","090101","090102","090103","090104","090105","090106","090107","090108","090109","090200","090201","090300","090301","090302","090303","090304","090400","090401","100000","100100","100101","100102","100103","100200","100201","100202","100300","100301","100400","100401","100402","100500","100501","100502","100600","100601","100602","110000","110100","110101","110102","110103","110104","110200","110201","110202","110203","120000","120100","120101","120102","120200","120201","120300","120301","120302","130000","130100","130101","130102","130103","130104","130105","130200","130201","130202","130203","130300","130301","130302","130303","130400","130401","130402","140000","140100","140101","140102","140103","140104","140200","140201","140202","140203","140300","140301","140302","140400","140401","150000","150100","150101","150200","150201","150202","150300","150301","150302","150303","150304","150400","150401","150500","150501","150502","150600","150601","160000","160100","160101","160102","160200","160201","160202","170000","170100","170101","170102","170103","170104","170105","170106","170107","170108","170109","170110","170200","170201","170202","170203","170300","170301","180000","180100","180101","180102","180103","180200","180201","180202","180300","180301","180400","180401","180500","180501","180502","180600","180601","180602","180603","180604","180700","180701","180702","180703","180800","180801","180802","180803","180804","180900","180901","190000","190100","190101","190102","190200","190201","190202","190300","190301","200000","200100","200101","200102","200103","200104","200200","200201","200300","200301","210000","210100","210101","210102","210103","210200","210201","210300","210301","210302","210303","210400","210401","210402","210500","210501","210502","210503","210504","210600","210601","210602","210700","210701","210800","210801","220000","220100","220101","220102","220103","220104","220105","220106","220107","220108","220109","220110","220111","220200","220201","220202","220203","220300","220301","220302","220303","220400","220401","220402","220500","220501","220502","220503","220600","220601","220602","230000","230100","230101","230200","230201","230202","230203","230300","230301","230400","230401","230500","230501","230600","230601","240000","240100","240101","240102","240103","240104","240105","240106","240200","240201","240202","240300","240301","240400","240401","240402","240403","240404","250000","250100","250101","250102","250104","250105","250106","250107","250200","250201","250300","250301","250302","250303","250400","250401","250402","250500","250501","250502","250503","250504","250600","250601","250602","250700","250701","250702","250703","250800","250801","250802","250803","250900","250901","251000","251001","260000","260100","260101","260200","260201","260300","260301","270000","270100","270101","270102","270103","270104","270200","270201","270202","270203","270204","270205","270300","270301","270302","270303","270304","280000","280100","280101","280102","280103","280104","280105","280106","280200","280201","280300","280301","280302","280303","290000","290100","290101","290102","290103","290104","290200","290201","290300","290301","290302","290303","290400","290402","290403","290500","290501","300000","300100","300101","300102","300103","300104","300200","300201","300202","300300","300301","310000","310100","310101","310102","310103","310104","310105","310200","310201","310300","310301","320000","320100","320101","320102","320200","320201","320300","320301","320302","320400","320401","320402","320500","320501","320502","320600","320601","320602","320603","320700","320701","320702","320703"],"pattern":"^[0-9]{6}$","x-timbro-submission-validation":["pattern","enum"]}]},"provinceCode":{"oneOf":[{"type":"null"},{"type":"string","enum":["010000","010100","010101","020000","020100","020101","020102","020103","020104","020105","020106","020107","020108","020109","020200","020201","020202","020300","020301","020302","020303","020400","020401","020402","020403","020404","020405","020500","020501","020600","020601","020602","020603","020604","020700","020701","020702","020800","020801","020802","020803","020804","020900","020901","021000","021001","030000","030001","030101","030102","030200","030201","030202","030300","030301","030302","030303","030304","030305","030306","030307","030400","030401","030500","030501","030502","040000","040100","040101","040102","040103","040104","040200","040201","040300","040301","040302","040400","040401","040402","040500","040501","040502","040503","040504","040600","040601","040700","040701","040702","040800","040801","040802","040900","040901","041000","041001","041100","041101","041102","050000","050100","050101","050102","050200","050201","050202","050203","050300","050301","050400","050401","050500","050501","050502","060000","060100","060101","060102","060103","060104","060105","060200","060201","060202","060203","060300","060301","060400","060401","060500","060501","060502","060503","060504","060505","060600","060601","060700","060701","060702","070000","070100","070101","070102","070103","070200","070201","070202","070203","070300","070301","070302","070400","070401","070402","070500","070501","070502","070600","070601","080000","080100","080101","080102","080103","080104","080200","080201","080202","080203","090000","090100","090101","090102","090103","090104","090105","090106","090107","090108","090109","090200","090201","090300","090301","090302","090303","090304","090400","090401","100000","100100","100101","100102","100103","100200","100201","100202","100300","100301","100400","100401","100402","100500","100501","100502","100600","100601","100602","110000","110100","110101","110102","110103","110104","110200","110201","110202","110203","120000","120100","120101","120102","120200","120201","120300","120301","120302","130000","130100","130101","130102","130103","130104","130105","130200","130201","130202","130203","130300","130301","130302","130303","130400","130401","130402","140000","140100","140101","140102","140103","140104","140200","140201","140202","140203","140300","140301","140302","140400","140401","150000","150100","150101","150200","150201","150202","150300","150301","150302","150303","150304","150400","150401","150500","150501","150502","150600","150601","160000","160100","160101","160102","160200","160201","160202","170000","170100","170101","170102","170103","170104","170105","170106","170107","170108","170109","170110","170200","170201","170202","170203","170300","170301","180000","180100","180101","180102","180103","180200","180201","180202","180300","180301","180400","180401","180500","180501","180502","180600","180601","180602","180603","180604","180700","180701","180702","180703","180800","180801","180802","180803","180804","180900","180901","190000","190100","190101","190102","190200","190201","190202","190300","190301","200000","200100","200101","200102","200103","200104","200200","200201","200300","200301","210000","210100","210101","210102","210103","210200","210201","210300","210301","210302","210303","210400","210401","210402","210500","210501","210502","210503","210504","210600","210601","210602","210700","210701","210800","210801","220000","220100","220101","220102","220103","220104","220105","220106","220107","220108","220109","220110","220111","220200","220201","220202","220203","220300","220301","220302","220303","220400","220401","220402","220500","220501","220502","220503","220600","220601","220602","230000","230100","230101","230200","230201","230202","230203","230300","230301","230400","230401","230500","230501","230600","230601","240000","240100","240101","240102","240103","240104","240105","240106","240200","240201","240202","240300","240301","240400","240401","240402","240403","240404","250000","250100","250101","250102","250104","250105","250106","250107","250200","250201","250300","250301","250302","250303","250400","250401","250402","250500","250501","250502","250503","250504","250600","250601","250602","250700","250701","250702","250703","250800","250801","250802","250803","250900","250901","251000","251001","260000","260100","260101","260200","260201","260300","260301","270000","270100","270101","270102","270103","270104","270200","270201","270202","270203","270204","270205","270300","270301","270302","270303","270304","280000","280100","280101","280102","280103","280104","280105","280106","280200","280201","280300","280301","280302","280303","290000","290100","290101","290102","290103","290104","290200","290201","290300","290301","290302","290303","290400","290402","290403","290500","290501","300000","300100","300101","300102","300103","300104","300200","300201","300202","300300","300301","310000","310100","310101","310102","310103","310104","310105","310200","310201","310300","310301","320000","320100","320101","320102","320200","320201","320300","320301","320302","320400","320401","320402","320500","320501","320502","320600","320601","320602","320603","320700","320701","320702","320703"],"pattern":"^[0-9]{6}$","x-timbro-submission-validation":["pattern","enum"]}]},"purchaseOrderNumber":{"oneOf":[{"type":"null"},{"type":"string","maxLength":20,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"purchaseOrderOn":{"oneOf":[{"type":"null"},{"type":"string","format":"date","description":"A calendar date in the public API's ISO 8601 date form.","pattern":"^(19|20)[0-9]{2}-[0-9]{2}-[0-9]{2}$"}]},"taxId":{"type":"string","pattern":"^[0-9]{9}([0-9]{2})?$","x-timbro-submission-validation":["pattern"]}},"additionalProperties":false},"currency":{"type":"string","enum":["DOP","BRL","CAD","CHF","CHY","XDR","DKK","EUR","GBP","JPY","NOK","SCP","SEK","USD","VEF","HTG","MXN","COP"],"x-timbro-submission-validation":["enum"]},"exchangeRate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExchangeRate"}]},"expectedTotals":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExpectedTotals"}]},"governmentEligibility":{"$ref":"#/components/schemas/InvoiceGovernmentEligibility"},"incomeType":{"oneOf":[{"type":"null"},{"type":"string","enum":["01","02","03","04","05","06"],"x-timbro-submission-validation":["enum"]}]},"invoiceReference":{"type":"string","description":"The only field a source-system reference travels in, bounded at 128 characters.","maxLength":128,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItem"},"maxItems":1000,"minItems":1,"x-timbro-submission-validation":["minItems","maxItems"]},"numbering":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceNumbering"}]},"paymentTerms":{"$ref":"#/components/schemas/InvoicePaymentTerms"},"pdfLayout":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoicePdfLayout"}]},"referenceInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceReferenceInformation"}]},"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceSourceInput"}]},"type":{"type":"string","enum":["E45"]}},"additionalProperties":false,"title":"InvoiceRequestE45"},{"type":"object","required":["invoiceReference","currency","items","type"],"properties":{"currency":{"type":"string","enum":["DOP","BRL","CAD","CHF","CHY","XDR","DKK","EUR","GBP","JPY","NOK","SCP","SEK","USD","VEF","HTG","MXN","COP"],"x-timbro-submission-validation":["enum"]},"exchangeRate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExchangeRate"}]},"expectedTotals":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExpectedTotals"}]},"invoiceReference":{"type":"string","description":"The only field a source-system reference travels in, bounded at 128 characters.","maxLength":128,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceMinorExpenseItem"},"maxItems":1000,"minItems":1,"x-timbro-submission-validation":["minItems","maxItems"]},"numbering":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceNumbering"}]},"paymentTerms":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceMinorExpensePaymentTerms"}]},"pdfLayout":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoicePdfLayout"}]},"referenceInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceReferenceInformation"}]},"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceSourceInput"}]},"type":{"type":"string","enum":["E43"]}},"additionalProperties":false,"title":"InvoiceRequestE43"},{"type":"object","required":["invoiceReference","currency","foreignPayee","withholdingBasis","items","type"],"properties":{"currency":{"type":"string","enum":["DOP","BRL","CAD","CHF","CHY","XDR","DKK","EUR","GBP","JPY","NOK","SCP","SEK","USD","VEF","HTG","MXN","COP"],"x-timbro-submission-validation":["enum"]},"exchangeRate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExchangeRate"}]},"expectedTotals":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExpectedTotals"}]},"foreignPayee":{"$ref":"#/components/schemas/InvoiceForeignPayee"},"invoiceReference":{"type":"string","description":"The only field a source-system reference travels in, bounded at 128 characters.","maxLength":128,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceForeignPaymentItem"},"maxItems":1000,"minItems":1,"x-timbro-submission-validation":["minItems","maxItems"]},"numbering":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceNumbering"}]},"paymentTerms":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoicePaymentTerms"}]},"pdfLayout":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoicePdfLayout"}]},"referenceInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceReferenceInformation"}]},"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceSourceInput"}]},"type":{"type":"string","enum":["E47"]},"withholdingBasis":{"$ref":"#/components/schemas/InvoiceForeignPaymentBasis"}},"additionalProperties":false,"title":"InvoiceRequestE47"},{"type":"object","required":["invoiceReference","currency","paymentTerms","buyer","eligibility","items","type"],"properties":{"additionalInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceAdditionalInformation"}]},"buyer":{"$ref":"#/components/schemas/InvoiceSpecialRegimeBuyer"},"currency":{"type":"string","enum":["DOP","BRL","CAD","CHF","CHY","XDR","DKK","EUR","GBP","JPY","NOK","SCP","SEK","USD","VEF","HTG","MXN","COP"],"x-timbro-submission-validation":["enum"]},"eligibility":{"$ref":"#/components/schemas/InvoiceSpecialRegimeEligibility"},"exchangeRate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExchangeRate"}]},"expectedTotals":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExpectedTotals"}]},"incomeType":{"oneOf":[{"type":"null"},{"type":"string","enum":["01","02","03","04","05","06"],"x-timbro-submission-validation":["enum"]}]},"invoiceReference":{"type":"string","description":"The only field a source-system reference travels in, bounded at 128 characters.","maxLength":128,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceSpecialRegimeItem"},"maxItems":1000,"minItems":1,"x-timbro-submission-validation":["minItems","maxItems"]},"numbering":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceNumbering"}]},"paymentTerms":{"$ref":"#/components/schemas/InvoicePaymentTerms"},"pdfLayout":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoicePdfLayout"}]},"referenceInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceReferenceInformation"}]},"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceSourceInput"}]},"type":{"type":"string","enum":["E44"]}},"additionalProperties":false,"title":"InvoiceRequestE44"},{"type":"object","required":["invoiceReference","currency","paymentTerms","buyer","eligibility","items","type"],"properties":{"additionalInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceAdditionalInformation"}]},"buyer":{"$ref":"#/components/schemas/InvoiceExportBuyer"},"currency":{"type":"string","enum":["DOP","BRL","CAD","CHF","CHY","XDR","DKK","EUR","GBP","JPY","NOK","SCP","SEK","USD","VEF","HTG","MXN","COP"],"x-timbro-submission-validation":["enum"]},"eligibility":{"$ref":"#/components/schemas/InvoiceExportEligibility"},"exchangeRate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExchangeRate"}]},"expectedTotals":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExpectedTotals"}]},"incomeType":{"oneOf":[{"type":"null"},{"type":"string","enum":["01","02","03","04","05","06"],"x-timbro-submission-validation":["enum"]}]},"invoiceReference":{"type":"string","description":"The only field a source-system reference travels in, bounded at 128 characters.","maxLength":128,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceExportItem"},"maxItems":1000,"minItems":1,"x-timbro-submission-validation":["minItems","maxItems"]},"numbering":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceNumbering"}]},"paymentTerms":{"$ref":"#/components/schemas/InvoicePaymentTerms"},"pdfLayout":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoicePdfLayout"}]},"referenceInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceReferenceInformation"}]},"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceSourceInput"}]},"type":{"type":"string","enum":["E46"]}},"additionalProperties":false,"title":"InvoiceRequestE46"},{"type":"object","required":["invoiceReference","currency","paymentTerms","items","modificationCode","reason","originalInvoiceId","type"],"properties":{"additionalInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceAdditionalInformation"}]},"currency":{"type":"string","enum":["DOP","BRL","CAD","CHF","CHY","XDR","DKK","EUR","GBP","JPY","NOK","SCP","SEK","USD","VEF","HTG","MXN","COP"],"x-timbro-submission-validation":["enum"]},"exchangeRate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExchangeRate"}]},"expectedTotals":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExpectedTotals"}]},"incomeType":{"oneOf":[{"type":"null"},{"type":"string","enum":["01","02","03","04","05","06"],"x-timbro-submission-validation":["enum"]}]},"invoiceReference":{"type":"string","description":"The only field a source-system reference travels in, bounded at 128 characters.","maxLength":128,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItem"},"maxItems":1000,"minItems":1,"x-timbro-submission-validation":["minItems","maxItems"]},"modificationCode":{"$ref":"#/components/schemas/InvoiceDebitNoteModificationCode"},"numbering":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceNumbering"}]},"originalInvoiceId":{"type":"string","format":"uuid","description":"The Invoice Timbro issued that this note modifies. The note takes its buyer from that Invoice."},"paymentTerms":{"$ref":"#/components/schemas/InvoicePaymentTerms"},"pdfLayout":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoicePdfLayout"}]},"reason":{"type":"string","maxLength":90,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceSourceInput"}]},"type":{"type":"string","enum":["E33"]}},"additionalProperties":false,"title":"InvoiceRequestE33"},{"type":"object","required":["invoiceReference","currency","paymentTerms","items","modificationCode","reason","externalOriginal","type"],"properties":{"additionalInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceAdditionalInformation"}]},"currency":{"type":"string","enum":["DOP","BRL","CAD","CHF","CHY","XDR","DKK","EUR","GBP","JPY","NOK","SCP","SEK","USD","VEF","HTG","MXN","COP"],"x-timbro-submission-validation":["enum"]},"exchangeRate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExchangeRate"}]},"expectedTotals":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExpectedTotals"}]},"externalOriginal":{"$ref":"#/components/schemas/InvoiceExternalOriginal"},"incomeType":{"oneOf":[{"type":"null"},{"type":"string","enum":["01","02","03","04","05","06"],"x-timbro-submission-validation":["enum"]}]},"invoiceReference":{"type":"string","description":"The only field a source-system reference travels in, bounded at 128 characters.","maxLength":128,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItem"},"maxItems":1000,"minItems":1,"x-timbro-submission-validation":["minItems","maxItems"]},"modificationCode":{"$ref":"#/components/schemas/InvoiceDebitNoteModificationCode"},"numbering":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceNumbering"}]},"paymentTerms":{"$ref":"#/components/schemas/InvoicePaymentTerms"},"pdfLayout":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoicePdfLayout"}]},"reason":{"type":"string","maxLength":90,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceSourceInput"}]},"type":{"type":"string","enum":["E33"]}},"additionalProperties":false,"title":"InvoiceRequestE33External"},{"type":"object","required":["invoiceReference","currency","paymentTerms","items","modificationCode","reason","originalInvoiceId","type"],"properties":{"additionalInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceAdditionalInformation"}]},"currency":{"type":"string","enum":["DOP","BRL","CAD","CHF","CHY","XDR","DKK","EUR","GBP","JPY","NOK","SCP","SEK","USD","VEF","HTG","MXN","COP"],"x-timbro-submission-validation":["enum"]},"exchangeRate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExchangeRate"}]},"expectedTotals":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExpectedTotals"}]},"incomeType":{"oneOf":[{"type":"null"},{"type":"string","enum":["01","02","03","04","05","06"],"x-timbro-submission-validation":["enum"]}]},"invoiceReference":{"type":"string","description":"The only field a source-system reference travels in, bounded at 128 characters.","maxLength":128,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItem"},"maxItems":10000,"minItems":1,"x-timbro-submission-validation":["minItems","maxItems"]},"modificationCode":{"$ref":"#/components/schemas/InvoiceCreditNoteModificationCode"},"numbering":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceNumbering"}]},"originalInvoiceId":{"type":"string","format":"uuid","description":"The Invoice Timbro issued that this note modifies. The note takes its buyer from that Invoice."},"paymentTerms":{"$ref":"#/components/schemas/InvoiceCreditNotePaymentTerms"},"pdfLayout":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoicePdfLayout"}]},"reason":{"type":"string","maxLength":90,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceSourceInput"}]},"type":{"type":"string","enum":["E34"]}},"additionalProperties":false,"title":"InvoiceRequestE34"},{"type":"object","required":["invoiceReference","currency","paymentTerms","items","modificationCode","reason","externalOriginal","type"],"properties":{"additionalInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceAdditionalInformation"}]},"currency":{"type":"string","enum":["DOP","BRL","CAD","CHF","CHY","XDR","DKK","EUR","GBP","JPY","NOK","SCP","SEK","USD","VEF","HTG","MXN","COP"],"x-timbro-submission-validation":["enum"]},"exchangeRate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExchangeRate"}]},"expectedTotals":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExpectedTotals"}]},"externalOriginal":{"$ref":"#/components/schemas/InvoiceExternalOriginal"},"incomeType":{"oneOf":[{"type":"null"},{"type":"string","enum":["01","02","03","04","05","06"],"x-timbro-submission-validation":["enum"]}]},"invoiceReference":{"type":"string","description":"The only field a source-system reference travels in, bounded at 128 characters.","maxLength":128,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"items":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItem"},"maxItems":10000,"minItems":1,"x-timbro-submission-validation":["minItems","maxItems"]},"modificationCode":{"$ref":"#/components/schemas/InvoiceCreditNoteModificationCode"},"numbering":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceNumbering"}]},"paymentTerms":{"$ref":"#/components/schemas/InvoiceCreditNotePaymentTerms"},"pdfLayout":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoicePdfLayout"}]},"reason":{"type":"string","maxLength":90,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"source":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceSourceInput"}]},"type":{"type":"string","enum":["E34"]}},"additionalProperties":false,"title":"InvoiceRequestE34External"}],"title":"InvoiceRequest"},"InvoiceResource":{"oneOf":[{"type":"object","required":["status","id","originalInvoiceId","replacesInvoiceId","invoiceReference","type","environment","issuerTaxId","currency","exchangeRate","buyer","governmentEligibility","items","supplier","foreignPayment","paymentTerms","referenceInformation","additionalInformation","source","totals","corrections","files","buyerDeliveryReadiness","diagnostics","acceptedAt","latestEvent","createdAt","updatedAt"],"properties":{"acceptedAt":{"type":["string","null"],"format":"date-time"},"additionalInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceAdditionalInformationResource"}]},"buyer":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceBuyerIdentity"}]},"buyerDeliveryReadiness":{"$ref":"#/components/schemas/InvoiceBuyerDeliveryReadiness"},"corrections":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceCorrection"}},"createdAt":{"type":"string","format":"date-time"},"currency":{"type":"string","enum":["DOP","BRL","CAD","CHF","CHY","XDR","DKK","EUR","GBP","JPY","NOK","SCP","SEK","USD","VEF","HTG","MXN","COP"],"x-timbro-submission-validation":["enum"]},"diagnostics":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceDiagnostic"},"maxItems":20},"environment":{"$ref":"#/components/schemas/FiscalEnvironment"},"exchangeRate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExchangeRate"}]},"files":{"$ref":"#/components/schemas/InvoiceFiles"},"foreignPayment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceForeignPaymentResource"}]},"governmentEligibility":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceGovernmentEligibility"}]},"id":{"type":"string","format":"uuid"},"invoiceReference":{"type":"string"},"issuerTaxId":{"type":"string","pattern":"^[0-9]{9}([0-9]{2})?$"},"items":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InvoiceItemResource"}},"latestEvent":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceLatestEvent"}]},"originalInvoiceId":{"type":["string","null"],"format":"uuid"},"paymentTerms":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoicePaymentTermsResource"}]},"referenceInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceReferenceInformationResource"}]},"replacesInvoiceId":{"type":["string","null"],"format":"uuid","description":"The predecessor retained when this Invoice replaced a rejected or closed Source operation."},"source":{"$ref":"#/components/schemas/InvoiceSource"},"status":{"type":"string","enum":["rejected"]},"supplier":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceSupplierResource"}]},"totals":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceTotals"}]},"type":{"$ref":"#/components/schemas/InvoiceType"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":false},{"type":"object","required":["stage","fiscalIdentity","status","id","originalInvoiceId","replacesInvoiceId","invoiceReference","type","environment","issuerTaxId","currency","exchangeRate","buyer","governmentEligibility","items","supplier","foreignPayment","paymentTerms","referenceInformation","additionalInformation","source","totals","corrections","files","buyerDeliveryReadiness","diagnostics","acceptedAt","latestEvent","createdAt","updatedAt"],"properties":{"acceptedAt":{"type":["string","null"],"format":"date-time"},"additionalInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceAdditionalInformationResource"}]},"buyer":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceBuyerIdentity"}]},"buyerDeliveryReadiness":{"$ref":"#/components/schemas/InvoiceBuyerDeliveryReadiness"},"corrections":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceCorrection"}},"createdAt":{"type":"string","format":"date-time"},"currency":{"type":"string","enum":["DOP","BRL","CAD","CHF","CHY","XDR","DKK","EUR","GBP","JPY","NOK","SCP","SEK","USD","VEF","HTG","MXN","COP"],"x-timbro-submission-validation":["enum"]},"diagnostics":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceDiagnostic"},"maxItems":20},"environment":{"$ref":"#/components/schemas/FiscalEnvironment"},"exchangeRate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExchangeRate"}]},"files":{"$ref":"#/components/schemas/InvoiceFiles"},"fiscalIdentity":{"$ref":"#/components/schemas/InvoiceFiscalIdentity"},"foreignPayment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceForeignPaymentResource"}]},"governmentEligibility":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceGovernmentEligibility"}]},"id":{"type":"string","format":"uuid"},"invoiceReference":{"type":"string"},"issuerTaxId":{"type":"string","pattern":"^[0-9]{9}([0-9]{2})?$"},"items":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InvoiceItemResource"}},"latestEvent":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceLatestEvent"}]},"originalInvoiceId":{"type":["string","null"],"format":"uuid"},"paymentTerms":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoicePaymentTermsResource"}]},"referenceInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceReferenceInformationResource"}]},"replacesInvoiceId":{"type":["string","null"],"format":"uuid","description":"The predecessor retained when this Invoice replaced a rejected or closed Source operation."},"source":{"$ref":"#/components/schemas/InvoiceSource"},"stage":{"$ref":"#/components/schemas/InvoiceProcessingStage"},"status":{"type":"string","enum":["processing"]},"supplier":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceSupplierResource"}]},"totals":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceTotals"}]},"type":{"$ref":"#/components/schemas/InvoiceType"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":false},{"type":"object","required":["fiscalIdentity","status","id","originalInvoiceId","replacesInvoiceId","invoiceReference","type","environment","issuerTaxId","currency","exchangeRate","buyer","governmentEligibility","items","supplier","foreignPayment","paymentTerms","referenceInformation","additionalInformation","source","totals","corrections","files","buyerDeliveryReadiness","diagnostics","acceptedAt","latestEvent","createdAt","updatedAt"],"properties":{"acceptedAt":{"type":["string","null"],"format":"date-time"},"additionalInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceAdditionalInformationResource"}]},"buyer":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceBuyerIdentity"}]},"buyerDeliveryReadiness":{"$ref":"#/components/schemas/InvoiceBuyerDeliveryReadiness"},"corrections":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceCorrection"}},"createdAt":{"type":"string","format":"date-time"},"currency":{"type":"string","enum":["DOP","BRL","CAD","CHF","CHY","XDR","DKK","EUR","GBP","JPY","NOK","SCP","SEK","USD","VEF","HTG","MXN","COP"],"x-timbro-submission-validation":["enum"]},"diagnostics":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceDiagnostic"},"maxItems":20},"environment":{"$ref":"#/components/schemas/FiscalEnvironment"},"exchangeRate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExchangeRate"}]},"files":{"$ref":"#/components/schemas/InvoiceFiles"},"fiscalIdentity":{"$ref":"#/components/schemas/InvoiceFiscalIdentity"},"foreignPayment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceForeignPaymentResource"}]},"governmentEligibility":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceGovernmentEligibility"}]},"id":{"type":"string","format":"uuid"},"invoiceReference":{"type":"string"},"issuerTaxId":{"type":"string","pattern":"^[0-9]{9}([0-9]{2})?$"},"items":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InvoiceItemResource"}},"latestEvent":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceLatestEvent"}]},"originalInvoiceId":{"type":["string","null"],"format":"uuid"},"paymentTerms":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoicePaymentTermsResource"}]},"referenceInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceReferenceInformationResource"}]},"replacesInvoiceId":{"type":["string","null"],"format":"uuid","description":"The predecessor retained when this Invoice replaced a rejected or closed Source operation."},"source":{"$ref":"#/components/schemas/InvoiceSource"},"status":{"type":"string","enum":["verifying"]},"supplier":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceSupplierResource"}]},"totals":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceTotals"}]},"type":{"$ref":"#/components/schemas/InvoiceType"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":false},{"type":"object","required":["fiscalIdentity","status","id","originalInvoiceId","replacesInvoiceId","invoiceReference","type","environment","issuerTaxId","currency","exchangeRate","buyer","governmentEligibility","items","supplier","foreignPayment","paymentTerms","referenceInformation","additionalInformation","source","totals","corrections","files","buyerDeliveryReadiness","diagnostics","acceptedAt","latestEvent","createdAt","updatedAt"],"properties":{"acceptedAt":{"type":["string","null"],"format":"date-time"},"additionalInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceAdditionalInformationResource"}]},"buyer":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceBuyerIdentity"}]},"buyerDeliveryReadiness":{"$ref":"#/components/schemas/InvoiceBuyerDeliveryReadiness"},"corrections":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceCorrection"}},"createdAt":{"type":"string","format":"date-time"},"currency":{"type":"string","enum":["DOP","BRL","CAD","CHF","CHY","XDR","DKK","EUR","GBP","JPY","NOK","SCP","SEK","USD","VEF","HTG","MXN","COP"],"x-timbro-submission-validation":["enum"]},"diagnostics":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceDiagnostic"},"maxItems":20},"environment":{"$ref":"#/components/schemas/FiscalEnvironment"},"exchangeRate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExchangeRate"}]},"files":{"$ref":"#/components/schemas/InvoiceFiles"},"fiscalIdentity":{"$ref":"#/components/schemas/InvoiceFiscalIdentity"},"foreignPayment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceForeignPaymentResource"}]},"governmentEligibility":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceGovernmentEligibility"}]},"id":{"type":"string","format":"uuid"},"invoiceReference":{"type":"string"},"issuerTaxId":{"type":"string","pattern":"^[0-9]{9}([0-9]{2})?$"},"items":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InvoiceItemResource"}},"latestEvent":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceLatestEvent"}]},"originalInvoiceId":{"type":["string","null"],"format":"uuid"},"paymentTerms":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoicePaymentTermsResource"}]},"referenceInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceReferenceInformationResource"}]},"replacesInvoiceId":{"type":["string","null"],"format":"uuid","description":"The predecessor retained when this Invoice replaced a rejected or closed Source operation."},"source":{"$ref":"#/components/schemas/InvoiceSource"},"status":{"type":"string","enum":["accepted"]},"supplier":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceSupplierResource"}]},"totals":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceTotals"}]},"type":{"$ref":"#/components/schemas/InvoiceType"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":false},{"type":"object","required":["fiscalIdentity","status","id","originalInvoiceId","replacesInvoiceId","invoiceReference","type","environment","issuerTaxId","currency","exchangeRate","buyer","governmentEligibility","items","supplier","foreignPayment","paymentTerms","referenceInformation","additionalInformation","source","totals","corrections","files","buyerDeliveryReadiness","diagnostics","acceptedAt","latestEvent","createdAt","updatedAt"],"properties":{"acceptedAt":{"type":["string","null"],"format":"date-time"},"additionalInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceAdditionalInformationResource"}]},"buyer":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceBuyerIdentity"}]},"buyerDeliveryReadiness":{"$ref":"#/components/schemas/InvoiceBuyerDeliveryReadiness"},"corrections":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceCorrection"}},"createdAt":{"type":"string","format":"date-time"},"currency":{"type":"string","enum":["DOP","BRL","CAD","CHF","CHY","XDR","DKK","EUR","GBP","JPY","NOK","SCP","SEK","USD","VEF","HTG","MXN","COP"],"x-timbro-submission-validation":["enum"]},"diagnostics":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceDiagnostic"},"maxItems":20},"environment":{"$ref":"#/components/schemas/FiscalEnvironment"},"exchangeRate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExchangeRate"}]},"files":{"$ref":"#/components/schemas/InvoiceFiles"},"fiscalIdentity":{"$ref":"#/components/schemas/InvoiceFiscalIdentity"},"foreignPayment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceForeignPaymentResource"}]},"governmentEligibility":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceGovernmentEligibility"}]},"id":{"type":"string","format":"uuid"},"invoiceReference":{"type":"string"},"issuerTaxId":{"type":"string","pattern":"^[0-9]{9}([0-9]{2})?$"},"items":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InvoiceItemResource"}},"latestEvent":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceLatestEvent"}]},"originalInvoiceId":{"type":["string","null"],"format":"uuid"},"paymentTerms":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoicePaymentTermsResource"}]},"referenceInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceReferenceInformationResource"}]},"replacesInvoiceId":{"type":["string","null"],"format":"uuid","description":"The predecessor retained when this Invoice replaced a rejected or closed Source operation."},"source":{"$ref":"#/components/schemas/InvoiceSource"},"status":{"type":"string","enum":["acceptedWithObservations"]},"supplier":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceSupplierResource"}]},"totals":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceTotals"}]},"type":{"$ref":"#/components/schemas/InvoiceType"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":false},{"type":"object","required":["fiscalIdentity","status","id","originalInvoiceId","replacesInvoiceId","invoiceReference","type","environment","issuerTaxId","currency","exchangeRate","buyer","governmentEligibility","items","supplier","foreignPayment","paymentTerms","referenceInformation","additionalInformation","source","totals","corrections","files","buyerDeliveryReadiness","diagnostics","acceptedAt","latestEvent","createdAt","updatedAt"],"properties":{"acceptedAt":{"type":["string","null"],"format":"date-time"},"additionalInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceAdditionalInformationResource"}]},"buyer":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceBuyerIdentity"}]},"buyerDeliveryReadiness":{"$ref":"#/components/schemas/InvoiceBuyerDeliveryReadiness"},"corrections":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceCorrection"}},"createdAt":{"type":"string","format":"date-time"},"currency":{"type":"string","enum":["DOP","BRL","CAD","CHF","CHY","XDR","DKK","EUR","GBP","JPY","NOK","SCP","SEK","USD","VEF","HTG","MXN","COP"],"x-timbro-submission-validation":["enum"]},"diagnostics":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceDiagnostic"},"maxItems":20},"environment":{"$ref":"#/components/schemas/FiscalEnvironment"},"exchangeRate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExchangeRate"}]},"files":{"$ref":"#/components/schemas/InvoiceFiles"},"fiscalIdentity":{"$ref":"#/components/schemas/InvoiceFiscalIdentity"},"foreignPayment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceForeignPaymentResource"}]},"governmentEligibility":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceGovernmentEligibility"}]},"id":{"type":"string","format":"uuid"},"invoiceReference":{"type":"string"},"issuerTaxId":{"type":"string","pattern":"^[0-9]{9}([0-9]{2})?$"},"items":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InvoiceItemResource"}},"latestEvent":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceLatestEvent"}]},"originalInvoiceId":{"type":["string","null"],"format":"uuid"},"paymentTerms":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoicePaymentTermsResource"}]},"referenceInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceReferenceInformationResource"}]},"replacesInvoiceId":{"type":["string","null"],"format":"uuid","description":"The predecessor retained when this Invoice replaced a rejected or closed Source operation."},"source":{"$ref":"#/components/schemas/InvoiceSource"},"status":{"type":"string","enum":["authorityRejected"]},"supplier":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceSupplierResource"}]},"totals":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceTotals"}]},"type":{"$ref":"#/components/schemas/InvoiceType"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":false},{"type":"object","required":["fiscalIdentity","status","id","originalInvoiceId","replacesInvoiceId","invoiceReference","type","environment","issuerTaxId","currency","exchangeRate","buyer","governmentEligibility","items","supplier","foreignPayment","paymentTerms","referenceInformation","additionalInformation","source","totals","corrections","files","buyerDeliveryReadiness","diagnostics","acceptedAt","latestEvent","createdAt","updatedAt"],"properties":{"acceptedAt":{"type":["string","null"],"format":"date-time"},"additionalInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceAdditionalInformationResource"}]},"buyer":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceBuyerIdentity"}]},"buyerDeliveryReadiness":{"$ref":"#/components/schemas/InvoiceBuyerDeliveryReadiness"},"corrections":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceCorrection"}},"createdAt":{"type":"string","format":"date-time"},"currency":{"type":"string","enum":["DOP","BRL","CAD","CHF","CHY","XDR","DKK","EUR","GBP","JPY","NOK","SCP","SEK","USD","VEF","HTG","MXN","COP"],"x-timbro-submission-validation":["enum"]},"diagnostics":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceDiagnostic"},"maxItems":20},"environment":{"$ref":"#/components/schemas/FiscalEnvironment"},"exchangeRate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExchangeRate"}]},"files":{"$ref":"#/components/schemas/InvoiceFiles"},"fiscalIdentity":{"$ref":"#/components/schemas/InvoiceFiscalIdentity"},"foreignPayment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceForeignPaymentResource"}]},"governmentEligibility":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceGovernmentEligibility"}]},"id":{"type":"string","format":"uuid"},"invoiceReference":{"type":"string"},"issuerTaxId":{"type":"string","pattern":"^[0-9]{9}([0-9]{2})?$"},"items":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InvoiceItemResource"}},"latestEvent":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceLatestEvent"}]},"originalInvoiceId":{"type":["string","null"],"format":"uuid"},"paymentTerms":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoicePaymentTermsResource"}]},"referenceInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceReferenceInformationResource"}]},"replacesInvoiceId":{"type":["string","null"],"format":"uuid","description":"The predecessor retained when this Invoice replaced a rejected or closed Source operation."},"source":{"$ref":"#/components/schemas/InvoiceSource"},"status":{"type":"string","enum":["operatorRequired"]},"supplier":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceSupplierResource"}]},"totals":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceTotals"}]},"type":{"$ref":"#/components/schemas/InvoiceType"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":false},{"type":"object","description":"An Organization administrator closed the Invoice before DGII received it. Its e-NCF stays\nretained for cancellation, and a replacement issues the sale under a new e-NCF.","required":["fiscalIdentity","status","id","originalInvoiceId","replacesInvoiceId","invoiceReference","type","environment","issuerTaxId","currency","exchangeRate","buyer","governmentEligibility","items","supplier","foreignPayment","paymentTerms","referenceInformation","additionalInformation","source","totals","corrections","files","buyerDeliveryReadiness","diagnostics","acceptedAt","latestEvent","createdAt","updatedAt"],"properties":{"acceptedAt":{"type":["string","null"],"format":"date-time"},"additionalInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceAdditionalInformationResource"}]},"buyer":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceBuyerIdentity"}]},"buyerDeliveryReadiness":{"$ref":"#/components/schemas/InvoiceBuyerDeliveryReadiness"},"corrections":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceCorrection"}},"createdAt":{"type":"string","format":"date-time"},"currency":{"type":"string","enum":["DOP","BRL","CAD","CHF","CHY","XDR","DKK","EUR","GBP","JPY","NOK","SCP","SEK","USD","VEF","HTG","MXN","COP"],"x-timbro-submission-validation":["enum"]},"diagnostics":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceDiagnostic"},"maxItems":20},"environment":{"$ref":"#/components/schemas/FiscalEnvironment"},"exchangeRate":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceExchangeRate"}]},"files":{"$ref":"#/components/schemas/InvoiceFiles"},"fiscalIdentity":{"$ref":"#/components/schemas/InvoiceFiscalIdentity"},"foreignPayment":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceForeignPaymentResource"}]},"governmentEligibility":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceGovernmentEligibility"}]},"id":{"type":"string","format":"uuid"},"invoiceReference":{"type":"string"},"issuerTaxId":{"type":"string","pattern":"^[0-9]{9}([0-9]{2})?$"},"items":{"type":["array","null"],"items":{"$ref":"#/components/schemas/InvoiceItemResource"}},"latestEvent":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceLatestEvent"}]},"originalInvoiceId":{"type":["string","null"],"format":"uuid"},"paymentTerms":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoicePaymentTermsResource"}]},"referenceInformation":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceReferenceInformationResource"}]},"replacesInvoiceId":{"type":["string","null"],"format":"uuid","description":"The predecessor retained when this Invoice replaced a rejected or closed Source operation."},"source":{"$ref":"#/components/schemas/InvoiceSource"},"status":{"type":"string","enum":["closed"]},"supplier":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceSupplierResource"}]},"totals":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceTotals"}]},"type":{"$ref":"#/components/schemas/InvoiceType"},"updatedAt":{"type":"string","format":"date-time"}},"additionalProperties":false}],"discriminator":{"propertyName":"status"},"title":"InvoiceResource"},"InvoiceShipmentInformationResource":{"type":"object","required":["shipmentDate","shipmentNumber","containerNumber","grossWeight","netWeight","grossWeightUnit","netWeightUnit","packageCount","packageUnit","packageVolume","volumeUnit","driver","transportDocumentNumber","vehicleFiche","vehiclePlate","route","transportZone","deliveryNoteNumber"],"properties":{"containerNumber":{"oneOf":[{"type":"null"},{"type":"string","maxLength":100,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"deliveryNoteNumber":{"oneOf":[{"type":"null"},{"type":"string","maxLength":20,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"driver":{"oneOf":[{"type":"null"},{"type":"string","maxLength":20,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"grossWeight":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]}]},"grossWeightUnit":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^([1-9]|[1-5][0-9]|6[0-2])$","x-timbro-submission-validation":["pattern"]}]},"netWeight":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]}]},"netWeightUnit":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^([1-9]|[1-5][0-9]|6[0-2])$","x-timbro-submission-validation":["pattern"]}]},"packageCount":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]}]},"packageUnit":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^([1-9]|[1-5][0-9]|6[0-2])$","x-timbro-submission-validation":["pattern"]}]},"packageVolume":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^(?=[0-9.]*[1-9])[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]}]},"route":{"oneOf":[{"type":"null"},{"type":"string","maxLength":20,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"shipmentDate":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^(?:(?:31-(?:0?[13578]|1[02])|(?:29|30)-(?:0?[13-9]|1[0-2])|(?:0?[1-9]|1[0-9]|2[0-8])-(?:0?[1-9]|1[0-2]))-(?:19|20)[0-9]{2}|29-0?2-(?:(?:19|20)(?:0[48]|[2468][048]|[13579][26])|2000))$","x-timbro-submission-validation":["pattern"]}]},"shipmentNumber":{"oneOf":[{"type":"null"},{"type":"string","maxLength":25,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"transportDocumentNumber":{"oneOf":[{"type":"null"},{"type":"string","maxLength":20,"minLength":1,"pattern":"^[0-9]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"transportZone":{"oneOf":[{"type":"null"},{"type":"string","maxLength":20,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"vehicleFiche":{"oneOf":[{"type":"null"},{"type":"string","maxLength":10,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"vehiclePlate":{"oneOf":[{"type":"null"},{"type":"string","maxLength":7,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"volumeUnit":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^([1-9]|[1-5][0-9]|6[0-2])$","x-timbro-submission-validation":["pattern"]}]}},"additionalProperties":false,"title":"InvoiceShipmentInformationResource"},"InvoiceSignature":{"type":"object","description":"The signature facts DGII requires on every printed e-CF, read from the signed document.\n\nPrint the buyer's copy after DGII accepts the Invoice; DGII sequences the printed e-CF after\nits validation result, including the Type 32 below DOP 250,000 it validates by RFCE summary.","required":["signedAt","securityCode","verificationUrl"],"properties":{"securityCode":{"type":"string","description":"The first six characters of the signature value, printed below the QR code.","pattern":"^[A-Za-z0-9+/]{6}$"},"signedAt":{"type":"string","description":"The exact `FechaHoraFirma` instant as RFC 3339 in DGII's fixed GMT-4, so its date and\ntime read as the printed `dd-MM-aaaa HH:mm:ss`.","pattern":"^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}-04:00$"},"verificationUrl":{"type":"string","format":"uri","description":"The DGII consultation URL the printed QR code encodes.","pattern":"^https://(ecf|fc)\\.dgii\\.gov\\.do/"}},"additionalProperties":false,"title":"InvoiceSignature"},"InvoiceSource":{"type":"object","required":["id","version","contentSha256"],"properties":{"contentSha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"id":{"type":"string"},"version":{"type":"string"}},"additionalProperties":false,"title":"InvoiceSource"},"InvoiceSourceInput":{"type":"object","required":["id","version"],"properties":{"id":{"type":"string","description":"The only field a source-system reference travels in, bounded at 128 characters.","maxLength":128,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"version":{"type":"string","maxLength":128,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}},"additionalProperties":false,"title":"InvoiceSourceInput"},"InvoiceSpecialRegimeBuyer":{"oneOf":[{"type":"object","title":"DomesticInvoiceBuyer","required":["taxId","legalName","kind"],"properties":{"deliveryPhone":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^[0-9]{3}-[0-9]{3}-[0-9]{4}$","x-timbro-submission-validation":["pattern"]}]},"kind":{"type":"string","enum":["domestic"]},"legalName":{"type":"string","maxLength":150,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"taxId":{"type":"string","pattern":"^[0-9]{9}([0-9]{2})?$","x-timbro-submission-validation":["pattern"]}},"additionalProperties":false},{"type":"object","required":["foreignId","legalName","kind"],"properties":{"deliveryPhone":{"oneOf":[{"type":"null"},{"type":"string","pattern":"^[0-9]{3}-[0-9]{3}-[0-9]{4}$","x-timbro-submission-validation":["pattern"]}]},"foreignId":{"type":"string","maxLength":20,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"kind":{"type":"string","enum":["foreign_diplomat"]},"legalName":{"type":"string","maxLength":150,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}},"additionalProperties":false}],"discriminator":{"propertyName":"kind"},"title":"InvoiceSpecialRegimeBuyer"},"InvoiceSpecialRegimeEligibility":{"oneOf":[{"type":"object","required":["authorityReference","basisKind"],"properties":{"authorityReference":{"type":"string","minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","pattern"]},"basisKind":{"type":"string","enum":["special_law"]}},"additionalProperties":false},{"type":"object","required":["authorityReference","basisKind"],"properties":{"authorityReference":{"type":"string","minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","pattern"]},"basisKind":{"type":"string","enum":["ratified_contract"]}},"additionalProperties":false},{"type":"object","required":["authorityReference","basisKind"],"properties":{"authorityReference":{"type":"string","minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","pattern"]},"basisKind":{"type":"string","enum":["ratified_agreement"]}},"additionalProperties":false}],"discriminator":{"propertyName":"basisKind"},"title":"InvoiceSpecialRegimeEligibility"},"InvoiceSpecialRegimeItem":{"type":"object","required":["description","quantity","unit","kind","unitPrice"],"properties":{"additionalDescription":{"oneOf":[{"type":"null"},{"type":"string","maxLength":1000,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])(?!.*[\\u0000-\\u0008\\u000B\\u000C\\u000E-\\u001F\\uD800-\\uDFFF\\uFFFE\\uFFFF])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"],"x-timbro-xml10-text":true}],"description":"More detail about the item, such as the options chosen on the order, sent to the DGII as the\nitem's `DescripcionItem`. The PDF prints only `description`."},"additionalTaxCodes":{"oneOf":[{"type":"null"},{"type":"array","items":{"type":"string","enum":["001","002","003","004","005"],"x-timbro-submission-validation":["enum"]},"maxItems":2,"minItems":1,"x-timbro-submission-validation":["minItems","maxItems"]}]},"adjustments":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/LinePriceAdjustments"}]},"description":{"type":"string","maxLength":80,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"id":{"oneOf":[{"type":"null"},{"type":"string","maxLength":128,"minLength":1,"pattern":"^[^\\p{White_Space}](?:[\\s\\S]*[^\\p{White_Space}])?$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"itemCodes":{"oneOf":[{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/InvoiceItemCode"},"maxItems":5,"minItems":0,"x-timbro-submission-validation":["minItems","maxItems"]}]},"kind":{"$ref":"#/components/schemas/SourceItemKind"},"quantity":{"type":"string","pattern":"^(?=[0-9.]*[1-9])[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]},"unit":{"$ref":"#/components/schemas/SourceMeasurementUnit"},"unitPrice":{"type":"string","pattern":"^[0-9]{1,16}(\\.[0-9]{1,4})?$","x-timbro-submission-validation":["pattern"]}},"additionalProperties":false,"title":"InvoiceSpecialRegimeItem"},"InvoiceSupplierResource":{"type":"object","required":["identityNumber","legalName","contactName","email","address","municipalityCode","provinceCode","internalCode"],"properties":{"address":{"oneOf":[{"type":"null"},{"type":"string","maxLength":100,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"contactName":{"oneOf":[{"type":"null"},{"type":"string","maxLength":80,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"email":{"oneOf":[{"type":"null"},{"type":"string","maxLength":80,"pattern":"^[\\p{L}\\p{M}\\p{N}\\p{S}_]+(?:[-.][\\p{L}\\p{M}\\p{N}\\p{S}_]+)*@[\\p{L}\\p{M}\\p{N}\\p{S}]+(?:[-.][\\p{L}\\p{M}\\p{N}\\p{S}]+)*\\.[\\p{L}\\p{M}\\p{N}\\p{S}]+(?:[-.][\\p{L}\\p{M}\\p{N}\\p{S}]+)*$","x-timbro-submission-validation":["maxLength","pattern"]}]},"identityNumber":{"type":"string","pattern":"^[0-9]{9}([0-9]{2})?$","x-timbro-submission-validation":["pattern"]},"internalCode":{"oneOf":[{"type":"null"},{"type":"string","maxLength":20,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}]},"legalName":{"type":"string","maxLength":150,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"municipalityCode":{"oneOf":[{"type":"null"},{"type":"string","enum":["010000","010100","010101","020000","020100","020101","020102","020103","020104","020105","020106","020107","020108","020109","020200","020201","020202","020300","020301","020302","020303","020400","020401","020402","020403","020404","020405","020500","020501","020600","020601","020602","020603","020604","020700","020701","020702","020800","020801","020802","020803","020804","020900","020901","021000","021001","030000","030001","030101","030102","030200","030201","030202","030300","030301","030302","030303","030304","030305","030306","030307","030400","030401","030500","030501","030502","040000","040100","040101","040102","040103","040104","040200","040201","040300","040301","040302","040400","040401","040402","040500","040501","040502","040503","040504","040600","040601","040700","040701","040702","040800","040801","040802","040900","040901","041000","041001","041100","041101","041102","050000","050100","050101","050102","050200","050201","050202","050203","050300","050301","050400","050401","050500","050501","050502","060000","060100","060101","060102","060103","060104","060105","060200","060201","060202","060203","060300","060301","060400","060401","060500","060501","060502","060503","060504","060505","060600","060601","060700","060701","060702","070000","070100","070101","070102","070103","070200","070201","070202","070203","070300","070301","070302","070400","070401","070402","070500","070501","070502","070600","070601","080000","080100","080101","080102","080103","080104","080200","080201","080202","080203","090000","090100","090101","090102","090103","090104","090105","090106","090107","090108","090109","090200","090201","090300","090301","090302","090303","090304","090400","090401","100000","100100","100101","100102","100103","100200","100201","100202","100300","100301","100400","100401","100402","100500","100501","100502","100600","100601","100602","110000","110100","110101","110102","110103","110104","110200","110201","110202","110203","120000","120100","120101","120102","120200","120201","120300","120301","120302","130000","130100","130101","130102","130103","130104","130105","130200","130201","130202","130203","130300","130301","130302","130303","130400","130401","130402","140000","140100","140101","140102","140103","140104","140200","140201","140202","140203","140300","140301","140302","140400","140401","150000","150100","150101","150200","150201","150202","150300","150301","150302","150303","150304","150400","150401","150500","150501","150502","150600","150601","160000","160100","160101","160102","160200","160201","160202","170000","170100","170101","170102","170103","170104","170105","170106","170107","170108","170109","170110","170200","170201","170202","170203","170300","170301","180000","180100","180101","180102","180103","180200","180201","180202","180300","180301","180400","180401","180500","180501","180502","180600","180601","180602","180603","180604","180700","180701","180702","180703","180800","180801","180802","180803","180804","180900","180901","190000","190100","190101","190102","190200","190201","190202","190300","190301","200000","200100","200101","200102","200103","200104","200200","200201","200300","200301","210000","210100","210101","210102","210103","210200","210201","210300","210301","210302","210303","210400","210401","210402","210500","210501","210502","210503","210504","210600","210601","210602","210700","210701","210800","210801","220000","220100","220101","220102","220103","220104","220105","220106","220107","220108","220109","220110","220111","220200","220201","220202","220203","220300","220301","220302","220303","220400","220401","220402","220500","220501","220502","220503","220600","220601","220602","230000","230100","230101","230200","230201","230202","230203","230300","230301","230400","230401","230500","230501","230600","230601","240000","240100","240101","240102","240103","240104","240105","240106","240200","240201","240202","240300","240301","240400","240401","240402","240403","240404","250000","250100","250101","250102","250104","250105","250106","250107","250200","250201","250300","250301","250302","250303","250400","250401","250402","250500","250501","250502","250503","250504","250600","250601","250602","250700","250701","250702","250703","250800","250801","250802","250803","250900","250901","251000","251001","260000","260100","260101","260200","260201","260300","260301","270000","270100","270101","270102","270103","270104","270200","270201","270202","270203","270204","270205","270300","270301","270302","270303","270304","280000","280100","280101","280102","280103","280104","280105","280106","280200","280201","280300","280301","280302","280303","290000","290100","290101","290102","290103","290104","290200","290201","290300","290301","290302","290303","290400","290402","290403","290500","290501","300000","300100","300101","300102","300103","300104","300200","300201","300202","300300","300301","310000","310100","310101","310102","310103","310104","310105","310200","310201","310300","310301","320000","320100","320101","320102","320200","320201","320300","320301","320302","320400","320401","320402","320500","320501","320502","320600","320601","320602","320603","320700","320701","320702","320703"],"pattern":"^[0-9]{6}$","x-timbro-submission-validation":["pattern","enum"]}]},"provinceCode":{"oneOf":[{"type":"null"},{"type":"string","enum":["010000","010100","010101","020000","020100","020101","020102","020103","020104","020105","020106","020107","020108","020109","020200","020201","020202","020300","020301","020302","020303","020400","020401","020402","020403","020404","020405","020500","020501","020600","020601","020602","020603","020604","020700","020701","020702","020800","020801","020802","020803","020804","020900","020901","021000","021001","030000","030001","030101","030102","030200","030201","030202","030300","030301","030302","030303","030304","030305","030306","030307","030400","030401","030500","030501","030502","040000","040100","040101","040102","040103","040104","040200","040201","040300","040301","040302","040400","040401","040402","040500","040501","040502","040503","040504","040600","040601","040700","040701","040702","040800","040801","040802","040900","040901","041000","041001","041100","041101","041102","050000","050100","050101","050102","050200","050201","050202","050203","050300","050301","050400","050401","050500","050501","050502","060000","060100","060101","060102","060103","060104","060105","060200","060201","060202","060203","060300","060301","060400","060401","060500","060501","060502","060503","060504","060505","060600","060601","060700","060701","060702","070000","070100","070101","070102","070103","070200","070201","070202","070203","070300","070301","070302","070400","070401","070402","070500","070501","070502","070600","070601","080000","080100","080101","080102","080103","080104","080200","080201","080202","080203","090000","090100","090101","090102","090103","090104","090105","090106","090107","090108","090109","090200","090201","090300","090301","090302","090303","090304","090400","090401","100000","100100","100101","100102","100103","100200","100201","100202","100300","100301","100400","100401","100402","100500","100501","100502","100600","100601","100602","110000","110100","110101","110102","110103","110104","110200","110201","110202","110203","120000","120100","120101","120102","120200","120201","120300","120301","120302","130000","130100","130101","130102","130103","130104","130105","130200","130201","130202","130203","130300","130301","130302","130303","130400","130401","130402","140000","140100","140101","140102","140103","140104","140200","140201","140202","140203","140300","140301","140302","140400","140401","150000","150100","150101","150200","150201","150202","150300","150301","150302","150303","150304","150400","150401","150500","150501","150502","150600","150601","160000","160100","160101","160102","160200","160201","160202","170000","170100","170101","170102","170103","170104","170105","170106","170107","170108","170109","170110","170200","170201","170202","170203","170300","170301","180000","180100","180101","180102","180103","180200","180201","180202","180300","180301","180400","180401","180500","180501","180502","180600","180601","180602","180603","180604","180700","180701","180702","180703","180800","180801","180802","180803","180804","180900","180901","190000","190100","190101","190102","190200","190201","190202","190300","190301","200000","200100","200101","200102","200103","200104","200200","200201","200300","200301","210000","210100","210101","210102","210103","210200","210201","210300","210301","210302","210303","210400","210401","210402","210500","210501","210502","210503","210504","210600","210601","210602","210700","210701","210800","210801","220000","220100","220101","220102","220103","220104","220105","220106","220107","220108","220109","220110","220111","220200","220201","220202","220203","220300","220301","220302","220303","220400","220401","220402","220500","220501","220502","220503","220600","220601","220602","230000","230100","230101","230200","230201","230202","230203","230300","230301","230400","230401","230500","230501","230600","230601","240000","240100","240101","240102","240103","240104","240105","240106","240200","240201","240202","240300","240301","240400","240401","240402","240403","240404","250000","250100","250101","250102","250104","250105","250106","250107","250200","250201","250300","250301","250302","250303","250400","250401","250402","250500","250501","250502","250503","250504","250600","250601","250602","250700","250701","250702","250703","250800","250801","250802","250803","250900","250901","251000","251001","260000","260100","260101","260200","260201","260300","260301","270000","270100","270101","270102","270103","270104","270200","270201","270202","270203","270204","270205","270300","270301","270302","270303","270304","280000","280100","280101","280102","280103","280104","280105","280106","280200","280201","280300","280301","280302","280303","290000","290100","290101","290102","290103","290104","290200","290201","290300","290301","290302","290303","290400","290402","290403","290500","290501","300000","300100","300101","300102","300103","300104","300200","300201","300202","300300","300301","310000","310100","310101","310102","310103","310104","310105","310200","310201","310300","310301","320000","320100","320101","320102","320200","320201","320300","320301","320302","320400","320401","320402","320500","320501","320502","320600","320601","320602","320603","320700","320701","320702","320703"],"pattern":"^[0-9]{6}$","x-timbro-submission-validation":["pattern","enum"]}]}},"additionalProperties":false,"title":"InvoiceSupplierResource"},"InvoiceTax":{"oneOf":[{"type":"object","required":["included","kind"],"properties":{"included":{"type":"boolean"},"kind":{"type":"string","enum":["itbis_18"]}},"additionalProperties":false},{"type":"object","required":["included","kind"],"properties":{"included":{"type":"boolean"},"kind":{"type":"string","enum":["itbis_16"]}},"additionalProperties":false},{"type":"object","title":"ZeroRatedTax","required":["kind"],"properties":{"kind":{"type":"string","enum":["zero_rated"]}},"additionalProperties":false},{"type":"object","title":"ExemptTax","required":["kind"],"properties":{"kind":{"type":"string","enum":["exempt"]}},"additionalProperties":false},{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","enum":["non_billable"]}},"additionalProperties":false}],"discriminator":{"propertyName":"kind"},"title":"InvoiceTax"},"InvoiceTotals":{"type":"object","required":["net","tax","total","nonBillable","foreign"],"properties":{"foreign":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/InvoiceForeignTotals"}]},"net":{"type":"string"},"nonBillable":{"type":"string"},"tax":{"type":"string"},"total":{"type":"string"}},"additionalProperties":false,"title":"InvoiceTotals"},"InvoiceType":{"type":"string","enum":["E31","E32","E33","E34","E41","E43","E44","E45","E46","E47"],"title":"InvoiceType"},"InvoiceWebhookEventEnvelope":{"oneOf":[{"type":"object","title":"InvoiceAcceptedEvent","required":["data","type","apiVersion","object","id","sequence","occurredAt","organizationId","environment"],"properties":{"apiVersion":{"type":"string","minLength":1},"data":{"type":"object","title":"InvoiceEventData","required":["id","integrationId"],"properties":{"id":{"type":"string","format":"uuid"},"integrationId":{"type":"string","format":"uuid"}},"additionalProperties":false},"environment":{"$ref":"#/components/schemas/FiscalEnvironment"},"id":{"type":"string","format":"uuid"},"object":{"$ref":"#/components/schemas/WebhookEventObject"},"occurredAt":{"type":"string","format":"date-time"},"organizationId":{"type":"string","format":"uuid"},"sequence":{"type":"string","pattern":"^[1-9][0-9]*$"},"type":{"type":"string","enum":["invoice.accepted"]}},"additionalProperties":false},{"type":"object","title":"InvoiceRejectedEvent","required":["data","type","apiVersion","object","id","sequence","occurredAt","organizationId","environment"],"properties":{"apiVersion":{"type":"string","minLength":1},"data":{"type":"object","title":"InvoiceEventData","required":["id","integrationId"],"properties":{"id":{"type":"string","format":"uuid"},"integrationId":{"type":"string","format":"uuid"}},"additionalProperties":false},"environment":{"$ref":"#/components/schemas/FiscalEnvironment"},"id":{"type":"string","format":"uuid"},"object":{"$ref":"#/components/schemas/WebhookEventObject"},"occurredAt":{"type":"string","format":"date-time"},"organizationId":{"type":"string","format":"uuid"},"sequence":{"type":"string","pattern":"^[1-9][0-9]*$"},"type":{"type":"string","enum":["invoice.rejected"]}},"additionalProperties":false},{"type":"object","title":"InvoiceOperatorRequiredEvent","required":["data","type","apiVersion","object","id","sequence","occurredAt","organizationId","environment"],"properties":{"apiVersion":{"type":"string","minLength":1},"data":{"type":"object","title":"InvoiceEventData","required":["id","integrationId"],"properties":{"id":{"type":"string","format":"uuid"},"integrationId":{"type":"string","format":"uuid"}},"additionalProperties":false},"environment":{"$ref":"#/components/schemas/FiscalEnvironment"},"id":{"type":"string","format":"uuid"},"object":{"$ref":"#/components/schemas/WebhookEventObject"},"occurredAt":{"type":"string","format":"date-time"},"organizationId":{"type":"string","format":"uuid"},"sequence":{"type":"string","pattern":"^[1-9][0-9]*$"},"type":{"type":"string","enum":["invoice.operatorRequired"]}},"additionalProperties":false},{"type":"object","title":"InvoiceReadyEvent","required":["data","type","apiVersion","object","id","sequence","occurredAt","organizationId","environment"],"properties":{"apiVersion":{"type":"string","minLength":1},"data":{"type":"object","title":"InvoiceEventData","required":["id","integrationId"],"properties":{"id":{"type":"string","format":"uuid"},"integrationId":{"type":"string","format":"uuid"}},"additionalProperties":false},"environment":{"$ref":"#/components/schemas/FiscalEnvironment"},"id":{"type":"string","format":"uuid"},"object":{"$ref":"#/components/schemas/WebhookEventObject"},"occurredAt":{"type":"string","format":"date-time"},"organizationId":{"type":"string","format":"uuid"},"sequence":{"type":"string","pattern":"^[1-9][0-9]*$"},"type":{"type":"string","enum":["invoice.ready"]}},"additionalProperties":false},{"type":"object","title":"InvoiceDeliverySentEvent","required":["data","type","apiVersion","object","id","sequence","occurredAt","organizationId","environment"],"properties":{"apiVersion":{"type":"string","minLength":1},"data":{"type":"object","title":"InvoiceDeliveryEventData","description":"The Invoice and the buyer email whose sent or failed outcome the event announces.","required":["id","integrationId","deliveryId"],"properties":{"deliveryId":{"type":"string","format":"uuid"},"id":{"type":"string","format":"uuid"},"integrationId":{"type":"string","format":"uuid"}},"additionalProperties":false},"environment":{"$ref":"#/components/schemas/FiscalEnvironment"},"id":{"type":"string","format":"uuid"},"object":{"$ref":"#/components/schemas/WebhookEventObject"},"occurredAt":{"type":"string","format":"date-time"},"organizationId":{"type":"string","format":"uuid"},"sequence":{"type":"string","pattern":"^[1-9][0-9]*$"},"type":{"type":"string","enum":["invoice.deliverySent"]}},"additionalProperties":false},{"type":"object","title":"InvoiceDeliveryFailedEvent","required":["data","type","apiVersion","object","id","sequence","occurredAt","organizationId","environment"],"properties":{"apiVersion":{"type":"string","minLength":1},"data":{"type":"object","title":"InvoiceDeliveryEventData","description":"The Invoice and the buyer email whose sent or failed outcome the event announces.","required":["id","integrationId","deliveryId"],"properties":{"deliveryId":{"type":"string","format":"uuid"},"id":{"type":"string","format":"uuid"},"integrationId":{"type":"string","format":"uuid"}},"additionalProperties":false},"environment":{"$ref":"#/components/schemas/FiscalEnvironment"},"id":{"type":"string","format":"uuid"},"object":{"$ref":"#/components/schemas/WebhookEventObject"},"occurredAt":{"type":"string","format":"date-time"},"organizationId":{"type":"string","format":"uuid"},"sequence":{"type":"string","pattern":"^[1-9][0-9]*$"},"type":{"type":"string","enum":["invoice.deliveryFailed"]}},"additionalProperties":false}],"discriminator":{"propertyName":"type"},"title":"InvoiceWebhookEventEnvelope"},"InvoiceXmlReadiness":{"oneOf":[{"type":"object","title":"NotApplicableReadiness","required":["status"],"properties":{"status":{"type":"string","enum":["notApplicable"]}},"additionalProperties":false},{"type":"object","title":"PendingStatus","required":["status"],"properties":{"status":{"type":"string","enum":["pending"]}},"additionalProperties":false},{"type":"object","required":["sha256","byteLength","mediaType","createdAt","status"],"properties":{"byteLength":{"type":"integer","format":"int32","minimum":0},"createdAt":{"type":"string","format":"date-time"},"mediaType":{"$ref":"#/components/schemas/FiscalArtifactMediaType"},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"status":{"type":"string","enum":["ready"]}},"additionalProperties":false}],"discriminator":{"propertyName":"status"},"title":"InvoiceXmlReadiness"},"Invoicing":{"title":"Invoicing","description":"Fiscal intent is separate from the sale snapshot. Existing mode associates an already accepted Invoice; a restricted receipt capability is required for an Invoice owned by an independent Source.","oneOf":[{"$ref":"#/components/schemas/AutomaticInvoicing"},{"$ref":"#/components/schemas/MerchantInvoicing"},{"$ref":"#/components/schemas/ExistingInvoicing"}],"discriminator":{"propertyName":"mode","mapping":{"automatic":"#/components/schemas/AutomaticInvoicing","merchant":"#/components/schemas/MerchantInvoicing","existing":"#/components/schemas/ExistingInvoicing"}}},"IssuanceBlocker":{"type":"string","enum":["invalid_request","unsupported_protocol","unsupported_rules_version","invalid_resolved_facts","numbering_verifier_missing","numbering_mode_not_enabled","document_type_not_recognized","sequence_missing","sequence_not_observed_on_effective_date","sequence_suspended","sequence_cancelled","sequence_superseded","sequence_exhausted","sequence_conflicting","sequence_document_type_mismatch","sequence_rejected_by_dgii","sequence_expired","sequence_range_overlap","fiscal_number_capacity_exhausted","invalid_fiscal_number","fiscal_number_outside_authorized_range","fiscal_number_before_verified_floor","sequence_expiration_mismatch"],"title":"IssuanceBlocker"},"ItemizedSale":{"type":"object","required":["kind","reference","currency","items","totals"],"properties":{"kind":{"type":"string","const":"itemized"},"reference":{"type":"string","minLength":1,"maxLength":128},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"items":{"type":"array","items":{"$ref":"#/components/schemas/SaleItem"},"minItems":1},"totals":{"$ref":"#/components/schemas/SaleTotals"}},"title":"ItemizedSale","additionalProperties":false},"LinePriceAdjustment":{"oneOf":[{"type":"object","required":["amount","kind"],"properties":{"amount":{"type":"string","pattern":"^[0-9]{1,16}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]},"kind":{"type":"string","enum":["fixed_amount"]}},"additionalProperties":false},{"type":"object","required":["percentage","kind"],"properties":{"kind":{"type":"string","enum":["percentage"]},"percentage":{"type":"string","pattern":"^(?=[0-9.]*[1-9])[0-9]{1,3}(\\.[0-9]{1,2})?$","x-timbro-submission-validation":["pattern"]}},"additionalProperties":false}],"description":"One fixed-amount or percentage discount or surcharge on a fiscal line.","title":"LinePriceAdjustment"},"LinePriceAdjustments":{"type":"object","description":"Line-level discounts and surcharges, kept separate from document-level adjustments.","properties":{"discounts":{"type":"array","items":{"$ref":"#/components/schemas/LinePriceAdjustment"},"maxItems":12,"minItems":0,"x-timbro-submission-validation":["minItems","maxItems"]},"surcharges":{"type":"array","items":{"$ref":"#/components/schemas/LinePriceAdjustment"},"maxItems":12,"minItems":0,"x-timbro-submission-validation":["minItems","maxItems"]}},"additionalProperties":false,"title":"LinePriceAdjustments"},"MerchantAccount":{"type":"object","required":["id","object","provider","mode","lifecycle","readiness","capabilities","checkoutCapabilities","createdAt"],"properties":{"id":{"type":"string","pattern":"^merchant_account_[0-9a-hjkmnp-tv-z]{24,}$","description":"Merchant Account identifier."},"object":{"type":"string","const":"merchant_account"},"provider":{"anyOf":[{"type":"string","const":"azul"},{"type":"string","const":"cardnet"}]},"mode":{"anyOf":[{"type":"string","const":"test"},{"type":"string","const":"live"}]},"venueReference":{"type":"string","minLength":1,"maxLength":256},"lifecycle":{"anyOf":[{"type":"string","const":"active"},{"type":"string","const":"disabled"}]},"credentialVersion":{"type":"integer","minimum":1},"readiness":{"type":"object","required":["status","blockers","checks"],"properties":{"status":{"anyOf":[{"type":"string","const":"ready"},{"type":"string","const":"blocked"}]},"blockers":{"type":"array","items":{"type":"object","required":["code","owner"],"properties":{"code":{"anyOf":[{"type":"string","const":"merchant_account_disabled"},{"type":"string","const":"active_credential_required"},{"type":"string","const":"credential_material_invalid"},{"type":"string","const":"test_live_mode_mismatch"},{"type":"string","const":"callback_configuration_failed"},{"type":"string","const":"callback_configuration_required"},{"type":"string","const":"connectivity_check_failed"},{"type":"string","const":"connectivity_check_required"},{"type":"string","const":"provider_qualification_failed"},{"type":"string","const":"provider_qualification_required"},{"type":"string","const":"provider_adapter_unavailable"}]},"owner":{"anyOf":[{"type":"string","const":"merchant"},{"type":"string","const":"timbro"},{"type":"string","const":"provider"}]},"detail":{"type":"string","minLength":1,"maxLength":256}},"additionalProperties":false}},"checks":{"type":"array","items":{"type":"object","required":["check","status"],"properties":{"check":{"type":"string","minLength":1,"maxLength":64},"status":{"anyOf":[{"type":"string","const":"passed"},{"type":"string","const":"failed"},{"type":"string","const":"unknown"}]},"detail":{"type":"string","minLength":1,"maxLength":256}},"additionalProperties":false}}},"title":"MerchantAccountReadiness","additionalProperties":false},"capabilities":{"type":"array","items":{"$ref":"#/components/schemas/MerchantAccountCapability"},"uniqueItems":true},"checkoutCapabilities":{"$ref":"#/components/schemas/MerchantAccountCheckoutCapabilities"},"createdAt":{"type":"string","format":"date-time"}},"title":"MerchantAccount","description":"A merchant-owned provider account.","additionalProperties":false},"MerchantAccountCapability":{"type":"object","required":["purpose","readiness"],"properties":{"purpose":{"anyOf":[{"type":"string","const":"payment"},{"type":"string","const":"refund"},{"type":"string","const":"payment_page","description":"TEST only. The acquirer's own payment page, present while the account has one enabled. A Payment uses it only when it sets `checkoutPreferences.paymentPage`."}]},"credentialVersion":{"type":"integer","minimum":1},"readiness":{"type":"object","required":["status","blockers","checks"],"properties":{"status":{"anyOf":[{"type":"string","const":"ready"},{"type":"string","const":"blocked"}]},"blockers":{"type":"array","items":{"type":"object","required":["code","owner"],"properties":{"code":{"anyOf":[{"type":"string","const":"merchant_account_disabled"},{"type":"string","const":"active_credential_required"},{"type":"string","const":"credential_material_invalid"},{"type":"string","const":"test_live_mode_mismatch"},{"type":"string","const":"callback_configuration_failed"},{"type":"string","const":"callback_configuration_required"},{"type":"string","const":"connectivity_check_failed"},{"type":"string","const":"connectivity_check_required"},{"type":"string","const":"provider_qualification_failed"},{"type":"string","const":"provider_qualification_required"},{"type":"string","const":"provider_adapter_unavailable"}]},"owner":{"anyOf":[{"type":"string","const":"merchant"},{"type":"string","const":"timbro"},{"type":"string","const":"provider"}]},"detail":{"type":"string","minLength":1,"maxLength":256}},"additionalProperties":false}},"checks":{"type":"array","items":{"type":"object","required":["check","status"],"properties":{"check":{"type":"string","minLength":1,"maxLength":64},"status":{"anyOf":[{"type":"string","const":"passed"},{"type":"string","const":"failed"},{"type":"string","const":"unknown"}]},"detail":{"type":"string","minLength":1,"maxLength":256}},"additionalProperties":false}}},"title":"MerchantAccountReadiness","additionalProperties":false}},"title":"MerchantAccountCapability","description":"Readiness for one merchant-facing account operation. Provider credentials and protocol details are never returned.","additionalProperties":false},"MerchantAccountCheckoutCapabilities":{"type":"object","required":["splits","wallets","threeDsModes"],"properties":{"splits":{"type":"boolean"},"wallets":{"type":"array","items":{"anyOf":[{"type":"string","const":"google_pay"},{"type":"string","const":"apple_pay"}]},"uniqueItems":true,"maxItems":2},"threeDsModes":{"type":"array","items":{"anyOf":[{"type":"string","const":"enabled"},{"type":"string","const":"disabled"}]},"uniqueItems":true,"maxItems":2}},"title":"MerchantAccountCheckoutCapabilities","description":"Safe effective Checkout capabilities for one Merchant Account and mode.","additionalProperties":false},"MerchantAccountListPage":{"type":"object","required":["object","data","hasMore","nextCursor"],"properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/MerchantAccount"}},"hasMore":{"type":"boolean","description":"True when a further page follows this one."},"nextCursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Send as `cursor` to read the next page, or `null` on the last page."}},"title":"MerchantAccountListPage","description":"One page of Merchant Accounts, newest first.","additionalProperties":false},"MerchantCheckoutPolicy":{"type":"object","required":["object","revision","isLiveMode","defaults","constraints"],"properties":{"object":{"type":"string","const":"merchant_checkout_policy"},"revision":{"type":"integer","minimum":0},"isLiveMode":{"type":"boolean"},"defaults":{"$ref":"#/components/schemas/MerchantCheckoutPolicyDefaults"},"constraints":{"$ref":"#/components/schemas/MerchantCheckoutPolicyConstraints"},"updatedAt":{"type":"string","format":"date-time"}},"title":"MerchantCheckoutPolicy","additionalProperties":false},"MerchantCheckoutPolicyConstraints":{"type":"object","required":["providers","splits","tips","wallets","bill","invoice"],"properties":{"providers":{"type":"array","items":{"anyOf":[{"type":"string","const":"azul"},{"type":"string","const":"cardnet"}]},"minItems":1,"uniqueItems":true},"splits":{"type":"boolean"},"tips":{"type":"boolean"},"wallets":{"type":"array","items":{"anyOf":[{"type":"string","const":"apple_pay"},{"type":"string","const":"google_pay"}]},"uniqueItems":true,"maxItems":2},"bill":{"type":"boolean"},"invoice":{"type":"boolean"}},"title":"MerchantCheckoutPolicyConstraints","additionalProperties":false},"MerchantCheckoutPolicyDefaults":{"type":"object","required":["splits","tips","wallets"],"properties":{"provider":{"anyOf":[{"type":"string","const":"azul"},{"type":"string","const":"cardnet"}]},"merchantAccountId":{"type":"string","minLength":1,"maxLength":256},"bankPayments":{"type":"array","items":{"anyOf":[{"type":"string","const":"popular"},{"type":"string","const":"bhd"}]},"uniqueItems":true,"maxItems":2},"tax":{"type":"object","required":["kind","included"],"properties":{"kind":{"anyOf":[{"type":"string","const":"itbis_18"},{"type":"string","const":"itbis_16"},{"type":"string","const":"zero_rated"},{"type":"string","const":"exempt"}]},"included":{"type":"boolean","const":true}},"description":"Explicit default for uniform tax-inclusive amount-only requests.","additionalProperties":false},"splits":{"type":"boolean"},"tips":{"type":"boolean"},"wallets":{"type":"array","items":{"anyOf":[{"type":"string","const":"apple_pay"},{"type":"string","const":"google_pay"}]},"uniqueItems":true,"maxItems":2}},"title":"MerchantCheckoutPolicyDefaults","additionalProperties":false},"MerchantCheckoutPolicyRequest":{"type":"object","required":["expectedRevision","defaults","constraints"],"properties":{"expectedRevision":{"type":"integer","minimum":0},"defaults":{"$ref":"#/components/schemas/MerchantCheckoutPolicyDefaults"},"constraints":{"$ref":"#/components/schemas/MerchantCheckoutPolicyConstraints"}},"title":"MerchantCheckoutPolicyRequest","additionalProperties":false},"MerchantDeliveryPolicy":{"title":"MerchantDeliveryPolicy","description":"Whether the merchant offers delivery and the terms a payer needs before paying.","oneOf":[{"$ref":"#/components/schemas/DeliveryNotOffered"},{"$ref":"#/components/schemas/MerchantManagedDelivery"}],"discriminator":{"propertyName":"kind","mapping":{"not_offered":"#/components/schemas/DeliveryNotOffered","merchant_managed":"#/components/schemas/MerchantManagedDelivery"}}},"MerchantInvoicing":{"type":"object","required":["type","mode"],"properties":{"type":{"type":"string","enum":["E31","E32","E45"]},"buyer":{"$ref":"#/components/schemas/PaymentInvoiceBuyerInput"},"recipientEmail":{"type":"string","format":"email","maxLength":254,"description":"Buyer email the Invoice is delivered to once issued."},"allowedTypes":{"type":"array","items":{"type":"string","enum":["E31","E32","E45"]},"minItems":1},"isTypeLocked":{"type":"boolean"},"isBuyerLocked":{"type":"boolean"},"governmentEligibility":{"$ref":"#/components/schemas/FiscalGovernmentEligibility"},"mode":{"type":"string","const":"merchant"}},"title":"MerchantInvoicing","additionalProperties":false},"MerchantManagedDelivery":{"type":"object","required":["kind","summary"],"properties":{"kind":{"type":"string","const":"merchant_managed"},"summary":{"type":"string","minLength":1,"maxLength":160,"pattern":"\\S"},"url":{"type":"string","format":"uri","pattern":"^https?://","maxLength":2048}},"title":"MerchantManagedDelivery","additionalProperties":false},"MerchantPaymentsProfile":{"type":"object","required":["displayName","statementDescriptor","permanentAddress","supportEmail","supportPhone","deliveryPolicy"],"properties":{"displayName":{"type":"string","minLength":2,"maxLength":80,"pattern":"^(?=[\\s\\S]*\\p{L})(?=\\s*\\S(?:[\\s\\S]*\\S){1})(?!\\s*(\\S)\\1*\\s*$)[\\s\\S]+$"},"statementDescriptor":{"type":"string","minLength":2,"maxLength":22,"pattern":"^(?=[\\s\\S]*\\p{L})(?=\\s*\\S(?:[\\s\\S]*\\S){1})(?!\\s*(\\S)\\1*\\s*$)[\\s\\S]+$"},"permanentAddress":{"$ref":"#/components/schemas/MerchantPermanentAddress"},"supportEmail":{"type":"string","format":"email","maxLength":254},"supportPhone":{"type":"string","pattern":"^\\+[1-9][0-9]{7,14}$"},"deliveryPolicy":{"$ref":"#/components/schemas/MerchantDeliveryPolicy"}},"title":"MerchantPaymentsProfile","description":"Payer-facing support, address, and delivery terms. The legal name and RNC are the business's.","additionalProperties":false},"MerchantPermanentAddress":{"type":"object","required":["line1","city","countryCode"],"properties":{"line1":{"type":"string","minLength":3,"maxLength":160,"pattern":"^(?=[\\s\\S]*\\p{L})(?=\\s*\\S(?:[\\s\\S]*\\S){2})(?!\\s*(\\S)\\1*\\s*$)[\\s\\S]+$"},"line2":{"type":"string","minLength":1,"maxLength":160,"pattern":"\\S"},"city":{"type":"string","minLength":2,"maxLength":80,"pattern":"^(?=[\\s\\S]*\\p{L})(?=\\s*\\S(?:[\\s\\S]*\\S){1})(?!\\s*(\\S)\\1*\\s*$)[\\s\\S]+$"},"province":{"type":"string","minLength":1,"maxLength":80,"pattern":"\\S"},"postalCode":{"type":"string","minLength":1,"maxLength":20,"pattern":"\\S"},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"}},"title":"MerchantPermanentAddress","description":"The selling merchant's permanent business address.","additionalProperties":false},"MerchantSplit":{"type":"object","required":["status","captured","authorized","remainingToAuthorize","remainingToCapture","capturedCount","authorizedCount","partCount","parts"],"properties":{"status":{"$ref":"#/components/schemas/SplitStatus"},"captured":{"$ref":"#/components/schemas/Money"},"authorized":{"$ref":"#/components/schemas/Money"},"remainingToAuthorize":{"$ref":"#/components/schemas/Money"},"remainingToCapture":{"$ref":"#/components/schemas/Money"},"capturedCount":{"type":"integer","minimum":0,"maximum":10},"authorizedCount":{"type":"integer","minimum":0,"maximum":10},"partCount":{"type":"integer","minimum":2,"maximum":10},"parts":{"type":"array","items":{"type":"object","required":["ordinal","amount","allocatedItbis","status","lastDecline","paymentMethodSummary"],"properties":{"ordinal":{"type":"integer","minimum":1,"maximum":10},"amount":{"$ref":"#/components/schemas/Money"},"allocatedItbis":{"$ref":"#/components/schemas/Money"},"status":{"$ref":"#/components/schemas/SplitPartStatus"},"lastDecline":{"anyOf":[{"$ref":"#/components/schemas/PaymentDecline"},{"type":"null"}]},"paymentMethodSummary":{"anyOf":[{"$ref":"#/components/schemas/PaymentMethodSummary"},{"type":"null"}]}},"additionalProperties":false},"minItems":2,"maxItems":10}},"title":"MerchantSplit","additionalProperties":false},"Money":{"type":"object","required":["currency","value"],"properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$","examples":["DOP"]},"value":{"type":"string","pattern":"^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,2})?$","description":"Exact nonnegative decimal amount, with at most two fractional digits."}},"title":"Money","description":"An exact decimal monetary amount.","additionalProperties":false},"NextAction":{"title":"NextAction","description":"The next bounded action required from the customer. Never a provider response shape.","oneOf":[{"$ref":"#/components/schemas/RedirectToUrlAction"}],"discriminator":{"propertyName":"kind","mapping":{"redirect_to_url":"#/components/schemas/RedirectToUrlAction"}}},"NumberingRange":{"type":"object","required":["remaining","confirmation","expiresOn"],"properties":{"remaining":{"type":"integer","minimum":1,"maximum":9999999999,"description":"Fiscal numbers left in the selected range."},"confirmation":{"anyOf":[{"type":"string","const":"confirmed"},{"type":"string","const":"not_yet_confirmed"}],"description":"Whether DGII has accepted an e-CF numbered from this range. A range that is not yet confirmed still issues; a range DGII rejected is blocked with `sequence_rejected_by_dgii`."},"expiresOn":{"anyOf":[{"type":"string","format":"date","description":"The sequence expiry, or `null` for a type without one (E32 and E34)."},{"type":"null"}]}},"title":"NumberingRange","description":"The range Timbro assigns the next fiscal number of this type from.","additionalProperties":false},"Payment":{"type":"object","required":["id","object","status","source","saleReference","checkoutDisplay","checkoutReference","lastDecline","problem","invoiceId","invoicing","verification","paymentMethodSummary","isLiveMode","expiresAt","createdAt","updatedAt","sale","paymentReference","amount","voluntaryTip","totalAmount","checkout","split","refundable"],"properties":{"id":{"type":"string","pattern":"^payment_[0-9a-hjkmnp-tv-z]{24,}$","description":"Payment identifier. Opaque; do not parse beyond the prefix."},"object":{"type":"string","const":"payment"},"status":{"$ref":"#/components/schemas/PaymentStatus"},"source":{"$ref":"#/components/schemas/SaleSource"},"subscriptionId":{"type":"string","pattern":"^sub_[0-9a-hjkmnp-tv-z]{24,}$","description":"Subscription owning this billing period"},"initiator":{"anyOf":[{"type":"string","const":"customer"},{"type":"string","const":"merchant"}]},"billingPeriod":{"type":"object","required":["start","end"],"properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"}},"additionalProperties":false},"saleReference":{"type":"string","minLength":1,"maxLength":128,"description":"Merchant-owned searchable business reference. It is immutable after create, need not be unique, and does not identify command retries."},"returnUrl":{"type":"string","format":"uri","pattern":"^https?://","maxLength":2048,"description":"Merchant web destination offered after Checkout. Payment status must be retrieved from the API."},"serviceLabel":{"type":"string","maxLength":24,"description":"Merchant-authored context label such as Mesa 12."},"description":{"type":"string","minLength":1,"maxLength":80,"description":"Concise description of the product or service being purchased."},"breakdown":{"$ref":"#/components/schemas/Breakdown"},"checkoutDisplay":{"$ref":"#/components/schemas/CheckoutDisplay"},"checkoutReference":{"type":"string","pattern":"^checkout_[0-9a-hjkmnp-tv-z]{24,}$","description":"Unpredictable bearer handle for the full receipt projection after terminal payment. Possession reveals buyer identity and itemization; keep it private."},"nextAction":{"$ref":"#/components/schemas/NextAction"},"lastDecline":{"anyOf":[{"$ref":"#/components/schemas/PaymentDecline"},{"type":"null"}]},"problem":{"anyOf":[{"$ref":"#/components/schemas/PaymentProblem"},{"type":"null"}]},"invoiceId":{"anyOf":[{"type":"string","format":"uuid","description":"Canonical Timbro Invoice UUID when admitted."},{"type":"null"}]},"invoicing":{"anyOf":[{"$ref":"#/components/schemas/PaymentInvoicing"},{"type":"null"}]},"verification":{"anyOf":[{"$ref":"#/components/schemas/Verification"},{"type":"null"}]},"paymentMethodSummary":{"anyOf":[{"$ref":"#/components/schemas/PaymentMethodSummary"},{"type":"null"}]},"paymentChannel":{"$ref":"#/components/schemas/PaymentChannel"},"processingReason":{"type":"string","const":"awaiting_company_approval"},"isLiveMode":{"type":"boolean"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"metadata":{"type":"object","maxProperties":20,"propertyNames":{"minLength":1,"maxLength":40},"description":"Merchant-owned keys carried with this Payment: at most 20 keys of 1 to 40 characters, each holding a string of at most 500 characters. Checkout stores it opaquely, never branches on it, never sends it to a payment provider, and never repeats it in a webhook body or a payer projection. It lives as long as its Payment and is deleted with it. Never put personal data or card data in it.","additionalProperties":{"type":"string","maxLength":500}},"sale":{"$ref":"#/components/schemas/Sale"},"paymentReference":{"type":"string","minLength":1,"maxLength":128,"description":"Immutable payment request identity within merchant and TEST/LIVE scope."},"amount":{"$ref":"#/components/schemas/Money"},"voluntaryTip":{"$ref":"#/components/schemas/Money"},"totalAmount":{"$ref":"#/components/schemas/Money"},"tax":{"type":"object","required":["includedAmount","provenance"],"properties":{"includedAmount":{"type":"string","pattern":"^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,2})?$","description":"Exact nonnegative decimal amount, with at most two fractional digits."},"provenance":{"anyOf":[{"type":"string","const":"explicit"},{"type":"string","const":"merchant_policy"},{"type":"string","const":"itemized"},{"type":"string","const":"provider_submission"}]},"policyRevision":{"type":"integer","minimum":0}},"additionalProperties":false},"checkout":{"type":"object","required":["url","expiresAt"],"properties":{"url":{"type":"string","format":"uri","pattern":"^https?://","maxLength":2048},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"additionalProperties":false},"capturedPayment":{"$ref":"#/components/schemas/CapturedPayment"},"split":{"anyOf":[{"$ref":"#/components/schemas/MerchantSplit"},{"type":"null"}],"description":"How the payers are dividing this Payment, or null when it is not split, including after the organizer canceled its split."},"refundable":{"anyOf":[{"type":"object","required":["amount","automaticAmount","automaticPartial"],"properties":{"amount":{"$ref":"#/components/schemas/Money"},"automaticAmount":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"The full captured Refund amount submitted to the provider without an operator, for the Payment's current state. Consult automaticPartial for eligible lower amounts. Unsupported Refunds are created as `operator_required` and keep their reservation. A submitted Refund can still end `declined` or `operator_required`."},"automaticPartial":{"anyOf":[{"type":"object","required":["maximumAmount","maximumTaxAmount"],"properties":{"maximumAmount":{"$ref":"#/components/schemas/Money"},"maximumTaxAmount":{"$ref":"#/components/schemas/Money"}},"additionalProperties":false},{"type":"null"}],"description":"A lower positive amount can be refunded automatically with an explicit exact taxAmount, within these limits. Null when partial provider execution is unqualified. This is one refund only, not permission for repeated partial refunds."}},"additionalProperties":false},{"type":"null"}],"description":"Refund options for the Payment's current state. Null until the Payment's capture is recorded."}},"title":"Payment","description":"One durable merchant payment request.","additionalProperties":false},"PaymentCanceledEvent":{"type":"object","required":["id","type","apiVersion","occurredAt","data"],"properties":{"id":{"type":"string","pattern":"^event_[0-9a-hjkmnp-tv-z]{24,}$","description":"Event identifier, equal to the webhook-id header."},"type":{"type":"string","const":"payment.canceled"},"apiVersion":{"type":"string","const":"2026-10-01","description":"The current contract identity that rendered this delivered event."},"occurredAt":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/PaymentEventData"}},"title":"PaymentCanceledEvent","description":"Signed event delivered after the gateway durably records cancellation.","additionalProperties":false},"PaymentChannel":{"type":"object","required":["kind","bank"],"properties":{"kind":{"type":"string","const":"bank_checkout"},"bank":{"anyOf":[{"type":"string","const":"popular"},{"type":"string","const":"bhd"}]}},"title":"PaymentChannel","additionalProperties":false},"PaymentDecline":{"type":"object","required":["code","message","attemptedAt"],"properties":{"code":{"type":"string","enum":["insufficient_funds","card_expired","invalid_card_number","incorrect_security_code","incorrect_pin","card_restricted","card_reported_lost_or_stolen","exceeds_limit","transaction_not_permitted","authentication_failed","authentication_unavailable","suspected_fraud","do_not_honor","issuer_unavailable","generic_decline","confirmation_timeout"],"description":"Normalized decline code. Raw provider codes are not public."},"message":{"type":"string","description":"Customer-safe explanation. Wording may change."},"attemptedAt":{"type":"string","format":"date-time","description":"When the gateway recorded the provider's decline of this attempt."}},"title":"PaymentDecline","description":"The most recent declined attempt. A decline ends the attempt, not the Payment; the payer can try again until the Payment expires. Submitting the next attempt, canceling the Payment, or creating, replacing, or renewing its split clears it; expiry keeps it.","additionalProperties":false},"PaymentDeclinedEvent":{"type":"object","required":["id","type","apiVersion","occurredAt","data"],"properties":{"id":{"type":"string","pattern":"^event_[0-9a-hjkmnp-tv-z]{24,}$","description":"Event identifier, equal to the webhook-id header."},"type":{"type":"string","const":"payment.declined"},"apiVersion":{"type":"string","const":"2026-10-01","description":"The current contract identity that rendered this delivered event."},"occurredAt":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/PaymentEventData"}},"title":"PaymentDeclinedEvent","description":"Signed event delivered once for each attempt the provider definitively declines. The Payment stays open for another attempt until it expires; retrieve it for `lastDecline`, or for a split share's `split.parts[].lastDecline`.","additionalProperties":false},"PaymentEventData":{"type":"object","required":["id","object"],"properties":{"id":{"type":"string","pattern":"^payment_[0-9a-hjkmnp-tv-z]{24,}$","description":"The Payment the event is about."},"object":{"type":"string","const":"payment"}},"title":"PaymentEventData","additionalProperties":false},"PaymentExpiredEvent":{"type":"object","required":["id","type","apiVersion","occurredAt","data"],"properties":{"id":{"type":"string","pattern":"^event_[0-9a-hjkmnp-tv-z]{24,}$","description":"Event identifier, equal to the webhook-id header."},"type":{"type":"string","const":"payment.expired"},"apiVersion":{"type":"string","const":"2026-10-01","description":"The current contract identity that rendered this delivered event."},"occurredAt":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/PaymentEventData"}},"title":"PaymentExpiredEvent","description":"Signed event delivered after the gateway durably records that the Payment's checkout window closed without approval.","additionalProperties":false},"PaymentInvoiceBuyerInput":{"anyOf":[{"type":"object","required":["kind"],"properties":{"kind":{"type":"string","const":"anonymous"}},"title":"AnonymousBuyer","additionalProperties":false},{"type":"object","required":["kind","taxId"],"properties":{"kind":{"type":"string","const":"domestic"},"taxId":{"type":"string","minLength":1,"maxLength":64}},"additionalProperties":false},{"type":"object","required":["foreignId","legalName","kind"],"properties":{"foreignId":{"type":"string","minLength":1,"maxLength":20,"pattern":"^[A-Za-z0-9][A-Za-z0-9._/-]{0,19}$"},"legalName":{"type":"string","minLength":1,"maxLength":256},"address":{"type":"string","minLength":1,"maxLength":100},"contactName":{"type":"string","minLength":1,"maxLength":80},"email":{"type":"string","format":"email","maxLength":80},"kind":{"type":"string","const":"foreign"}},"additionalProperties":false}],"title":"PaymentInvoiceBuyerInput"},"PaymentInvoiceChoiceRequest":{"type":"object","properties":{"type":{"type":"string","enum":["E31","E32","E45"]},"buyer":{"$ref":"#/components/schemas/PaymentInvoiceBuyerInput"},"governmentEligibility":{"$ref":"#/components/schemas/FiscalGovernmentEligibility"}},"title":"PaymentInvoiceChoiceRequest","description":"Choose the Invoice type and buyer before payment submission. Use an anonymous buyer to clear a previous recipient.","additionalProperties":false},"PaymentInvoiceRecipientRequest":{"type":"object","required":["recipientEmail"],"properties":{"recipientEmail":{"type":"string","format":"email","maxLength":254}},"title":"PaymentInvoiceRecipientRequest","description":"Set the buyer email for a Payment Invoice.","additionalProperties":false},"PaymentInvoicing":{"type":"object","required":["mode","type","recipientEmail"],"properties":{"issuanceProblem":{"type":"object","description":"One RFC 9457 problem body returned on the `/v1` surface.","required":["type","title","status","code","requestId"],"properties":{"code":{"type":"string","minLength":1},"detail":{"type":"string"},"invoiceId":{"type":"string","description":"Present only when the rejected request produced a Fiscal operation."},"issuanceBlockers":{"type":"array","items":{"$ref":"#/components/schemas/IssuanceBlocker"},"description":"Present only when the authoritative issuance rules refused to issue."},"problems":{"type":"array","items":{"$ref":"#/components/schemas/FiscalAdmissionProblem"},"description":"Present only when the rejection points at a value the request carried."},"requestId":{"type":"string"},"status":{"type":"integer","format":"int32","maximum":599,"minimum":400},"title":{"type":"string"},"type":{"$ref":"#/components/schemas/ProblemType"}},"additionalProperties":false},"mode":{"anyOf":[{"type":"string","const":"automatic"},{"type":"string","const":"merchant"},{"type":"string","const":"existing"}]},"type":{"type":"string","enum":["E31","E32","E45"]},"buyer":{"oneOf":[{"type":"object","title":"AnonymousBuyer","required":["kind"],"properties":{"kind":{"type":"string","enum":["anonymous"]}},"additionalProperties":false},{"type":"object","title":"DomesticBuyer","required":["taxId","legalName","kind"],"properties":{"deliveryPhone":{"type":"string","pattern":"^[0-9]{3}-[0-9]{3}-[0-9]{4}$","x-timbro-submission-validation":["pattern"]},"kind":{"type":"string","enum":["domestic"]},"legalName":{"type":"string","maxLength":150,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"taxId":{"type":"string","pattern":"^[0-9]{9}([0-9]{2})?$","x-timbro-submission-validation":["pattern"]}},"additionalProperties":false},{"type":"object","title":"ForeignBuyer","required":["foreignId","legalName","kind"],"properties":{"deliveryPhone":{"type":"string","pattern":"^[0-9]{3}-[0-9]{3}-[0-9]{4}$","x-timbro-submission-validation":["pattern"]},"foreignId":{"type":"string","maxLength":20,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]},"kind":{"type":"string","enum":["foreign"]},"legalName":{"type":"string","maxLength":150,"minLength":1,"pattern":"^(?=.*[^\\p{White_Space}])[\\s\\S]+$","x-timbro-submission-validation":["minLength","maxLength","pattern"]}},"additionalProperties":false}],"discriminator":{"propertyName":"kind"},"title":"InvoiceBuyerIdentity"},"governmentEligibility":{"$ref":"#/components/schemas/FiscalGovernmentEligibility"},"allowedTypes":{"type":"array","items":{"type":"string","enum":["E31","E32","E45"]}},"isTypeLocked":{"type":"boolean"},"isBuyerLocked":{"type":"boolean"},"revision":{"type":"integer","minimum":1,"description":"Increases each time the Invoice type, buyer, or government eligibility changes."},"invoiceReference":{"type":"string","minLength":1,"maxLength":128},"recipientEmail":{"anyOf":[{"type":"string","format":"email","maxLength":320},{"type":"null"}],"description":"Current buyer email the Invoice is delivered to, whoever chose it: the merchant at creation or by the Invoice recipient update, or the payer in Checkout or their account. Null when none is set."}},"title":"PaymentInvoicing","description":"Retained Invoice instructions and recipient choice. Invoice lifecycle and access credentials are reported separately.","additionalProperties":false},"PaymentItem":{"type":"object","required":["description","unitPrice","tax"],"properties":{"id":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string","minLength":1,"maxLength":80},"product":{"$ref":"#/components/schemas/SaleProduct"},"quantity":{"type":"string","pattern":"^(?=[0-9.]*[1-9])[0-9]{1,16}(\\.[0-9]{1,2})?$"},"unit":{"type":"string","enum":["barrel","bag","jar","bundle","bottle","box","cigarette_pack","centimetre","cylinder","set","container","day","dozen","bale","gallon","degree","gram","bulk","hour","crate","kilogram","kilowatt_hour","pound","litre","lot","metre","square_metre","cubic_metre","million_btu","minute","package","pair","foot","piece","roll","envelope","second","tank","ton","tube","yard","square_yard","unit","element","thousand","sack","tin","display","drum","ration","quintal","gross_register_tonnage","square_foot","passenger","inch","boat_berth_stay","tray","hectare","millilitre","milligram","ounce","troy_ounce"]},"unitPrice":{"type":"string","pattern":"^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,4})?$"},"kind":{"anyOf":[{"type":"string","const":"good"},{"type":"string","const":"service"}]},"tax":{"$ref":"#/components/schemas/SaleTax"},"legalTip":{"$ref":"#/components/schemas/SaleLegalTip"},"group":{"type":"string","minLength":1,"maxLength":64}},"title":"PaymentItem","additionalProperties":false},"PaymentListPage":{"type":"object","required":["object","data","hasMore","nextCursor"],"properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","required":["id","object","status","source","saleReference","checkoutDisplay","checkoutReference","lastDecline","problem","invoiceId","invoicing","verification","paymentMethodSummary","isLiveMode","expiresAt","createdAt","updatedAt","sale","paymentReference","amount","voluntaryTip","totalAmount","checkout","split","refundable"],"properties":{"id":{"type":"string","pattern":"^payment_[0-9a-hjkmnp-tv-z]{24,}$","description":"Payment identifier. Opaque; do not parse beyond the prefix."},"object":{"type":"string","const":"payment"},"status":{"$ref":"#/components/schemas/PaymentStatus"},"source":{"$ref":"#/components/schemas/SaleSource"},"subscriptionId":{"type":"string","pattern":"^sub_[0-9a-hjkmnp-tv-z]{24,}$","description":"Subscription owning this billing period"},"initiator":{"anyOf":[{"type":"string","const":"customer"},{"type":"string","const":"merchant"}]},"billingPeriod":{"type":"object","required":["start","end"],"properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"}},"additionalProperties":false},"saleReference":{"type":"string","minLength":1,"maxLength":128,"description":"Merchant-owned searchable business reference. It is immutable after create, need not be unique, and does not identify command retries."},"returnUrl":{"type":"string","format":"uri","pattern":"^https?://","maxLength":2048,"description":"Merchant web destination offered after Checkout. Payment status must be retrieved from the API."},"serviceLabel":{"type":"string","maxLength":24,"description":"Merchant-authored context label such as Mesa 12."},"description":{"type":"string","minLength":1,"maxLength":80,"description":"Concise description of the product or service being purchased."},"breakdown":{"$ref":"#/components/schemas/Breakdown"},"checkoutDisplay":{"$ref":"#/components/schemas/CheckoutDisplay"},"checkoutReference":{"type":"string","pattern":"^checkout_[0-9a-hjkmnp-tv-z]{24,}$","description":"Unpredictable bearer handle for the full receipt projection after terminal payment. Possession reveals buyer identity and itemization; keep it private."},"nextAction":{"$ref":"#/components/schemas/NextAction"},"lastDecline":{"anyOf":[{"$ref":"#/components/schemas/PaymentDecline"},{"type":"null"}]},"problem":{"anyOf":[{"$ref":"#/components/schemas/PaymentProblem"},{"type":"null"}]},"invoiceId":{"anyOf":[{"type":"string","format":"uuid","description":"Canonical Timbro Invoice UUID when admitted."},{"type":"null"}]},"invoicing":{"anyOf":[{"$ref":"#/components/schemas/PaymentInvoicing"},{"type":"null"}]},"verification":{"anyOf":[{"$ref":"#/components/schemas/Verification"},{"type":"null"}]},"paymentMethodSummary":{"anyOf":[{"$ref":"#/components/schemas/PaymentMethodSummary"},{"type":"null"}]},"paymentChannel":{"$ref":"#/components/schemas/PaymentChannel"},"processingReason":{"type":"string","const":"awaiting_company_approval"},"isLiveMode":{"type":"boolean"},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"metadata":{"type":"object","maxProperties":20,"propertyNames":{"minLength":1,"maxLength":40},"description":"Merchant-owned keys carried with this Payment: at most 20 keys of 1 to 40 characters, each holding a string of at most 500 characters. Checkout stores it opaquely, never branches on it, never sends it to a payment provider, and never repeats it in a webhook body or a payer projection. It lives as long as its Payment and is deleted with it. Never put personal data or card data in it.","additionalProperties":{"type":"string","maxLength":500}},"sale":{"$ref":"#/components/schemas/Sale"},"paymentReference":{"type":"string","minLength":1,"maxLength":128,"description":"Immutable payment request identity within merchant and TEST/LIVE scope."},"amount":{"$ref":"#/components/schemas/Money"},"voluntaryTip":{"$ref":"#/components/schemas/Money"},"totalAmount":{"$ref":"#/components/schemas/Money"},"tax":{"type":"object","required":["includedAmount","provenance"],"properties":{"includedAmount":{"type":"string","pattern":"^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,2})?$","description":"Exact nonnegative decimal amount, with at most two fractional digits."},"provenance":{"anyOf":[{"type":"string","const":"explicit"},{"type":"string","const":"merchant_policy"},{"type":"string","const":"itemized"},{"type":"string","const":"provider_submission"}]},"policyRevision":{"type":"integer","minimum":0}},"additionalProperties":false},"checkout":{"type":"object","required":["url","expiresAt"],"properties":{"url":{"type":"string","format":"uri","pattern":"^https?://","maxLength":2048},"expiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}},"additionalProperties":false},"capturedPayment":{"$ref":"#/components/schemas/CapturedPayment"},"split":{"anyOf":[{"$ref":"#/components/schemas/MerchantSplit"},{"type":"null"}],"description":"How the payers are dividing this Payment, or null when it is not split, including after the organizer canceled its split."},"refundable":{"anyOf":[{"type":"object","required":["amount","automaticAmount","automaticPartial"],"properties":{"amount":{"$ref":"#/components/schemas/Money"},"automaticAmount":{"anyOf":[{"$ref":"#/components/schemas/Money"},{"type":"null"}],"description":"The full captured Refund amount submitted to the provider without an operator, for the Payment's current state. Consult automaticPartial for eligible lower amounts. Unsupported Refunds are created as `operator_required` and keep their reservation. A submitted Refund can still end `declined` or `operator_required`."},"automaticPartial":{"anyOf":[{"type":"object","required":["maximumAmount","maximumTaxAmount"],"properties":{"maximumAmount":{"$ref":"#/components/schemas/Money"},"maximumTaxAmount":{"$ref":"#/components/schemas/Money"}},"additionalProperties":false},{"type":"null"}],"description":"A lower positive amount can be refunded automatically with an explicit exact taxAmount, within these limits. Null when partial provider execution is unqualified. This is one refund only, not permission for repeated partial refunds."}},"additionalProperties":false},{"type":"null"}],"description":"Refund options for the Payment's current state. Null until the Payment's capture is recorded."}},"title":"Payment","additionalProperties":false}},"hasMore":{"type":"boolean","description":"True when a further page follows this one."},"nextCursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Send as `cursor` to read the next page, or `null` on the last page."}},"title":"PaymentListPage","description":"A page of merchant Payments with decimal Money.","additionalProperties":false},"PaymentMethodSummary":{"title":"PaymentMethodSummary","description":"Sanitized display-only payment method information. Never authorization data.","oneOf":[{"$ref":"#/components/schemas/CardPaymentMethodSummary"},{"$ref":"#/components/schemas/GooglePayPaymentMethodSummary"},{"$ref":"#/components/schemas/ApplePayPaymentMethodSummary"},{"$ref":"#/components/schemas/BankAccountPaymentMethodSummary"}],"discriminator":{"propertyName":"kind","mapping":{"card":"#/components/schemas/CardPaymentMethodSummary","google_pay":"#/components/schemas/GooglePayPaymentMethodSummary","apple_pay":"#/components/schemas/ApplePayPaymentMethodSummary","bank_account":"#/components/schemas/BankAccountPaymentMethodSummary"}}},"PaymentOperatorRequiredEvent":{"type":"object","required":["id","type","apiVersion","occurredAt","data"],"properties":{"id":{"type":"string","pattern":"^event_[0-9a-hjkmnp-tv-z]{24,}$","description":"Event identifier, equal to the webhook-id header."},"type":{"type":"string","const":"payment.operator_required"},"apiVersion":{"type":"string","const":"2026-10-01","description":"The current contract identity that rendered this delivered event."},"occurredAt":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/PaymentEventData"}},"title":"PaymentOperatorRequiredEvent","description":"Signed event delivered when the settlement audit of an approved Payment needs an operator. Retrieve the Payment for its problem code; the approval still stands.","additionalProperties":false},"PaymentProblem":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["settlement_amount_mismatch","settlement_record_not_found","settlement_amount_unverified"],"description":"Normalized classification of a settlement problem found after approval."},"message":{"type":"string","minLength":1,"maxLength":500}},"title":"PaymentProblem","description":"An approved payment whose settlement evidence needs operator resolution. It does not withdraw the approval.","additionalProperties":false},"PaymentStatus":{"title":"PaymentStatus","type":"string","enum":["requires_customer_action","processing","partially_authorized","authorized","capturing","partially_paid","releasing","verifying","succeeded","canceled","expired"],"description":"Only `succeeded`, `canceled`, and `expired` are terminal. A declined attempt returns the Payment to `requires_customer_action` with `lastDecline`, so the payer can try again until the Payment expires. `partially_authorized` means some shares have reserved funds, `authorized` means every share is reserved and awaits the organizer's capture command, `capturing` means capture is running, and `releasing` means reserved funds are being released. `verifying` is a real, non-terminal status; it is not an error or decline."},"PaymentSucceededEvent":{"type":"object","required":["id","type","apiVersion","occurredAt","data"],"properties":{"id":{"type":"string","pattern":"^event_[0-9a-hjkmnp-tv-z]{24,}$","description":"Event identifier, equal to the webhook-id header."},"type":{"type":"string","const":"payment.succeeded"},"apiVersion":{"type":"string","const":"2026-10-01","description":"The current contract identity that rendered this delivered event."},"occurredAt":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/PaymentEventData"}},"title":"PaymentSucceededEvent","description":"Signed event delivered after the gateway durably records approval.","additionalProperties":false},"PrintedRepresentationPdfMediaType":{"type":"string","enum":["application/pdf"],"title":"PrintedRepresentationPdfMediaType"},"Problem":{"type":"object","description":"RFC 9457 problem details. Every failure of this API is one of these, and each operation narrows `code` to the subset it can emit.","required":["type","title","status","code","requestId"],"properties":{"code":{"type":"string","enum":["subscription_invoicing_blocked","mandate_credential_unavailable","recurring_account_required","subscription_not_found","subscription_reference_conflict","customer_reference_conflict","subscription_setup_unavailable","mandate_consent_required","mandate_revoked","authorization_not_found","authorization_checkout_reference_invalid","authorization_reference_conflict","authorization_capture_conflict","authorization_capture_exceeds_hold","authorization_not_capturable","authorization_not_cancelable","authorization_not_editable","authorization_submission_invalid","authorization_authentication_pending","authorization_credentials_unavailable","authorization_dispatch_refused","authorization_hold_evidence_missing","provider_qualification_required","merchant_account_stopped_by_timbro","person_authentication_unavailable","platform_test_profile_unavailable","business_fiscal_binding_unavailable","business_fiscal_setup_unavailable","business_contact_email_confirmation_required","business_service_scope_required","business_address_required","business_contact_required","business_location_official_codes_required","business_details_invalid","merchant_current_payment_methods_required","merchant_current_sales_channels_required","merchant_existing_card_service_not_applicable","merchant_existing_card_service_other_provider_name_invalid","merchant_existing_card_service_other_provider_name_not_allowed","merchant_existing_card_service_other_provider_name_required","merchant_existing_card_service_providers_exclusive_choice","merchant_existing_card_service_providers_required","merchant_existing_card_service_required","business_location_catalog_changed","business_location_catalog_unavailable","business_location_selection_invalid","business_place_search_unavailable","merchant_payment_methods_not_applicable","merchant_sales_channels_exclusive_choice","merchant_sales_channels_not_applicable","merchant_type_not_applicable","merchant_charge_timing_not_applicable","merchant_charge_timing_required","merchant_payment_methods_exclusive_choice","person_session_missing","business_guest_notice_acceptance_required","active_business_required","business_onboarding_revision_conflict","merchant_checkout_policy_revision_conflict","business_already_claimed","business_attachment_conflict","business_identity_required","business_membership_required","business_revision_conflict","business_capabilities_required","business_certification_path_unavailable","business_certification_requirements_unmet","business_certification_revision_conflict","business_certification_unavailable","business_certification_certificate_required","business_certification_portal_document_unsupported","business_certification_portal_document_taxpayer_mismatch","business_certification_portal_document_confirmation_expired","business_certification_test_set_required","business_certification_test_set_changed","business_certification_test_run_in_progress","business_certification_test_run_document_not_found","business_fiscal_setup_incomplete","merchant_payment_setup_assessment_incomplete","business_certificate_conflict","business_test_fiscal_document_blocked","sequence_overlap","sequence_conflict","business_dgii_assistance_not_applicable","business_dgii_assistance_notes_invalid","parameter_missing","parameter_invalid","provider_not_available","currency_not_supported","amount_below_minimum","amount_above_maximum","checkout_reference_invalid","checkout_reference_expired","fiscal_buyer_tax_id_invalid","fiscal_lines_required","payment_split_invalid","submission_token_invalid","submission_token_expired","request_body_malformed","collection_cursor_invalid","webhook_replay_scope_invalid","api_key_missing","api_key_invalid","integration_token_invalid","integration_authorization_unavailable","checkout_token_invalid","checkout_token_expired","payer_session_missing","operation_not_permitted","invoice_delivery_not_permitted","journey_scope_mismatch","journey_report_timeout","business_fiscal_binding_conflict","live_mode_not_enabled","origin_not_allowed","payer_step_up_required","certificate_handoff_person_mismatch","route_not_found","api_key_not_found","payment_not_found","payment_reference_conflict","refund_reference_conflict","payment_reference_invalid","refund_reference_invalid","payment_tax_required","payment_tax_invalid","payment_items_invalid","payment_totals_mismatch","payment_invoice_item_fields_required","payments_contract_migration_required","merchant_payments_api_paused","refund_not_found","refund_invoice_not_ready","refund_invoice_not_accepted","refund_invoice_mismatch","refund_invoice_conflict","payment_part_not_found","payment_split_not_found","fiscal_document_not_found","merchant_account_not_found","merchant_account_card_capability_not_found","business_not_found","agent_client_not_found","connected_agent_not_found","integration_live_unavailable","integration_system_name_taken","integration_system_limit_reached","certificate_handoff_not_found","webhook_endpoint_not_found","webhook_event_not_found","three_ds_not_found","payer_not_found","saved_card_not_found","payer_credential_not_found","payer_purchase_not_found","payer_fiscal_profile_not_found","idempotency_key_reused","idempotency_request_in_progress","idempotency_key_expired","api_key_retired","payment_method_already_in_progress","payment_not_payable","payment_awaiting_verification","payment_attempt_invalid","payment_attempt_mismatch","payment_attempt_stale","payment_attempts_exhausted","payment_method_mismatch","provider_response_invalid","checkout_window_closed","payment_not_editable","payment_cancel_not_allowed","payment_cancellation_pending","invoicing_locked","source_identity_conflict","refund_source_identity_conflict","refund_payment_not_captured","refund_exceeds_captured","refund_allocation_not_found","refund_allocation_conflict","refund_allocation_ledger_unavailable","fiscal_buyer_required","fiscal_artifact_not_ready","payment_invoice_not_ready","payment_invoice_not_allowed","invoice_reference_stale","fiscal_delivery_not_ready","payment_split_not_allowed","payment_split_exists","payment_split_locked","payment_split_not_capturable","payment_split_not_expired","payment_split_not_renewable","payment_split_complete","payment_split_part_required","payment_part_not_payable","webhook_endpoint_deleted","webhook_endpoint_suspended","three_ds_binding_mismatch","payer_enrollment_unavailable","payer_claim_unavailable","payer_claim_conflict","payer_claim_proof_invalid","payer_delivery_address_unavailable","payer_fiscal_profile_unavailable","certificate_handoff_used","receipt_retention_elapsed","certificate_handoff_expired","request_body_too_large","unsupported_media_type","merchant_account_not_ready","merchant_checkout_policy_invalid","merchant_account_provider_mismatch","merchant_account_identity_mismatch","merchant_profile_incomplete","payment_description_required","sale_amount_invalid","credential_storage_unavailable","provider_not_eligible","no_eligible_provider","currency_not_supported_by_provider","currency_not_supported_for_fiscal_document","fiscal_total_mismatch","fiscal_line_total_invalid","fiscal_line_legal_tip_invalid","fiscal_document_kind_not_allowed","fiscal_document_kind_unsupported","fiscal_government_eligibility_required","fiscal_government_eligibility_not_allowed","certificate_p12_password_invalid","certificate_pkcs12_invalid","certificate_expired","certificate_not_yet_valid","certificate_archive_not_supported","certificate_not_supported","certificate_signer_mismatch","sequence_numbers_invalid","sequence_expiry_invalid","taxpayer_unregistered","taxpayer_inactive","voluntary_tip_currency_mismatch","voluntary_tip_not_allowed_for_split","voluntary_tip_not_available","voluntary_tip_exceeds_maximum","refund_tip_amount_invalid","refund_tip_allocation_unknown","refund_amount_invalid","refund_tax_amount_invalid","refund_tax_amount_required","refund_tax_allocation_unknown","refund_currency_mismatch","exchange_rate_not_found","exchange_rate_rejected","exchange_rate_observation_conflict","payer_fiscal_profile_invalid","rate_limit_exceeded","internal_error","provider_unavailable","provider_rejected_request","taxpayer_directory_unavailable","exchange_rate_unavailable","fiscal_artifact_retrieval_unavailable","fiscal_delivery_unavailable","journey_marks_unavailable","contact_request_delivery_unavailable","unauthenticated","invalid_login","email_already_registered","organization_slug_taken","organization_not_found","hosted_tenant_conflict","insufficient_role","service_role_not_permitted","invalid_fiscal_identity","invalid_certificate_custody_signer_identity","custody_certificate_malformed","custody_certificate_not_yet_valid","custody_certificate_expired","custody_p12_work_limit_exceeded","custody_signature_algorithm_unsupported","custody_certificate_trust_profile_unsupported","custody_certificate_chain_untrusted","custody_certificate_purpose_unsupported","legal_issuer_already_registered","onboarding_legal_issuer_identity_conflict","legal_issuer_profile_incomplete","legal_issuer_not_found","invitation_invalid","invitation_expired","invitation_email_mismatch","already_a_member","certificate_custody_binding_not_found","certificate_custody_binding_conflict","certificate_custody_environment_signer_mismatch","certificate_custody_certificate_not_active","certificate_custody_certificate_version_not_active","integration_not_found","integration_not_connected","source_provider_unavailable","source_provider_authorization_required","source_provider_installation_disabled","source_provider_installation_removed","source_provider_scope_insufficient","source_provider_target_access_removed","source_provider_throttled","source_provider_outcome_unknown","source_provider_authorization_not_found","source_provider_authorization_conflict","source_provider_installation_request_invalid","source_provider_installation_request_expired","source_provider_installation_callback_replayed","integration_creation_conflict","integration_activation_conflict","integration_activation_verification_rejected","delegated_sequence_verifier_forbidden","invalid_credential","credential_revoked","issuer_not_authorized","missing_idempotency_key","invalid_idempotency_key","request_too_large","request_body_timeout","malformed_json","invalid_request","invoice_original_invalid","certification_environment_required","certification_test_set_invalid","certification_test_set_required","certification_test_run_in_progress","certification_test_run_document_not_found","invalid_collection_query","invalid_collection_cursor","document_type_not_enabled","fiscal_intent_rejected","idempotency_key_conflict","fiscal_number_already_used","sequence_changed","sequence_source_record_conflict","source_version_stale","source_predecessor_conflict","source_history_requires_reconciliation","source_content_conflict","source_action_conflict","source_command_conflict","invoice_reference_conflict","invoice_totals_mismatch","printed_representation_profile_conflict","source_record_already_fiscalized","source_operation_pending","source_outcome_unknown","authority_rejected_replacement","fiscal_operation_not_in_intervention","intervention_not_resumable","intervention_not_closable","correction_target_unsettled","correction_target_closed","unsupported_printed_representation_profile","affected_fiscal_operation_unsupported","fiscal_issuance_blocked","fiscal_operation_not_found","invoice_not_found","fiscal_artifact_not_found","fiscal_artifact_unverified","fiscal_artifact_unavailable","invoice_receipt_not_found","invoice_receipt_not_ready","invoice_receipt_unavailable","fiscal_delivery_not_found","fiscal_delivery_outcome_conflict","webhook_endpoint_registration_conflict","invalid_replay_scope","webhook_destination_not_allowed","unsigned_document_schema_invalid","signed_document_schema_invalid","custody_unavailable","portal_document_unsupported","portal_document_taxpayer_mismatch","portal_document_consent_invalid","received_document_not_found","commercial_response_motive_invalid","commercial_response_decision_conflict","receiving_issuer_not_found","receiving_issuer_held_elsewhere","production_reception_certificate_required","production_reception_integration_required","production_reception_already_filed","method_not_allowed"],"description":"Stable machine-readable code. Branch on this, never on `title`."},"detail":{"type":"string"},"invoiceId":{"type":"string","description":"Present only when the rejected request produced a Fiscal operation."},"issuanceBlockers":{"type":"array","items":{"$ref":"#/components/schemas/IssuanceBlocker"},"description":"Present only when the authoritative issuance rules refused to issue."},"problems":{"type":"array","items":{"$ref":"#/components/schemas/FiscalAdmissionProblem"},"description":"Present only when the rejection points at a value the request carried."},"requestId":{"type":"string"},"status":{"type":"integer","format":"int32","maximum":599,"minimum":400},"title":{"type":"string"},"type":{"$ref":"#/components/schemas/ProblemType"}},"additionalProperties":false,"title":"Problem"},"ProblemType":{"type":"string","enum":["about:blank"],"title":"ProblemType"},"ReceivedDocumentCommercialResponseResource":{"oneOf":[{"type":"object","description":"The received document is not in the `received` state, so it carries nothing to review.","required":["status"],"properties":{"status":{"type":"string","enum":["notReviewable"]}},"additionalProperties":false},{"type":"object","title":"PendingStatus","description":"Received and awaiting the administrator's review.","required":["status"],"properties":{"status":{"type":"string","enum":["pending"]}},"additionalProperties":false},{"type":"object","required":["recordedAt","submissionState","status"],"properties":{"recordedAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["accepted"]},"submissionState":{"$ref":"#/components/schemas/CommercialResponseSubmissionStateResource"}},"additionalProperties":false},{"type":"object","required":["motive","recordedAt","submissionState","status"],"properties":{"motive":{"type":"string","maxLength":250},"recordedAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["rejected"]},"submissionState":{"$ref":"#/components/schemas/CommercialResponseSubmissionStateResource"}},"additionalProperties":false}],"description":"Actor-facing commercial-response state, projected from the receiver's own decision row.","discriminator":{"propertyName":"status"},"title":"ReceivedDocumentCommercialResponseResource"},"ReceivedDocumentNotReceivedReasonResource":{"type":"string","enum":["schemaError","signatureError","duplicateSubmission","buyerRncMismatch"],"title":"ReceivedDocumentNotReceivedReasonResource"},"ReceivedDocumentPage":{"type":"object","required":["object","data","hasMore","nextCursor"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ReceivedDocumentSummary"}},"hasMore":{"type":"boolean"},"nextCursor":{"type":["string","null"]},"object":{"$ref":"#/components/schemas/CollectionObject"}},"additionalProperties":false,"title":"ReceivedDocumentPage"},"ReceivedDocumentRecoveryFilter":{"type":"string","enum":["pending","inFlight","submitted","dgiiRejected","submissionRefused","signingRefused","constructionRefused","authenticationFailed","unavailable","outcomeUnknown","attemptsExhausted"],"title":"ReceivedDocumentRecoveryFilter"},"ReceivedDocumentResource":{"type":"object","required":["id","environment","issuerTaxId","issuerLegalName","buyerTaxId","eNcf","state","receivedAt","commercialResponse","notReceivedReason","receivedXmlSha256"],"properties":{"buyerTaxId":{"type":"string"},"commercialResponse":{"$ref":"#/components/schemas/ReceivedDocumentCommercialResponseResource"},"eNcf":{"type":"string"},"environment":{"$ref":"#/components/schemas/FiscalEnvironment"},"id":{"type":"string","format":"uuid"},"issuerLegalName":{"type":["string","null"],"description":"The issuer's `RazonSocialEmisor` as the delivered e-CF states it, or `null` when the\ndelivery carried no readable name.","maxLength":150,"minLength":1,"pattern":"\\S"},"issuerTaxId":{"type":"string"},"notReceivedReason":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ReceivedDocumentNotReceivedReasonResource"}]},"receivedAt":{"type":"string","format":"date-time"},"receivedXmlSha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"state":{"$ref":"#/components/schemas/ReceivedDocumentStateResource"}},"additionalProperties":false,"title":"ReceivedDocumentResource"},"ReceivedDocumentResponseFilter":{"type":"string","enum":["pending","accepted","rejected"],"title":"ReceivedDocumentResponseFilter"},"ReceivedDocumentStateFilter":{"type":"string","enum":["received","notReceived"],"title":"ReceivedDocumentStateFilter"},"ReceivedDocumentStateResource":{"type":"string","enum":["received","notReceived"],"title":"ReceivedDocumentStateResource"},"ReceivedDocumentSummary":{"type":"object","required":["id","environment","issuerTaxId","issuerLegalName","buyerTaxId","eNcf","state","receivedAt","commercialResponse"],"properties":{"buyerTaxId":{"type":"string"},"commercialResponse":{"$ref":"#/components/schemas/ReceivedDocumentCommercialResponseResource"},"eNcf":{"type":"string"},"environment":{"$ref":"#/components/schemas/FiscalEnvironment"},"id":{"type":"string","format":"uuid"},"issuerLegalName":{"type":["string","null"],"description":"The issuer's `RazonSocialEmisor` as the delivered e-CF states it, or `null` when the\ndelivery carried no readable name.","maxLength":150,"minLength":1,"pattern":"\\S"},"issuerTaxId":{"type":"string"},"receivedAt":{"type":"string","format":"date-time"},"state":{"$ref":"#/components/schemas/ReceivedDocumentStateResource"}},"additionalProperties":false,"title":"ReceivedDocumentSummary"},"RedirectToUrlAction":{"type":"object","required":["kind","url","expiresAt"],"properties":{"kind":{"type":"string","const":"redirect_to_url"},"url":{"type":"string","format":"uri","description":"Open in a top-level browsing context."},"expiresAt":{"type":"string","format":"date-time"}},"title":"RedirectToUrlAction","description":"Send the customer to the hosted checkout page.","additionalProperties":false},"Refund":{"type":"object","required":["id","object","paymentId","source","refundReference","amount","taxAmount","voluntaryTipAmount","allocationIds","allocationAmounts","kind","status","providerOutcome","invoiceId","webhookEvents","createdAt","updatedAt"],"properties":{"id":{"type":"string","pattern":"^refund_[0-9a-hjkmnp-tv-z]{24,}$","description":"Refund identifier."},"object":{"type":"string","const":"refund"},"paymentId":{"type":"string","pattern":"^payment_[0-9a-hjkmnp-tv-z]{24,}$","description":"Payment whose captured money is being returned."},"source":{"$ref":"#/components/schemas/SaleSource"},"refundReference":{"type":"string","minLength":1,"maxLength":128,"description":"Immutable Refund identity within this merchant and TEST/LIVE mode."},"merchantReference":{"type":"string","minLength":1,"maxLength":128,"description":"Merchant label retained from the original refund request."},"amount":{"$ref":"#/components/schemas/Money"},"taxAmount":{"anyOf":[{"type":"object","required":["currency","value"],"properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$","examples":["DOP"]},"value":{"type":"string","pattern":"^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,2})?$","description":"Exact nonnegative decimal amount, with at most two fractional digits."}},"title":"Money","description":"Exact returned ITBIS, never inferred proportionally. A full original refund uses captured tax when omitted.","additionalProperties":false},{"type":"null"}],"description":"Exact returned ITBIS retained for this Refund, or null when unproven. It is independent of fiscal credit-note issuance."},"voluntaryTipAmount":{"anyOf":[{"type":"object","required":["currency","value"],"properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$","examples":["DOP"]},"value":{"type":"string","pattern":"^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,2})?$","description":"Exact nonnegative decimal amount, with at most two fractional digits."}},"title":"Money","description":"Exact voluntary-tip portion of the refund's returned money, excluded from the fiscal credit-note amount.","additionalProperties":false},{"type":"null"}],"description":"Exact voluntary-tip portion of returned money. Null indicates unproven historical attribution. This portion is excluded from the fiscal credit-note amount."},"allocationIds":{"type":"array","items":{"type":"string","pattern":"^payment_allocation_[0-9a-hjkmnp-tv-z]{24,}$","description":"Captured allocation attributed to this refund."}},"allocationAmounts":{"type":"array","items":{"$ref":"#/components/schemas/RefundAllocationAmount"}},"kind":{"anyOf":[{"type":"string","const":"partial"},{"type":"string","const":"full"}]},"status":{"$ref":"#/components/schemas/RefundStatus"},"providerOutcome":{"$ref":"#/components/schemas/RefundProviderOutcome"},"invoiceId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"The verified E34 Invoice associated with this refund, or null. This does not establish provider refund success."},"webhookEvents":{"type":"array","items":{"$ref":"#/components/schemas/RefundWebhookPointer"}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time"},"decline":{"$ref":"#/components/schemas/RefundDecline"},"problem":{"$ref":"#/components/schemas/RefundProblem"}},"title":"Refund","description":"A durable full or partial refund request. Provider money movement and fiscal note coordination are independent state machines.","additionalProperties":false},"RefundAllocationAmount":{"type":"object","required":["id","amount"],"properties":{"id":{"type":"string","pattern":"^payment_allocation_[0-9a-hjkmnp-tv-z]{24,}$","description":"Captured allocation attributed to this refund."},"amount":{"$ref":"#/components/schemas/Money"}},"title":"RefundAllocationAmount","additionalProperties":false},"RefundDecline":{"type":"object","required":["code","canTryAgain","message"],"properties":{"code":{"type":"string","const":"refund_declined"},"canTryAgain":{"type":"boolean","const":true},"message":{"type":"string","minLength":1,"maxLength":256}},"title":"RefundDecline","additionalProperties":false},"RefundDeclinedEvent":{"type":"object","required":["id","type","apiVersion","occurredAt","data"],"properties":{"id":{"type":"string","pattern":"^event_[0-9a-hjkmnp-tv-z]{24,}$","description":"Event identifier, equal to the webhook-id header."},"type":{"type":"string","const":"refund.declined"},"apiVersion":{"type":"string","const":"2026-10-01","description":"The current contract identity that rendered this delivered event."},"occurredAt":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/RefundEventData"}},"title":"RefundDeclinedEvent","description":"Signed event delivered after the provider definitively declines a Refund. Its reserved balance is released.","additionalProperties":false},"RefundEventData":{"type":"object","required":["id","object"],"properties":{"id":{"type":"string","pattern":"^refund_[0-9a-hjkmnp-tv-z]{24,}$","description":"The Refund the event is about."},"object":{"type":"string","const":"refund"}},"title":"RefundEventData","additionalProperties":false},"RefundInvoiceAttachedEvent":{"type":"object","required":["id","type","apiVersion","occurredAt","data"],"properties":{"id":{"type":"string","pattern":"^event_[0-9a-hjkmnp-tv-z]{24,}$","description":"Event identifier, equal to the webhook-id header."},"type":{"type":"string","const":"refund.invoiceAttached"},"apiVersion":{"type":"string","const":"2026-10-01","description":"The current contract identity that rendered this delivered event."},"occurredAt":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/RefundEventData"}},"title":"RefundInvoiceAttachedEvent","description":"Signed event delivered when a verified credit-note Invoice is associated with a Refund.","additionalProperties":false},"RefundListPage":{"type":"object","required":["object","data","hasMore","nextCursor"],"properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Refund"}},"hasMore":{"type":"boolean","description":"True when a further page follows this one."},"nextCursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Send as `cursor` to read the next page, or `null` on the last page."}},"title":"RefundListPage","description":"One page of Refunds, newest first.","additionalProperties":false},"RefundOperatorRequiredEvent":{"type":"object","required":["id","type","apiVersion","occurredAt","data"],"properties":{"id":{"type":"string","pattern":"^event_[0-9a-hjkmnp-tv-z]{24,}$","description":"Event identifier, equal to the webhook-id header."},"type":{"type":"string","const":"refund.operator_required"},"apiVersion":{"type":"string","const":"2026-10-01","description":"The current contract identity that rendered this delivered event."},"occurredAt":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/RefundEventData"}},"title":"RefundOperatorRequiredEvent","description":"Signed event delivered when a Refund needs operator or provider qualification action.","additionalProperties":false},"RefundProblem":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["provider_refund_capability_not_qualified","refund_recovery_exhausted","refund_provider_reference_unavailable","refund_provider_credentials_rejected"],"description":"Normalized classification of an unresolved refund."},"message":{"type":"string","minLength":1,"maxLength":256}},"title":"RefundProblem","additionalProperties":false},"RefundProviderOutcome":{"type":"object","required":["status","lastAttemptAt","nextRetryAt"],"properties":{"status":{"type":"string","enum":["not_attempted","pending","succeeded","declined","unknown","operator_required"]},"message":{"type":"string","minLength":1,"maxLength":500},"lastAttemptAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"nextRetryAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"reasonCode":{"type":"string","minLength":1,"maxLength":128}},"title":"RefundProviderOutcome","description":"Provider outcome kept separate from fiscal credit-note coordination. Provider-specific references are not exposed.","additionalProperties":false},"RefundStatus":{"type":"string","enum":["processing","succeeded","declined","verifying","operator_required"],"title":"RefundStatus","description":"Refund lifecycle. `verifying` means the provider outcome is ambiguous and is being recovered without resubmitting the refund."},"RefundSucceededEvent":{"type":"object","required":["id","type","apiVersion","occurredAt","data"],"properties":{"id":{"type":"string","pattern":"^event_[0-9a-hjkmnp-tv-z]{24,}$","description":"Event identifier, equal to the webhook-id header."},"type":{"type":"string","const":"refund.succeeded"},"apiVersion":{"type":"string","const":"2026-10-01","description":"The current contract identity that rendered this delivered event."},"occurredAt":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/RefundEventData"}},"title":"RefundSucceededEvent","description":"Signed event delivered after the provider confirms that a Refund returned money.","additionalProperties":false},"RefundWebhookPointer":{"type":"object","required":["id","type"],"properties":{"id":{"type":"string","pattern":"^event_[0-9a-hjkmnp-tv-z]{24,}$","description":"Webhook event identifier related to this Refund."},"type":{"type":"string","minLength":1,"maxLength":128}},"title":"RefundWebhookPointer","additionalProperties":false},"ReplayWebhookEventsRequest":{"type":"object","properties":{"eventIds":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEventId"},"minItems":1,"maxItems":100,"uniqueItems":true},"occurredAfter":{"type":"string","format":"date-time","description":"Selects the events that happened at or after this instant."},"occurredBefore":{"type":"string","format":"date-time","description":"Selects the events that happened at or before this instant."}},"title":"ReplayWebhookEventsRequest","description":"The events to send again: either up to 100 event ids, or an occurredAfter and occurredBefore window of at most seven days that selects at most 100 events. A body naming both, or an incomplete window, answers webhook_replay_scope_invalid with a pointer at the property at fault.","additionalProperties":false},"RetainedCertificationWorkbook":{"type":"object","required":["name","sizeBytes","sha256"],"properties":{"name":{"type":"string"},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"sizeBytes":{"type":"integer","format":"int32","maximum":3145728,"minimum":1}},"additionalProperties":false,"title":"RetainedCertificationWorkbook"},"Sale":{"title":"Sale","description":"One immutable commercial sale snapshot used for Checkout and fiscal derivation.","oneOf":[{"$ref":"#/components/schemas/ItemizedSale"},{"$ref":"#/components/schemas/AmountOnlySale"}],"discriminator":{"propertyName":"kind","mapping":{"itemized":"#/components/schemas/ItemizedSale","amount_only":"#/components/schemas/AmountOnlySale"}}},"SaleItem":{"type":"object","required":["id","description","quantity","unitPrice","tax"],"properties":{"id":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string","minLength":1,"maxLength":80},"product":{"$ref":"#/components/schemas/SaleProduct"},"quantity":{"type":"string","pattern":"^(?=[0-9.]*[1-9])[0-9]{1,16}(\\.[0-9]{1,2})?$"},"unit":{"type":"string","enum":["barrel","bag","jar","bundle","bottle","box","cigarette_pack","centimetre","cylinder","set","container","day","dozen","bale","gallon","degree","gram","bulk","hour","crate","kilogram","kilowatt_hour","pound","litre","lot","metre","square_metre","cubic_metre","million_btu","minute","package","pair","foot","piece","roll","envelope","second","tank","ton","tube","yard","square_yard","unit","element","thousand","sack","tin","display","drum","ration","quintal","gross_register_tonnage","square_foot","passenger","inch","boat_berth_stay","tray","hectare","millilitre","milligram","ounce","troy_ounce"]},"unitPrice":{"type":"string","pattern":"^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,4})?$"},"kind":{"anyOf":[{"type":"string","const":"good"},{"type":"string","const":"service"}]},"tax":{"$ref":"#/components/schemas/SaleTax"},"legalTip":{"$ref":"#/components/schemas/SaleLegalTip"},"group":{"type":"string","minLength":1,"maxLength":64}},"title":"SaleItem","additionalProperties":false},"SaleLegalTip":{"type":"object","required":["applied"],"properties":{"applied":{"type":"boolean"}},"title":"SaleLegalTip","additionalProperties":false},"SaleProduct":{"type":"object","required":["id"],"properties":{"id":{"type":"string","minLength":1,"maxLength":128},"sku":{"type":"string","minLength":1,"maxLength":128},"name":{"type":"string","minLength":1,"maxLength":256},"description":{"type":"string","minLength":1,"maxLength":500},"imageUrl":{"type":"string","format":"uri","maxLength":2048}},"title":"SaleProduct","description":"Presentation metadata. It is excluded from the fiscal canonical content.","additionalProperties":false},"SaleSource":{"type":"object","required":["id","version"],"properties":{"id":{"type":"string","minLength":1,"maxLength":256},"version":{"type":"string","minLength":1,"maxLength":128}},"title":"SaleSource","description":"Immutable commercial source coordinate supplied by the merchant adapter.","additionalProperties":false},"SaleTax":{"type":"object","required":["kind","included"],"properties":{"kind":{"anyOf":[{"type":"string","const":"itbis_18"},{"type":"string","const":"itbis_16"},{"type":"string","const":"zero_rated"},{"type":"string","const":"exempt"},{"type":"string","const":"non_billable"}]},"included":{"type":"boolean"}},"title":"SaleTax","additionalProperties":false},"SaleTotals":{"type":"object","required":["net","tax","legalTip","total"],"properties":{"net":{"type":"string","pattern":"^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,2})?$"},"tax":{"type":"string","pattern":"^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,2})?$"},"legalTip":{"type":"string","pattern":"^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,2})?$"},"total":{"type":"string","pattern":"^(0|[1-9][0-9]{0,15})(\\.[0-9]{1,2})?$"}},"title":"SaleTotals","additionalProperties":false},"SourceItemKind":{"type":"string","description":"Whether a Source line describes a good or a service.","enum":["good","service"],"title":"SourceItemKind"},"SourceMeasurementUnit":{"type":"string","description":"A DGII e-CF unit of measure: a readable lowercase name on the Source and Invoice wire,\nthe official numeric catalog code in fiscal documents.","enum":["barrel","bag","jar","bundle","bottle","box","cigarette_pack","centimetre","cylinder","set","container","day","dozen","bale","gallon","degree","gram","bulk","hour","crate","kilogram","kilowatt_hour","pound","litre","lot","metre","square_metre","cubic_metre","million_btu","minute","package","pair","foot","piece","roll","envelope","second","tank","ton","tube","yard","square_yard","unit","element","thousand","sack","tin","display","drum","ration","quintal","gross_register_tonnage","square_foot","passenger","inch","boat_berth_stay","tray","hectare","millilitre","milligram","ounce","troy_ounce"],"title":"SourceMeasurementUnit"},"SourcePaymentMethod":{"type":"string","description":"Named payment methods whose official codes are owned by fiscal-document.","enum":["cash","bank_transfer","card","credit_sale","gift_certificate","barter","credit_note","other"],"title":"SourcePaymentMethod"},"SplitPartStatus":{"type":"string","enum":["unpaid","processing","authorized","capturing","releasing","verifying","succeeded","released","expired"],"title":"SplitPartStatus","description":"Authorization and capture state for one share. `authorized` means funds are reserved; `succeeded` means the reservation was captured."},"SplitStatus":{"type":"string","enum":["open","partially_authorized","authorized","capturing","partially_paid","releasing","released","succeeded","expired"],"title":"SplitStatus","description":"Aggregate split state. `captured` is settled money; `authorized` is reserved money; `releasing` and `released` describe authorization release."},"Subscription":{"type":"object","required":["id","subscriptionReference","terms","customer","status","amount","interval","nextPaymentAt","setup","management","managementLinkEmail","deferralReason","createdAt","canceledAt","payments","paymentsHasMore","paymentsNextCursor"],"properties":{"id":{"type":"string","pattern":"^sub_[0-9a-hjkmnp-tv-z]{24,}$","description":"Subscription identity"},"subscriptionReference":{"type":"string"},"terms":{"type":"object","required":["version","text","locale","translations"],"properties":{"version":{"type":"string"},"text":{"type":"string"},"locale":{"anyOf":[{"type":"string","const":"es"},{"type":"string","const":"en"}]},"translations":{"type":"object","required":["es","en"],"properties":{"es":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"customer":{"$ref":"#/components/schemas/SubscriptionCustomer"},"status":{"$ref":"#/components/schemas/SubscriptionStatus"},"amount":{"$ref":"#/components/schemas/Money"},"interval":{"type":"object","required":["unit"],"properties":{"unit":{"type":"string","const":"month"}},"additionalProperties":false},"nextPaymentAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"setup":{"anyOf":[{"type":"object","required":["url","expiresAt"],"properties":{"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"expiresAt":{"type":"string","format":"date-time"}},"title":"SubscriptionSetupLink","additionalProperties":false},{"type":"null"}]},"management":{"anyOf":[{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"}},"title":"SubscriptionLink","additionalProperties":false},{"type":"null"}]},"managementLinkEmail":{"anyOf":[{"type":"object","required":["status","requestedAt"],"properties":{"status":{"anyOf":[{"type":"string","const":"pending"},{"type":"string","const":"accepted"},{"type":"string","const":"failed"},{"type":"string","const":"unknown"}]},"requestedAt":{"type":"string","format":"date-time"}},"title":"SubscriptionManagementLinkEmail","additionalProperties":false},{"type":"null"}],"description":"The customer's latest request for a new management link and whether its email reached the provider. `failed` is a final rejection; `unknown` means the handoff could not be confirmed."},"deferralReason":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionDeferralReason"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time"},"canceledAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"payments":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionPayment"},"maxItems":5},"paymentsHasMore":{"type":"boolean"},"paymentsNextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"title":"Subscription","additionalProperties":false},"SubscriptionCanceledEvent":{"type":"object","required":["id","type","apiVersion","occurredAt","data"],"properties":{"id":{"type":"string","pattern":"^event_[0-9a-hjkmnp-tv-z]{24,}$","description":"Event identifier, equal to the webhook-id header."},"type":{"type":"string","const":"subscription.canceled"},"apiVersion":{"type":"string","const":"2026-10-01","description":"The current contract identity that rendered this delivered event."},"occurredAt":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/SubscriptionEventData"}},"title":"SubscriptionCanceledEvent","description":"Signed event recorded once when future subscription payments are canceled. Retrieve the Subscription for its current state; submitted Payments can still complete.","additionalProperties":false},"SubscriptionCustomer":{"type":"object","required":["customerReference","name","email"],"properties":{"customerReference":{"type":"string","minLength":1,"maxLength":128},"name":{"type":"string","minLength":1,"maxLength":150},"email":{"type":"string","format":"email","maxLength":254}},"title":"SubscriptionCustomer","additionalProperties":false},"SubscriptionDeferralReason":{"type":"string","enum":["merchant_account_not_ready","recurring_account_required","mandate_credential_unavailable","business_fiscal_binding_unavailable","business_fiscal_setup_unavailable","subscription_invoicing_blocked","card_enrollment_incomplete","other"],"title":"SubscriptionDeferralReason"},"SubscriptionEventData":{"type":"object","required":["id","object"],"properties":{"id":{"type":"string","pattern":"^sub_[0-9a-hjkmnp-tv-z]{24,}$","description":"The Subscription the event is about."},"object":{"type":"string","const":"subscription"}},"title":"SubscriptionEventData","additionalProperties":false},"SubscriptionInvoicing":{"type":"object","required":["type","mode"],"properties":{"type":{"type":"string","enum":["E31","E32","E45"]},"buyer":{"$ref":"#/components/schemas/PaymentInvoiceBuyerInput"},"recipientEmail":{"type":"string","format":"email","maxLength":254,"description":"Buyer email the Invoice is delivered to once issued."},"isTypeLocked":{"type":"boolean"},"isBuyerLocked":{"type":"boolean"},"governmentEligibility":{"$ref":"#/components/schemas/FiscalGovernmentEligibility"},"mode":{"type":"string","const":"automatic"}},"title":"SubscriptionInvoicing"},"SubscriptionList":{"type":"object","required":["object","data","hasMore","nextCursor"],"properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Subscription"}},"hasMore":{"type":"boolean","description":"True when a further page follows this one."},"nextCursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Send as `cursor` to read the next page, or `null` on the last page."}},"title":"SubscriptionList","description":"A page of subscriptions scoped to the current tenant and mode.","additionalProperties":false},"SubscriptionPayment":{"type":"object","required":["id","status","invoiceId","customerCheckoutUrl","periodStart","periodEnd","initiator","recoveryNotice"],"properties":{"id":{"type":"string","pattern":"^pay_[0-9a-hjkmnp-tv-z]{24,}$","description":"Payment identity"},"status":{"$ref":"#/components/schemas/PaymentStatus"},"invoiceId":{"anyOf":[{"type":"string"},{"type":"null"}]},"customerCheckoutUrl":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]},"periodStart":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"periodEnd":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"initiator":{"anyOf":[{"type":"string","const":"customer"},{"type":"string","const":"merchant"}]},"recoveryNotice":{"anyOf":[{"type":"object","required":["status","deadline","problem"],"properties":{"status":{"anyOf":[{"type":"string","const":"pending"},{"type":"string","const":"accepted"},{"type":"string","const":"failed"},{"type":"string","const":"unknown"}]},"deadline":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"problem":{"anyOf":[{"$ref":"#/components/schemas/SubscriptionRecoveryNoticeProblem"},{"type":"null"}]}},"title":"SubscriptionRecoveryNotice","additionalProperties":false},{"type":"null"}]},"invoicing":{"anyOf":[{"$ref":"#/components/schemas/PaymentInvoicing"},{"type":"null"}]}},"title":"SubscriptionPayment","additionalProperties":false},"SubscriptionPayments":{"type":"object","required":["object","data","hasMore","nextCursor"],"properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/SubscriptionPayment"}},"hasMore":{"type":"boolean","description":"True when a further page follows this one."},"nextCursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Send as `cursor` to read the next page, or `null` on the last page."}},"title":"SubscriptionPayments","description":"A page of payment history for one subscription.","additionalProperties":false},"SubscriptionRecoveryNoticeProblem":{"type":"string","enum":["notice_unavailable","notice_handoff_failed","notice_handoff_unknown","notice_delivery_failed"],"title":"SubscriptionRecoveryNoticeProblem","description":"Why a recovery notice needs attention. `notice_handoff_failed` is a final provider rejection; `notice_handoff_unknown` is a handoff whose outcome is uncertain, retried until the provider's deduplication window ends; `notice_delivery_failed` is a bounce or complaint after handoff; `notice_unavailable` means the notice could not be prepared yet."},"SubscriptionStatus":{"type":"string","enum":["pending","active","past_due","deferred","canceled","expired"],"title":"SubscriptionStatus"},"SubscriptionStatusChangedEvent":{"type":"object","required":["id","type","apiVersion","occurredAt","data"],"properties":{"id":{"type":"string","pattern":"^event_[0-9a-hjkmnp-tv-z]{24,}$","description":"Event identifier, equal to the webhook-id header."},"type":{"type":"string","const":"subscription.status_changed"},"apiVersion":{"type":"string","const":"2026-10-01","description":"The current contract identity that rendered this delivered event."},"occurredAt":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/SubscriptionEventData"}},"title":"SubscriptionStatusChangedEvent","description":"Signed event recorded when a Subscription changes status or deferral reason. Retrieve the Subscription for its current state; deliveries may arrive out of order.","additionalProperties":false},"Verification":{"type":"object","required":["startedAt","nextCheckAt","isEscalated"],"properties":{"startedAt":{"type":"string","format":"date-time"},"nextCheckAt":{"type":"string","format":"date-time"},"isEscalated":{"type":"boolean"}},"title":"Verification","description":"Reconciliation progress while status is verifying.","additionalProperties":false},"WebhookDelivery":{"type":"object","required":["id","object","eventId","eventType","state","attemptCount","nextAttemptAt","lastStatusCode","resultCode","lastResponseExcerpt","replayId","occurredAt","createdAt"],"properties":{"id":{"type":"string","pattern":"^webhook_delivery_[0-9a-hjkmnp-tv-z]{24,}$","description":"Delivery identifier. A replay of the same event is a new one."},"object":{"type":"string","const":"webhook_delivery"},"eventId":{"$ref":"#/components/schemas/WebhookEventId"},"eventType":{"type":"string","minLength":1,"maxLength":128,"description":"The retained event type, including events from earlier contracts."},"state":{"$ref":"#/components/schemas/WebhookDeliveryState"},"attemptCount":{"type":"integer","minimum":0,"description":"Attempts already spent."},"nextAttemptAt":{"type":"string","format":"date-time","description":"When the next attempt is due. Meaningless once the state is terminal."},"lastStatusCode":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"HTTP status of the last attempt, or null when no response arrived."},"resultCode":{"anyOf":[{"$ref":"#/components/schemas/WebhookDeliveryResultCode"},{"type":"null"}],"description":"Why the delivery ended, or null while it is still being attempted."},"lastResponseExcerpt":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"description":"Bounded, printable prefix of what the endpoint answered, or null when no response arrived."},"replayId":{"anyOf":[{"type":"string","pattern":"^webhook_replay_[0-9a-hjkmnp-tv-z]{24,}$","description":"The replay that queued this delivery."},{"type":"null"}],"description":"The replay that queued this delivery, or null for the original fan-out."},"occurredAt":{"type":"string","format":"date-time","description":"When the event happened."},"createdAt":{"type":"string","format":"date-time","description":"When this delivery was queued."}},"title":"WebhookDelivery","description":"One attempted or pending HTTPS POST of one event to one webhook endpoint. The signing secret and the full destination response are never part of it.","additionalProperties":false},"WebhookDeliveryListPage":{"type":"object","required":["object","data","hasMore","nextCursor"],"properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"}},"hasMore":{"type":"boolean","description":"True when a further page follows this one."},"nextCursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Send as `cursor` to read the next page, or `null` on the last page."}},"title":"WebhookDeliveryListPage","description":"One page of deliveries for one webhook endpoint, newest first.","additionalProperties":false},"WebhookDeliveryResultCode":{"anyOf":[{"type":"string","const":"delivered"},{"type":"string","const":"attempt_budget_exhausted"},{"type":"string","const":"delivery_deadline_exceeded"}],"title":"WebhookDeliveryResultCode","description":"Why a delivery reached its terminal state."},"WebhookDeliveryState":{"anyOf":[{"type":"string","const":"pending"},{"type":"string","const":"processing"},{"type":"string","const":"delivered"},{"type":"string","const":"dead_lettered"}],"title":"WebhookDeliveryState","description":"A pending delivery waits for its next attempt, a processing one is in flight, a delivered one was accepted, and a dead-lettered one is never attempted again."},"WebhookEndpoint":{"type":"object","required":["id","object","url","enabledEvents","status","secretCreatedAt","previousSecretExpiresAt","createdAt"],"properties":{"id":{"type":"string","pattern":"^webhook_endpoint_[0-9a-hjkmnp-tv-z]{24,}$","description":"Webhook endpoint identifier."},"object":{"type":"string","const":"webhook_endpoint"},"url":{"type":"string","format":"uri"},"enabledEvents":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"minItems":1,"description":"The retained subscription configuration, including event types from earlier contracts."},"status":{"$ref":"#/components/schemas/WebhookEndpointStatus"},"secretCreatedAt":{"type":"string","format":"date-time","description":"When the current signing secret was issued."},"previousSecretExpiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the previous signing secret stops signing deliveries, or null outside a rotation grace window."},"createdAt":{"type":"string","format":"date-time"}},"title":"WebhookEndpoint","description":"A merchant endpoint configured to receive authenticated domain events.","additionalProperties":false},"WebhookEndpointListPage":{"type":"object","required":["object","data","hasMore","nextCursor"],"properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}},"hasMore":{"type":"boolean","description":"True when a further page follows this one."},"nextCursor":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"description":"Send as `cursor` to read the next page, or `null` on the last page."}},"title":"WebhookEndpointListPage","description":"One page of webhook endpoints, newest first.","additionalProperties":false},"WebhookEndpointStatus":{"anyOf":[{"type":"string","const":"active"},{"type":"string","const":"suspended"},{"type":"string","const":"deleted"}],"title":"WebhookEndpointStatus","description":"An active endpoint receives deliveries, a suspended one holds them until it is reactivated, and a deleted one never receives another."},"WebhookEndpointWithSecret":{"type":"object","required":["id","object","url","enabledEvents","status","secretCreatedAt","previousSecretExpiresAt","createdAt","secret"],"properties":{"id":{"type":"string","pattern":"^webhook_endpoint_[0-9a-hjkmnp-tv-z]{24,}$","description":"Webhook endpoint identifier."},"object":{"type":"string","const":"webhook_endpoint"},"url":{"type":"string","format":"uri"},"enabledEvents":{"type":"array","items":{"type":"string","minLength":1,"maxLength":128},"minItems":1,"description":"The retained subscription configuration, including event types from earlier contracts."},"status":{"$ref":"#/components/schemas/WebhookEndpointStatus"},"secretCreatedAt":{"type":"string","format":"date-time","description":"When the current signing secret was issued."},"previousSecretExpiresAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"When the previous signing secret stops signing deliveries, or null outside a rotation grace window."},"createdAt":{"type":"string","format":"date-time"},"secret":{"type":"string","pattern":"^whsec_[A-Za-z0-9+/]+={0,2}$","description":"Signing secret in the Standard Webhooks whsec_ form. Returned only when it is issued."}},"title":"WebhookEndpointWithSecret","description":"The endpoint and its new signing secret. Store the secret securely.","additionalProperties":false},"WebhookEventId":{"anyOf":[{"type":"string","pattern":"^event_[0-9a-hjkmnp-tv-z]{24,}$","description":"A Gateway event identifier."},{"type":"string","format":"uuid"}],"title":"WebhookEventId","description":"A Gateway event id or the canonical UUID of a native Invoice event."},"WebhookEventObject":{"type":"string","description":"The wire family a delivered Webhook body announces.","enum":["event"],"title":"WebhookEventObject"},"WebhookEventType":{"anyOf":[{"type":"string","const":"subscription.canceled"},{"type":"string","const":"subscription.status_changed"},{"type":"string","const":"payment.succeeded"},{"type":"string","const":"payment.declined"},{"type":"string","const":"payment.canceled"},{"type":"string","const":"payment.expired"},{"type":"string","const":"payment.operator_required"},{"type":"string","const":"refund.succeeded"},{"type":"string","const":"refund.declined"},{"type":"string","const":"refund.operator_required"},{"type":"string","const":"refund.invoiceAttached"},{"type":"string","const":"invoice.accepted"},{"type":"string","const":"invoice.rejected"},{"type":"string","const":"invoice.operatorRequired"},{"type":"string","const":"invoice.ready"},{"type":"string","const":"invoice.deliverySent"},{"type":"string","const":"invoice.deliveryFailed"}],"title":"WebhookEventType","description":"Domain events that the gateway can deliver to a merchant endpoint."},"WebhookReplay":{"type":"object","required":["id","object","webhookEndpointId","deliveryCount","createdAt"],"properties":{"id":{"type":"string","pattern":"^webhook_replay_[0-9a-hjkmnp-tv-z]{24,}$","description":"Replay identifier, carried by every delivery it queued."},"object":{"type":"string","const":"webhook_replay"},"webhookEndpointId":{"type":"string","pattern":"^webhook_endpoint_[0-9a-hjkmnp-tv-z]{24,}$","description":"The endpoint the deliveries were queued for."},"deliveryCount":{"type":"integer","minimum":0,"maximum":100,"description":"How many deliveries this replay queued."},"createdAt":{"type":"string","format":"date-time"}},"title":"WebhookReplay","description":"A request to send stored events to one endpoint again. Each queued delivery repeats the original event id and is signed with a fresh webhook-timestamp.","additionalProperties":false}},"headers":{"RequestId":{"description":"Identifies this request. Quote it when you contact support.","required":true,"schema":{"type":"string"}},"RetryAfter":{"description":"Seconds to wait before repeating this request or reading the resource again.","schema":{"type":"string","pattern":"^[0-9]+$"}},"IdempotentReplayed":{"description":"`true` when this response replays the stored result of an earlier request with the same Idempotency-Key.","schema":{"type":"string","const":"true"}},"TimbroFileSha256":{"description":"SHA-256 of the returned bytes, in lowercase hex.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"TimbroInvoiceId":{"description":"The Invoice the file belongs to.","required":true,"schema":{"type":"string","format":"uuid"}},"TimbroFileCreatedAt":{"description":"When the file was retained.","required":true,"schema":{"type":"string","format":"date-time"}},"TimbroCertificateSha256":{"description":"SHA-256 of the certificate that signed the XML, in lowercase hex.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"TimbroSecurityCode":{"description":"The DGII security code of the signed e-CF.","required":true,"schema":{"type":"string","minLength":6,"maxLength":6}},"TimbroPdfSha256":{"description":"SHA-256 of the PDF bytes, in lowercase hex. Equals `timbro-file-sha256`.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"TimbroEncf":{"description":"The Invoice's eNCF.","required":true,"schema":{"type":"string","pattern":"^E(31|32|33|34|41|43|44|45|46|47)[0-9]{10}$"}},"TimbroInvoiceType":{"description":"The Invoice's e-CF type.","required":true,"schema":{"$ref":"#/components/schemas/InvoiceType"}},"TimbroPdfLayout":{"description":"The layout the PDF is printed in.","required":true,"schema":{"$ref":"#/components/schemas/InvoicePdfLayout"}},"TimbroPageCount":{"description":"The number of pages in the PDF.","required":true,"schema":{"type":"integer","minimum":1,"maximum":100}},"TimbroSignedSourceSha256":{"description":"SHA-256 of the signed XML the PDF represents, in lowercase hex.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"TimbroArtifactSha256":{"description":"SHA-256 of the original XML bytes, in lowercase hex.","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}}}}