{"openapi":"3.1.0","info":{"title":"GET /api/v1/credit/programs","version":"1.0.0","description":"List lending programs"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/credit/programs":{"get":{"tags":["credit"],"summary":"List lending programs","description":"Every program this business operates, with its policy status.","operationId":"list_programs","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"x-business-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Business-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope_list_CreditProgramResponse__"}}}},"401":{"description":"Unauthorized - Missing or expired token, an MCP OAuth token used against the REST API, or no access to this business","content":{"application/json":{"example":{"error":"unauthorized","message":"Authentication required","code":"AUTH_001","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"description":"Forbidden - Insufficient permissions","content":{"application/json":{"example":{"error":"forbidden","message":"You don't have permission to access this resource","code":"AUTH_002","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"validation_error","message":"Validation failed: amount: Input should be a valid integer","errors":{"amount":"Input should be a valid integer"},"code":"GEN_002","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"}}}}},"x-fastapi-operation-id":"list_programs_api_v1_credit_programs_get"}}},"components":{"schemas":{"AdverseActionPolicy":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"Record adverse actions and queue their notices.","default":false},"deliver_within_days":{"type":"integer","maximum":120.0,"minimum":1.0,"title":"Deliver Within Days","description":"Days after the action the notice is due (`due_on`).","default":30},"creditor_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Creditor Name","description":"The creditor named on the notice. Required when enabled."},"creditor_address":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Creditor Address","description":"The creditor's address."},"creditor_phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Creditor Phone","description":"The creditor's phone number."},"include_delinquency_actions":{"type":"boolean","title":"Include Delinquency Actions","description":"Also record suspensions the collections ladder makes. Off: only actions a person takes, and decisions, are recorded.","default":false}},"additionalProperties":false,"type":"object","title":"AdverseActionPolicy","description":"Whether adverse actions are recorded, and who the notice comes from."},"CompliancePolicy":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"Master switch. Off (the default): nothing here applies and lines behave exactly as without a policy.","default":false},"disclosure":{"$ref":"#/components/schemas/DisclosurePolicy","description":"Disclosures."},"adverse_action":{"$ref":"#/components/schemas/AdverseActionPolicy","description":"Adverse-action notices."},"templates":{"$ref":"#/components/schemas/ComplianceTemplatePins","description":"Template versions, when pinned."}},"additionalProperties":false,"type":"object","title":"CompliancePolicy","description":"A program's compliance policy. Unknown keys are refused."},"ComplianceTemplatePins":{"properties":{"disclosure_version":{"anyOf":[{"type":"string","pattern":"^v[0-9]{1,3}$"},{"type":"null"}],"title":"Disclosure Version","description":"e.g. `v1`. Null: the newest approved disclosure version."},"adverse_action_version":{"anyOf":[{"type":"string","pattern":"^v[0-9]{1,3}$"},{"type":"null"}],"title":"Adverse Action Version","description":"e.g. `v1`. Null: the newest approved adverse-action version."}},"additionalProperties":false,"type":"object","title":"ComplianceTemplatePins","description":"Pin a template version; null uses the newest approved version."},"CreditNoticeSettingsResponse":{"properties":{"due_soon":{"type":"boolean","title":"Due Soon","default":false},"past_due":{"type":"boolean","title":"Past Due","default":false},"loan_paid":{"type":"boolean","title":"Loan Paid","default":false},"statement_issued":{"type":"boolean","title":"Statement Issued","default":false},"collections":{"type":"boolean","title":"Collections","default":false},"limit_changed":{"type":"boolean","title":"Limit Changed","default":false},"reply_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reply To"},"in_app":{"type":"boolean","title":"In App","description":"Whether in-app notifications are recorded for this program.","default":true}},"type":"object","title":"CreditNoticeSettingsResponse","description":"A program's notice settings as stored. Every email switch reads false\nwhen unset; ``in_app`` reads true."},"CreditProgramResponse":{"properties":{"underwriting_decision_policy":{"anyOf":[{"$ref":"#/components/schemas/UnderwritingDecisionPolicy"},{"type":"null"}],"description":"Optional lender-owned evidence expiry and decline-reason requirements."},"id":{"type":"string","title":"Id"},"slug":{"type":"string","title":"Slug"},"display_name":{"type":"string","title":"Display Name"},"status":{"$ref":"#/components/schemas/ProgramStatusEnum"},"lending_model":{"$ref":"#/components/schemas/LendingModel","default":"per_transaction"},"limit_min_cents":{"type":"integer","title":"Limit Min Cents"},"limit_max_cents":{"type":"integer","title":"Limit Max Cents"},"allowed_term_days":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Allowed Term Days"},"default_rate_bps":{"type":"integer","title":"Default Rate Bps"},"default_disbursement_fee_bps":{"type":"integer","title":"Default Disbursement Fee Bps"},"max_float_days":{"type":"integer","title":"Max Float Days"},"allocation_order":{"type":"string","title":"Allocation Order","default":"interest_fee_principal"},"loan_ordering":{"type":"string","title":"Loan Ordering","default":"oldest_first"},"interest_accrual_start":{"type":"string","title":"Interest Accrual Start","default":"due_date"},"minimum_payment_cents":{"type":"integer","title":"Minimum Payment Cents","default":2500},"due_soon_days":{"type":"integer","title":"Due Soon Days","default":3},"underwriting_wait_days":{"type":"integer","title":"Underwriting Wait Days","description":"Days the nightly sweep leaves a new underwriting assessment pending while the merchant's data lands; completed with what exists after.","default":3},"auto_approve_default":{"type":"boolean","title":"Auto Approve Default","description":"What an assessment request that omits `auto_approve` asks for: `true` opens the line automatically when the gate passes; `false` leaves the decision to the lender.","default":false},"gl_posting_enabled":{"type":"boolean","title":"Gl Posting Enabled","default":false},"gl_posting_review":{"type":"boolean","title":"Gl Posting Review","description":"Each journal entry is held as a draft an operator posts.","default":false},"gl_funding_ledger_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gl Funding Ledger Id","description":"Ledger credited at origination; null is the default (Card Issuer Payable)."},"gl_cash_ledger_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gl Cash Ledger Id","description":"Ledger debited on repayment; null is the default (Cash)."},"interest_cap_pct_of_principal_bps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interest Cap Pct Of Principal Bps"},"card_management":{"type":"string","title":"Card Management","default":"dayzero"},"deferred_fee_recognition":{"type":"boolean","title":"Deferred Fee Recognition","default":false},"email_statements":{"type":"boolean","title":"Email Statements","default":false},"marketplace_listed":{"type":"boolean","title":"Marketplace Listed","description":"Whether the program is offered on the capital marketplace.","default":false},"marketplace_blurb":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Marketplace Blurb","description":"What the marketplace card says about the offer, as stored."},"notices":{"anyOf":[{"$ref":"#/components/schemas/CreditNoticeSettingsResponse"},{"type":"null"}]},"compliance":{"anyOf":[{"$ref":"#/components/schemas/CompliancePolicy"},{"type":"null"}],"description":"The compliance policy, as stored."},"bank_settlement_matching":{"type":"boolean","title":"Bank Settlement Matching","default":false},"alert_slack_channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alert Slack Channel"},"alert_emails":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Alert Emails"},"allowance_policy":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Allowance Policy"},"borrowing_base_policy":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Borrowing Base Policy"},"interchange_source":{"type":"string","title":"Interchange Source","default":"none"},"interchange_bps":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interchange Bps"},"legal_lending_entity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Legal Lending Entity"},"statement_branding":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Statement Branding"},"covenants":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Covenants"},"collections_policy":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Collections Policy"},"limit_review_policy":{"anyOf":[{"$ref":"#/components/schemas/LimitReviewPolicy"},{"type":"null"}]},"monitoring_policy":{"anyOf":[{"$ref":"#/components/schemas/MonitoringPolicy"},{"type":"null"}],"description":"Observation-only monitoring configuration; null means disabled."},"limit_change_policy":{"type":"string","title":"Limit Change Policy","description":"Who may move a line's limit: direct (PATCH applies it), approval_required (a limit-change request a different operator approves) or console_only (API tokens may only request). A limit review applies directly only under direct.","default":"direct"},"late_terms":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Late Terms"},"early_payoff_terms":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Early Payoff Terms"},"underwriting_criteria":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Underwriting Criteria"},"event_delivery_mode":{"$ref":"#/components/schemas/EventDeliveryMode"},"bank_link_redirect_uris":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Bank Link Redirect Uris","description":"The URLs a merchant's hosted bank Link may return to (`completion_redirect_uri` on `POST /credit/bank-connections`)."},"sandbox_email_recipients":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Sandbox Email Recipients","description":"Sandbox only. Merchant addresses an email from this sandbox may be sent to, besides DayZero's own allow-list: an exact address or `@domain` for every address there; at most 25. A sent email's subject starts `[Sandbox]`. Ignored on a live business."},"sandbox_email_redirect_to":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sandbox Email Redirect To","description":"Sandbox only. One address every merchant email from this sandbox goes to instead of the line's `merchant_email`, whatever the recipient list says. The subject starts `[Sandbox]` and names the merchant address it was meant for. Null sends to the merchant when allowed. Ignored on a live business."},"event_delivery_locked":{"type":"boolean","title":"Event Delivery Locked","description":"An operator holds `event_delivery_mode`: the partner cannot change it with `PUT /credit/programs/{id}/event-delivery`.","default":false},"issuing_enabled":{"type":"boolean","title":"Issuing Enabled"},"issuing_provider":{"type":"string","title":"Issuing Provider"},"custom_terms_enabled":{"type":"boolean","title":"Custom Terms Enabled","description":"Whether the program allows custom payback terms (1-365 days) and limit envelopes ($100-$50,000,000).","default":false},"issuer_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Issuer Config","description":"Provider-agnostic card issuer settings for this program."},"bank_feed_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Bank Feed Config","description":"Per-program bank feed configuration (`provider`, `data_project`, `dataset_template`)."},"portal_frame_ancestors":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Portal Frame Ancestors","description":"HTTPS origins permitted to embed the borrower portal (`/p/credit/{token}?embed=1`)."},"payment_collection_config":{"anyOf":[{"$ref":"#/components/schemas/PaymentCollectionConfigResponse"},{"type":"null"}],"description":"Embeddable borrower payment iframe settings (credentials omitted)."},"ramp_spend_program_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ramp Spend Program Id"},"issuer_timezone":{"type":"string","title":"Issuer Timezone","description":"IANA timezone whose calendar day is the issuer's posting date (D-12): a Ramp `settlement_date` timestamp is read in it.","default":"America/New_York"},"ramp_cardholder_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ramp Cardholder User Id","description":"The issuing identity every card is issued to (D-53)."},"allowed_mcc_codes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Mcc Codes"},"blocked_mcc_codes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Blocked Mcc Codes"},"mcc_allowlist_decided_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Mcc Allowlist Decided At","description":"When the allow list was last set, through `POST /credit/programs/{id}/mcc-allowlist/apply` or directly on the program. Set with an empty list too: an empty list with a date was cleared on purpose; with none it was never decided."},"mcc_allowlist_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcc Allowlist Source","description":"Where that list came from: upload, settlements, preset, or manual (typed by hand, or set directly on the program)."},"activation_override":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Activation Override","description":"Set when an operator forced the program active past failing blocking launch checks: forced_by, forced_by_user_id, forced_at, reason and failing_checks."},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"policy":{"anyOf":[{"$ref":"#/components/schemas/PolicyDecisionStatus"},{"type":"null"}]}},"type":"object","required":["id","slug","display_name","status","limit_min_cents","limit_max_cents","default_rate_bps","default_disbursement_fee_bps","max_float_days","event_delivery_mode","issuing_enabled","issuing_provider"],"title":"CreditProgramResponse"},"CriteriaCoverage":{"properties":{"measured":{"items":{"type":"string"},"type":"array","title":"Measured"},"unmeasured":{"items":{"type":"string"},"type":"array","title":"Unmeasured","description":"Keys with no measurer; reported unmeasured on every assessment."}},"type":"object","title":"CriteriaCoverage","description":"Which scorecard keys DayZero can measure today."},"DisclosurePolicy":{"properties":{"mode":{"type":"string","enum":["off","generate","require_acknowledgement"],"title":"Mode","description":"`off`: none. `generate`: generated and recorded on each trigger. `require_acknowledgement`: as generate, and a new line stays `pending` (cards carry no headroom) and a limit increase is held until the merchant acknowledges it on the borrower portal.","default":"off"},"states":{"anyOf":[{"type":"string","const":"auto"},{"items":{"type":"string"},"type":"array"}],"title":"States","description":"`auto`: every line (a state template where one is approved for the line's state, else the generic one). A list of state codes: only lines in those states; others are recorded as not required.","default":"auto"}},"additionalProperties":false,"type":"object","title":"DisclosurePolicy","description":"When a cost-of-credit disclosure is generated, and whether it must be\nacknowledged before the line opens or a limit increase applies."},"EventDeliveryMode":{"type":"string","enum":["webhook","polling","both"],"title":"EventDeliveryMode","description":"How a partner learns that something happened.\n\nThe FRD lists this twice as an open joint decision (§13.3 items 2 and\n6). Making it per-program means the decision never blocks the build:\na partner that wants webhooks registers an endpoint, one that wants to\npoll simply does not."},"LendingModel":{"type":"string","enum":["per_transaction","cycle_draw"],"title":"LendingModel","description":"What the unit of borrowing is.\n\n* ``per_transaction`` — every posted card transaction originates its\n  own loan with its own term, due date, fee, and daily accrual after\n  the due date. The monthly statement is a presentation wrapper and\n  the moment accrued interest is applied. This is the Tie model\n  (FRD v2 §10.5, D-01).\n* ``cycle_draw`` — settlements accumulate into a monthly cycle that\n  resolves into one draw at close, carrying one term, one due date,\n  and one interest figure. The credit-card model FRD v1 specified.\n\nA program picks one. Lines inherit it, and every engine branch keys\non it, so a second partner on the other model is a row, not a build."},"LimitReviewFormula":{"properties":{"basis":{"type":"string","enum":["trailing_3m_revenue","shopify_trailing_90d_sales","trailing_12m_ad_spend"],"title":"Basis","description":"The measure the limit is sized on: trailing_3m_revenue (revenue ledgers, 90 days), shopify_trailing_90d_sales (Shopify gross sales, 90 days) or trailing_12m_ad_spend (Advertising & Marketing ledger or Meta Ads spend, whichever is larger, 365 days)."},"pct_bps":{"type":"integer","maximum":100000.0,"minimum":1.0,"title":"Pct Bps","description":"Share of the basis the limit is set at. 2500 = 25%."}},"additionalProperties":false,"type":"object","required":["basis","pct_bps"],"title":"LimitReviewFormula","description":"The limit the merchant's activity supports: basis × pct_bps."},"LimitReviewPolicy":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"Reviews run only when true.","default":true},"cadence":{"type":"string","enum":["weekly","monthly"],"title":"Cadence","description":"weekly (once per ISO week, Monday to Sunday) or monthly (once per calendar month). The nightly sweep reviews a line once per window.","default":"monthly"},"formula":{"$ref":"#/components/schemas/LimitReviewFormula","description":"How the recommended limit is sized: a basis measure times pct_bps."},"floor_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Floor Cents","description":"Lowest limit a review recommends. Inside the program envelope."},"cap_cents":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Cap Cents","description":"Highest limit a review recommends. Inside the program envelope."},"max_step_up_bps":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Max Step Up Bps","description":"Largest increase in one review, in bps of the current limit."},"max_step_down_bps":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":0.0},{"type":"null"}],"title":"Max Step Down Bps","description":"Largest formula-led decrease in one review, in bps of the current limit. Triggers are not held to it."},"min_change_cents":{"type":"integer","minimum":0.0,"title":"Min Change Cents","description":"A recommendation closer than this to the current limit is no change.","default":0},"triggers":{"items":{"$ref":"#/components/schemas/LimitReviewTrigger"},"type":"array","maxItems":20,"title":"Triggers","description":"Measures that, when they cross a threshold, step the limit down or freeze it regardless of the formula."},"apply":{"type":"string","enum":["proposal","direct"],"title":"Apply","description":"proposal: each change waits for an operator. direct: applied at once — allowed only when the program's limit_change_policy is direct.","default":"proposal"}},"additionalProperties":false,"type":"object","required":["formula"],"title":"LimitReviewPolicy","description":"How a program's lines have their limits re-derived.\n\nThe order is fixed: formula, then the floor/cap and program envelope,\nthen the step limits relative to the current limit, then the triggers."},"LimitReviewTrigger":{"properties":{"key":{"type":"string","maxLength":64,"minLength":1,"title":"Key","description":"A measure from `GET /credit/underwriting/measurers`."},"op":{"type":"string","enum":["gt","gte","lt","lte","eq","ne"],"title":"Op","description":"gt, gte, lt, lte, eq or ne."},"value":{"type":"number","title":"Value","description":"Compared with the measured figure, in the measure's own unit (0.08 = 8% for a ratio)."},"action":{"type":"string","enum":["step_down_bps","freeze"],"title":"Action","description":"step_down_bps: the limit may be at most the current limit less `amount` bps of it. freeze: no increase, and any open increase proposal on the line is withdrawn. Neither suspends the line."},"amount":{"anyOf":[{"type":"integer","maximum":10000.0,"minimum":1.0},{"type":"null"}],"title":"Amount","description":"For step_down_bps: the cut, in bps of the current limit."}},"additionalProperties":false,"type":"object","required":["key","op","value","action"],"title":"LimitReviewTrigger","description":"A risk condition that overrides the formula when it holds."},"MonitoringPolicy":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"Enable observation-only monitoring.","default":false},"cadence":{"type":"string","enum":["weekly","monthly"],"title":"Cadence","description":"One observation per calendar cadence window.","default":"monthly"},"population":{"type":"string","enum":["active","active_and_suspended"],"title":"Population","description":"Line statuses to observe; closed and pending lines are excluded.","default":"active"}},"additionalProperties":false,"type":"object","title":"MonitoringPolicy","description":"Independent opt-in; never authorizes a lending action."},"PaymentCollectionConfigResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"Whether live embeddable borrower payments are enabled on this program.","default":false},"rails":{"items":{"type":"string","enum":["stripe_ach","stripe_card","payliance_card"]},"type":"array","title":"Rails","description":"Enabled live payment rails (`stripe_ach`, `stripe_card`, `payliance_card`)."},"card_fee_bps":{"type":"integer","title":"Card Fee Bps","description":"Optional percentage convenience fee on card payments in basis points.","default":0},"card_fee_flat_cents":{"type":"integer","title":"Card Fee Flat Cents","description":"Optional flat convenience fee on card payments in cents.","default":0},"card_fee_label":{"type":"string","title":"Card Fee Label","description":"Label displayed for the card convenience fee.","default":"Card processing fee"},"allow_partial_payments":{"type":"boolean","title":"Allow Partial Payments","description":"Whether borrowers may submit partial payments below the full balance.","default":true},"payliance_card_merchant_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payliance Card Merchant Id","description":"Configured Payliance Card merchant ID, if set."},"payliance_card_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payliance Card Username","description":"Configured Payliance Card username, if set."},"payliance_card_configured":{"type":"boolean","title":"Payliance Card Configured","description":"True when a Payliance Card access key is stored on this program.","default":false}},"type":"object","title":"PaymentCollectionConfigResponse","description":"Public/console view of a program's online payment iframe settings (secrets omitted)."},"PolicyDecisionStatus":{"properties":{"lending_model":{"type":"string","title":"Lending Model","default":"per_transaction"},"allocation_order":{"type":"string","title":"Allocation Order","default":"interest_fee_principal"},"loan_ordering":{"type":"string","title":"Loan Ordering","default":"oldest_first"},"interest_accrual_start":{"type":"string","title":"Interest Accrual Start","default":"due_date"},"minimum_payment_cents":{"type":"integer","title":"Minimum Payment Cents","default":2500},"statement_balance_mode":{"type":"string","title":"Statement Balance Mode"},"allocation_scope":{"type":"string","title":"Allocation Scope"},"cycle_boundary_basis":{"type":"string","title":"Cycle Boundary Basis"},"cycle_close_rule":{"type":"string","title":"Cycle Close Rule"},"excess_credit_disposition":{"type":"string","title":"Excess Credit Disposition"},"late_terms_decided":{"type":"boolean","title":"Late Terms Decided"},"early_payoff_decided":{"type":"boolean","title":"Early Payoff Decided"},"underwriting_criteria_decided":{"type":"boolean","title":"Underwriting Criteria Decided"},"undecided":{"items":{"type":"string"},"type":"array","title":"Undecided","description":"Rules with no answer yet. Paths needing them raise."},"criteria_coverage":{"$ref":"#/components/schemas/CriteriaCoverage"}},"type":"object","required":["statement_balance_mode","allocation_scope","cycle_boundary_basis","cycle_close_rule","excess_credit_disposition","late_terms_decided","early_payoff_decided","underwriting_criteria_decided"],"title":"PolicyDecisionStatus","description":"Which rules this program is running on, and which are still open.\n\nSurfaced deliberately: a partner integrating against the API should be\nable to see that, say, the late-fee path will raise, rather than\ndiscovering it when a cycle first goes past due."},"ProgramStatusEnum":{"type":"string","enum":["draft","active","paused","retired"],"title":"ProgramStatusEnum","description":"Whether a program may open new lines."},"SuccessEnvelope_list_CreditProgramResponse__":{"properties":{"success":{"type":"boolean","title":"Success","default":true},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"data":{"anyOf":[{"items":{"$ref":"#/components/schemas/CreditProgramResponse"},"type":"array"},{"type":"null"}],"title":"Data"}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[list[CreditProgramResponse]]"},"UnderwritingDecisionPolicy":{"properties":{"max_evidence_age_days":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Evidence Age Days","description":"Maximum age since assessment request in days; null disables expiry. Expired evidence requires a new assessment."},"decline_reason_catalog":{"additionalProperties":{"type":"string"},"type":"object","title":"Decline Reason Catalog","description":"Lender-approved reason codes mapped to merchant-facing sentences."},"require_decline_reasons":{"type":"boolean","title":"Require Decline Reasons","description":"Require at least one catalog reason for a final decline.","default":false}},"additionalProperties":false,"type":"object","title":"UnderwritingDecisionPolicy","description":"Operator-owned decision requirements; absent policy preserves existing gates."},"ErrorResponse":{"title":"ErrorResponse","type":"object","description":"Envelope returned by every non-2xx response. Branch on `code` (stable) rather than `message` (human-readable, may change).","required":["error","message","code"],"properties":{"error":{"type":"string","description":"Error category: `validation_error`, `unauthorized`, `forbidden`, `not_found`, `conflict`, `rate_limited`, `server_error`, or `service_unavailable`."},"message":{"type":"string","description":"Human-readable explanation, safe to show to end users."},"code":{"type":"string","description":"Stable machine-readable code in `CATEGORY_NNN` form (e.g. `NOT_FOUND_006`, `AUTH_010`, `GEN_002`)."},"request_id":{"type":"string","description":"Correlation id for support requests. Echoes the `x-request-id` request header when one was supplied."},"errors":{"type":"object","additionalProperties":{"type":"string"},"description":"Field-level validation messages keyed by field name. Present on 400/422 validation failures only."}}}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Token","description":"API token authentication. Format: `Bearer dz_...`"}}},"security":[{"BearerAuth":[]}]}