{"openapi":"3.1.0","info":{"title":"POST /api/v1/credit/programs","version":"1.0.0","description":"Create a lending program"},"servers":[{"url":"https://api.ondayzero.com","description":"Production"}],"paths":{"/api/v1/credit/programs":{"post":{"tags":["credit"],"summary":"Create a lending program","description":"Stand up a partner lending program. The program carries the parameter envelope, the policy positions, statement branding, and the card-issuing configuration, so onboarding a second partner is a row rather than a build. Operator action: an API token receives `403`. Needs the Credit Ledger add-on (403 `BILLING_003`), which a business that already runs a program keeps.","operationId":"create_program","parameters":[{"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"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditProgramCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessEnvelope_CreditProgramResponse_"}}}},"400":{"description":"Bad Request - Invalid input","content":{"application/json":{"example":{"error":"validation_error","message":"Validation failed: due_date: Input should be a valid date","errors":{"due_date":"Input should be a valid date"},"code":"GEN_002","request_id":"3f0e7c2a-9b4d-4e1a-8c6f-2d5b7a1e9c30"},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"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":"create_program_api_v1_credit_programs_post"}}},"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."},"AllocationOrder":{"type":"string","enum":["interest_fee_principal","principal_fee_interest","fee_interest_principal"],"title":"AllocationOrder","description":"Bucket order a payment fills within one loan (FRD v2 D-10)."},"BorrowingBasePolicy":{"properties":{"include_fees":{"type":"boolean","title":"Include Fees","description":"Count unpaid disbursement fees as eligible receivables beside principal. Accrued interest is never eligible.","default":false},"max_days_past_due":{"type":"integer","maximum":3650.0,"minimum":0.0,"title":"Max Days Past Due","description":"A loan more than this many days past its due date is ineligible.","default":30},"exclude_on_hold":{"type":"boolean","title":"Exclude On Hold","description":"Loans on hold are ineligible.","default":true},"concentration_limit_bps":{"type":"integer","maximum":10000.0,"minimum":1.0,"title":"Concentration Limit Bps","description":"Most of the eligible pool one merchant may make up, in basis points. The excess over it is ineligible; 10000 turns the limit off.","default":1500},"advance_rate_bps":{"type":"integer","maximum":10000.0,"minimum":0.0,"title":"Advance Rate Bps","description":"Share of eligible receivables available to borrow, in basis points.","default":8500}},"additionalProperties":false,"type":"object","title":"BorrowingBasePolicy","description":"Which receivables count toward the borrowing base, and at what rate.\n\nUnset fields take the defaults shown, so ``{}`` is a complete policy."},"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."},"CreditNoticeSettings":{"properties":{"due_soon":{"type":"boolean","title":"Due Soon","description":"A loan is `due_soon_days` from its due date.","default":false},"past_due":{"type":"boolean","title":"Past Due","description":"A loan passed its due date with an amount outstanding.","default":false},"loan_paid":{"type":"boolean","title":"Loan Paid","description":"A loan was repaid in full.","default":false},"statement_issued":{"type":"boolean","title":"Statement Issued","description":"A statement is ready. Not sent when the program emails the statement PDF itself (`email_statements`).","default":false},"collections":{"type":"boolean","title":"Collections","description":"A line reached a collections stage whose action is `notify`.","default":false},"limit_changed":{"type":"boolean","title":"Limit Changed","description":"The line's credit limit was changed.","default":false},"reply_to":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Reply To","description":"Where a merchant's reply goes. Defaults to the branding's `support_email`; with neither, replies go nowhere."},"in_app":{"type":"boolean","title":"In App","description":"Record an in-app notification (`GET /credit/notifications`, event `credit.notification.created`) for every notice the program would send, whichever emails above are on. On unless set false; a program with no `notices` at all has it on.","default":true}},"additionalProperties":false,"type":"object","title":"CreditNoticeSettings","description":"Which borrower notices a program sends, and where replies go."},"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."},"CreditProgramCreateRequest":{"properties":{"slug":{"type":"string","maxLength":64,"title":"Slug","description":"Stable partner key, e.g. \"northwind\"."},"display_name":{"type":"string","maxLength":255,"title":"Display Name","description":"The lender's name as merchants see it: statements, emails, the portal."},"status":{"$ref":"#/components/schemas/ProgramStatusEnum","description":"draft (being set up) and active both take new lines; paused takes none and stops new originations but services the book; retired is closed. On a live business a program becomes active only while its blocking launch checks pass, unless an operator forces it.","default":"draft"},"force_activate":{"anyOf":[{"$ref":"#/components/schemas/ForceActivateRequest"},{"type":"null"}],"description":"Operator console only. With `status: active` on a live business, creates the program active although a blocking launch check fails; the reason, who and when are recorded as `activation_override`. Without it a program created `active` that fails a blocking check is refused (`CREDIT_660`): create it as a draft and activate it once the checklist is green. An API token cannot force (`403`)."},"lending_model":{"$ref":"#/components/schemas/LendingModel","description":"per_transaction: one loan per card transaction with its own term, due date, fee, and daily accrual after the due date (FRD v2 D-01). cycle_draw: one draw per monthly cycle (FRD v1).","default":"per_transaction"},"limit_min_cents":{"type":"integer","minimum":0.0,"title":"Limit Min Cents","default":1000000},"limit_max_cents":{"type":"integer","minimum":0.0,"title":"Limit Max Cents","default":100000000},"allowed_term_days":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Allowed Term Days","description":"Selectable payback terms. Defaults to [30, 45, 60, 90] (D-03)."},"default_rate_bps":{"type":"integer","maximum":10000.0,"minimum":0.0,"title":"Default Rate Bps","description":"Annual rate. 2000 = 20% APR (D-05).","default":2000},"default_disbursement_fee_bps":{"type":"integer","maximum":500.0,"minimum":0.0,"title":"Default Disbursement Fee Bps","description":"Fee assessed once at origination on each transaction, in basis points. 0-500 (0%-5%) per FRD v2 D-04.","default":100},"max_float_days":{"type":"integer","maximum":365.0,"minimum":0.0,"title":"Max Float Days","default":60},"allocation_order":{"$ref":"#/components/schemas/AllocationOrder","description":"Bucket order a payment fills within one loan (D-10).","default":"interest_fee_principal"},"loan_ordering":{"$ref":"#/components/schemas/LoanOrdering","description":"Which open loan a payment reaches first (D-11).","default":"oldest_first"},"interest_accrual_start":{"$ref":"#/components/schemas/InterestAccrualStart","description":"Daily accrual starts at the loan's due date (D-07) or at origination.","default":"due_date"},"minimum_payment_cents":{"type":"integer","minimum":0.0,"title":"Minimum Payment Cents","description":"Minimum per-loan payment; the outstanding amount when smaller (D-09).","default":2500},"due_soon_days":{"type":"integer","maximum":60.0,"minimum":0.0,"title":"Due Soon Days","description":"Days ahead the due-soon event fires (D-24).","default":3},"underwriting_wait_days":{"type":"integer","maximum":30.0,"minimum":0.0,"title":"Underwriting Wait Days","description":"Days the nightly sweep leaves a new underwriting assessment pending while the merchant's bank backfill, categorisation and Shopify sync finish. Past it the sweep completes the assessment with whatever data exists. `POST .../run` never waits.","default":3},"auto_approve_default":{"type":"boolean","title":"Auto Approve Default","description":"What an assessment request that omits `auto_approve` asks for. `true`: DayZero opens the merchant's line itself when the completed assessment passes the gate, as `auto_approve: true` does. `false` (default): the lender records the decision. An explicit `auto_approve` on the request always wins.","default":false},"gl_posting_enabled":{"type":"boolean","title":"Gl Posting Enabled","description":"Post journal entries on the operator's books (App. A.4).","default":false},"gl_posting_review":{"type":"boolean","title":"Gl Posting Review","description":"With `gl_posting_enabled`: hold each journal entry as a draft an operator posts from Credit Ledger > Postings, instead of booking it as the event happens.","default":false},"gl_funding_ledger_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gl Funding Ledger Id","description":"Ledger credited at origination: an active asset or liability ledger of this business (`CREDIT_910` otherwise). Default: Card Issuer Payable. Point it at the Brex feed ledger."},"gl_cash_ledger_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gl Cash Ledger Id","description":"Ledger debited on repayment: an active asset ledger of this business (`CREDIT_910` otherwise). Default: Cash. Point it at the Payliance feed ledger."},"interest_cap_pct_of_principal_bps":{"anyOf":[{"type":"integer","maximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Interest Cap Pct Of Principal Bps","description":"Ceiling on total interest one loan can accrue, as a share of its principal. 2000 = 20%. Null (the default) is uncapped: interest accrues until the loan is repaid (D-07). At the ceiling the loan's interest stops growing, statements bill no further interest, and the loan stays past_due until it is paid. A cap reduces what a long-past-due merchant owes."},"card_management":{"type":"string","enum":["dayzero","partner"],"title":"Card Management","description":"dayzero: DayZero provisions cards and pushes spend limits. partner: the partner provisions in the issuer, registers the card id, and receives credit.line.limit_changed events to push limits itself.","default":"dayzero"},"deferred_fee_recognition":{"type":"boolean","title":"Deferred Fee Recognition","description":"Recognise the disbursement fee over the term on the operator's books.","default":false},"email_statements":{"type":"boolean","title":"Email Statements","description":"Email the statement PDF to the merchant when it issues.","default":false},"marketplace_listed":{"type":"boolean","title":"Marketplace Listed","description":"Offer the program to borrowing businesses on their Capital page (`GET /capital/offers`). Only an `active` program may be listed (`CREDIT_840` otherwise).","default":false},"marketplace_blurb":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Marketplace Blurb","description":"What the marketplace card says about the offer. Plain text."},"notices":{"anyOf":[{"$ref":"#/components/schemas/CreditNoticeSettings"},{"type":"null"}],"description":"Borrower notices to send, each off unless switched on: due_soon, past_due, loan_paid, statement_issued, collections, limit_changed, and reply_to. Branded from `statement_branding`. `in_app` (on unless set false) records an in-app notification for each one."},"compliance":{"anyOf":[{"$ref":"#/components/schemas/CompliancePolicy"},{"type":"null"}],"description":"Compliance policy: disclosures, adverse-action notices and the template versions they use. Null, or `enabled: false`, changes nothing. See the guide's Compliance section."},"bank_settlement_matching":{"type":"boolean","title":"Bank Settlement Matching","description":"Settle pending payments from the bank feed: the debit on the line's linked account, or a wire whose sender is a recorded alias, confirms the payment as at the bank date, and a return reverses it. Every decision is listed under `GET /credit/lines/{id}/payment-matches`.","default":false},"alert_slack_channel":{"anyOf":[{"type":"string","maxLength":128},{"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","description":"Loan-loss allowance buckets, e.g. {\"buckets\":[{\"label\":\"1–30\",\"from_days\":1,\"to_days\":30,\"rate_bps\":200}]}."},"borrowing_base_policy":{"anyOf":[{"$ref":"#/components/schemas/BorrowingBasePolicy"},{"type":"null"}],"description":"Borrowing-base eligibility: include_fees, max_days_past_due, exclude_on_hold, concentration_limit_bps, advance_rate_bps. Null means the defaults."},"interchange_source":{"type":"string","enum":["none","estimate","issuer_report"],"title":"Interchange Source","description":"How interchange is recognised (D-32). estimate: interchange_bps of each cleared settlement, trued up when an issuer report row arrives. issuer_report: only from reported rows. none: not recognised.","default":"none"},"interchange_bps":{"anyOf":[{"type":"integer","maximum":1000.0,"minimum":0.0},{"type":"null"}],"title":"Interchange Bps","description":"Estimated interchange rate, e.g. 175 = 1.75%."},"statement_balance_mode":{"type":"string","enum":["cumulative","cycle_scoped"],"title":"Statement Balance Mode","default":"cumulative"},"allocation_scope":{"type":"string","enum":["per_cycle","across_line"],"title":"Allocation Scope","default":"per_cycle"},"cycle_boundary_basis":{"type":"string","enum":["issuer_clearing_date","merchant_local","utc"],"title":"Cycle Boundary Basis","default":"issuer_clearing_date"},"cycle_close_rule":{"type":"string","enum":["calendar_month_end","anchor_day","operational_trigger"],"title":"Cycle Close Rule","default":"calendar_month_end"},"cycle_anchor_day":{"anyOf":[{"type":"integer","maximum":31.0,"minimum":1.0},{"type":"null"}],"title":"Cycle Anchor Day"},"excess_credit_disposition":{"type":"string","enum":["carry_forward","refund_merchant"],"title":"Excess Credit Disposition","default":"carry_forward"},"collections_policy":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Collections Policy","description":"Delinquency ladder (D-31): {\"stages\": [{\"days_past_due\": 30, \"action\": \"suspend_cards\", \"label\": \"Suspended\"}]}. Actions: suspend_cards, suspend_line, notify."},"monitoring_policy":{"anyOf":[{"$ref":"#/components/schemas/MonitoringPolicy"},{"type":"null"}],"description":"Observation-only monitoring; null or enabled=false is off."},"limit_review_policy":{"anyOf":[{"$ref":"#/components/schemas/LimitReviewPolicy"},{"type":"null"}],"description":"Dynamic limit reviews: on a weekly or monthly cadence each line's limit is re-derived as formula (basis × pct_bps), clamped to the floor/cap and program envelope, held to the step limits, then adjusted by the risk triggers. Null means limits move only by hand."},"limit_change_policy":{"type":"string","enum":["direct","approval_required","console_only"],"title":"Limit Change Policy","description":"Who may move a line's credit limit. direct: PATCH /credit/lines/{id} with credit_limit_cents applies it. approval_required: every change is a limit-change request a different console operator approves. console_only: an API token may only request a change; a console operator changes the limit.","default":"direct"},"late_terms":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Late Terms","description":"Late fee / late interest rule body. Leave null while undecided — the late path raises rather than guessing a rate (§2.3)."},"early_payoff_terms":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Early Payoff Terms","description":"interest_rebate (pro_rata | fully_earned) and fee_rebate (none | pro_rata). Null while undecided (§2.5)."},"underwriting_decision_policy":{"anyOf":[{"$ref":"#/components/schemas/UnderwritingDecisionPolicy"},{"type":"null"}],"description":"Optional lender-owned evidence expiry and decline-reason requirements."},"underwriting_criteria":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Underwriting Criteria","description":"Partner-owned rule set: key, label, threshold, comparator, source. Null while undecided (§2.7)."},"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","description":"Read-only reflection of the Credit Agreement's universal covenants for the partner UI (§10.1): e.g. cash_covenant_bps, negative, affirmative. Not enforced by the ledger."},"event_delivery_mode":{"$ref":"#/components/schemas/EventDeliveryMode","description":"polling writes the event feed only; webhook also pushes each event to the business's subscribed endpoints; both does both. Polling stays the source of truth.","default":"polling"},"bank_link_redirect_uris":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Bank Link Redirect Uris","description":"The https URLs a merchant's hosted bank Link may return to when it finishes: the `completion_redirect_uri` values `POST /credit/bank-connections` accepts, matched exactly. No query or fragment; at most 10. Null allows none."},"event_delivery_locked":{"type":"boolean","title":"Event Delivery Locked","description":"Hold `event_delivery_mode` where the operator set it: the partner's `PUT /credit/programs/{id}/event-delivery` is refused (`CREDIT_818`).","default":false},"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."},"issuing_enabled":{"type":"boolean","title":"Issuing Enabled","description":"Whether DayZero issues and manages cards for this program's lines through the issuing provider (DayZero-managed cards).","default":false},"issuing_provider":{"type":"string","enum":["ramp","brex","stripe_issuing","lithic","external","mock"],"title":"Issuing Provider","description":"Card issuer adapter: ramp, brex (Plaid-connected Brex cards/lines), stripe_issuing, lithic, external (Bring-Your-Own-Issuer via events/webhooks), or mock (in-memory sandbox issuer).","default":"ramp"},"custom_terms_enabled":{"type":"boolean","title":"Custom Terms Enabled","description":"When true, `allowed_term_days` may contain any 1 to 365 day payback terms and `limit_min_cents` / `limit_max_cents` may sit anywhere between $100 and $50,000,000 outside the default FRD envelope.","default":false},"issuer_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Issuer Config","description":"Provider-agnostic card issuer configuration: `spend_program_id`, `cardholder_mode` (`shared_operator_user` or `per_merchant`), `default_cardholder_id`, and `webhook_url`."},"bank_feed_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Bank Feed Config","description":"Per-program merchant bank feed configuration: `provider` (`stripe_fc_bigquery` or `direct_push`), `data_project` (GCP project id) and `dataset_template` (e.g. `ab_stripe_fc_{app_id}`)."},"portal_frame_ancestors":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Portal Frame Ancestors","description":"HTTPS origins permitted to embed the hosted borrower portal (`/p/credit/{token}?embed=1`) inside an iframe, e.g. `[\"https://app.partner.com\"]`. Null or empty forbids framing."},"payment_collection_config":{"anyOf":[{"$ref":"#/components/schemas/PaymentCollectionConfigInput"},{"type":"null"}],"description":"Embeddable borrower payment iframe settings (`enabled`, `rails`, card convenience fees, partial payments, and Payliance Card credentials)."},"ramp_spend_program_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ramp Spend Program Id","description":"Ramp spend program the issued cards' funds are created under. On a Ramp program it is looked up on the connected Ramp account when set or changed (`CREDIT_911` when Ramp does not have it; not checked while Ramp is not connected)."},"issuer_timezone":{"type":"string","title":"Issuer Timezone","description":"IANA timezone whose calendar day is the issuer's posting date (D-12). Ramp's `settlement_date` is a timestamp; the settlement's `settled_on`, and so its statement period, is its date in this zone. A date with no time is taken as given. Default America/New_York.","default":"America/New_York"},"ramp_cardholder_user_id":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Ramp Cardholder User Id","description":"The issuing identity: the one user on your Ramp account every card is issued to. The merchant is never a Ramp user. Verified as a user on the connected Ramp account when set (`CREDIT_701` otherwise)."},"allowed_mcc_codes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Mcc Codes","description":"Merchant category codes a card may spend at; mapped to Ramp category codes on the issuer. Empty means no restriction."},"blocked_mcc_codes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Blocked Mcc Codes","description":"Merchant category codes a card may never spend at (sent to Ramp as MCCs)."}},"additionalProperties":false,"type":"object","required":["slug","display_name"],"title":"CreditProgramCreateRequest","description":"Stand up a partner lending program.\n\nEverything optional falls back to the FRD's defaults, so a program\nthat matches them is a slug and a display name."},"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."},"ForceActivateRequest":{"properties":{"reason":{"type":"string","maxLength":1000,"title":"Reason","description":"Why the program goes live with checks failing. Recorded on the program (`activation_override`) and in the audit log."}},"additionalProperties":false,"type":"object","required":["reason"],"title":"ForceActivateRequest","description":"Make the program active although blocking launch checks fail."},"InterestAccrualStart":{"type":"string","enum":["due_date","origination"],"title":"InterestAccrualStart","description":"When daily interest begins on a per-transaction loan (FRD v2 D-07)."},"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."},"LoanOrdering":{"type":"string","enum":["oldest_first","earliest_due_first","newest_first"],"title":"LoanOrdering","description":"Which open loan a payment reaches first (FRD v2 D-11)."},"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."},"PaymentCollectionConfigInput":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"Allow borrowers to submit repayments through the embeddable payment page (`/p/credit/{token}/pay`). Sandbox businesses always use the built-in sandbox simulator regardless of live rails.","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`, and/or `payliance_card`."},"card_fee_bps":{"type":"integer","maximum":500.0,"minimum":0.0,"title":"Card Fee Bps","description":"Optional percentage convenience fee added to card payments, in basis points (0 to 500, e.g. 290 = 2.90%). Never applied to ACH.","default":0},"card_fee_flat_cents":{"type":"integer","maximum":5000.0,"minimum":0.0,"title":"Card Fee Flat Cents","description":"Optional flat convenience fee added to card payments, in cents (0 to 5000, e.g. 30 = $0.30). Never applied to ACH.","default":0},"card_fee_label":{"type":"string","maxLength":80,"title":"Card Fee Label","description":"Line-item label shown to the borrower for the card convenience fee.","default":"Card processing fee"},"allow_partial_payments":{"type":"boolean","title":"Allow Partial Payments","description":"Whether borrowers may enter a custom repayment amount below the full balance.","default":true},"payliance_card_merchant_id":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Payliance Card Merchant Id","description":"Payliance Card merchant ID when `payliance_card` is enabled."},"payliance_card_username":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Payliance Card Username","description":"Payliance Card API username when `payliance_card` is enabled."},"payliance_card_access_key":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Payliance Card Access Key","description":"Payliance Card API access key (write-only; omitted from responses). Leave null when updating other fields to keep the stored key."}},"additionalProperties":false,"type":"object","title":"PaymentCollectionConfigInput","description":"Online payment iframe settings on a lending program."},"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_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":[{"$ref":"#/components/schemas/CreditProgramResponse"},{"type":"null"}]}},"additionalProperties":true,"type":"object","title":"SuccessEnvelope[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":[]}]}