Skip to content

Open a credit line

POST/api/v1/credit/lines

Open a line on approval. Terms not supplied inherit the program's defaults. Idempotent on external_line_id: a repeat returns the line already open under it, as it stands, and writes nothing. Send card to issue the merchant's card with the line on a program whose cards DayZero issues: the response carries card, or card_issue_error when the issuer refused it (the line is open either way).

Operation ID: create_credit_line·View as markdown·OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Request body

program_idstring

Program to open under. Falls back to the default.

external_line_idstring

Your id for the line, unique within your business. An open that repeats one already in use returns that line as it stands and writes nothing, so a timed-out open can be sent again.

external_merchant_idstring
merchant_business_idstring

The borrower's own DayZero business, when it keeps its books here. An underwriting assessment for the line measures this business. Must be a business the caller can access.

credit_limit_centsintegerrequired

Approved card spend limit.

term_daysinteger

30, 45, 60, or 90 (D-03). Applies to each transaction from its own posting date. Defaults to the program's first option.

rate_bpsinteger
disbursement_fee_bpsinteger

0-500 bps (0%-5%). Inherits the program default when omitted.

cycle_anchor_dayinteger
start_datestring · date

The signing date: the effective date named in the merchant's Credit Agreement. Not the approval date, the countersign date, or the first draw (D-18). Shown on the dashboard metadata row.

linked_account_namestring

Display name of the merchant's repayment account.

linked_account_maskstring

Last digits of the repayment account.

plaid_account_idstring

The merchant's Plaid account the repayments leave from; bank-matched settlement watches it and AutoPay needs it.

autopay_enabledboolean

Emit credit.autopay.due once for each loan when it falls due, or on the next sweep for a loan already past due (the partner debits).

merchant_emailstring

Where statements and borrower notices go. None sends nothing.

merchant_legal_namestring

The merchant's legal entity name, as printed on disclosures. Required at open when the program's compliance.enabled is true.

merchant_statestring

Two-letter US state, DC or territory code of the merchant. Selects the disclosure template. Required at open when the program's compliance.enabled is true.

merchant_addressMerchantAddress

The merchant's registered address. Required at open when the program's compliance.enabled is true.

cardLineOpenCardRequest

Issue a card with the line. Only under a program with card_management: dayzero and issuing_enabled: true (else 400 CREDIT_551, and no line is opened). Once the line is open DayZero issues the card as POST /credit/cards would, with the program's MCC allow list; the response carries card, or card_issue_error when the issuer refused it, in which case the line stays open and the card can be issued later with POST /credit/cards.

Responses

201Successful Response

successboolean
messagestring
codestring
dataCreditLineResponse

400Bad Request - Invalid input

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

401Unauthorized - Missing or expired token, an MCP OAuth token used against the REST API, or no access to this business

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

403Forbidden - Insufficient permissions

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

404Not Found - Resource does not exist

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.

422Validation Error

errorstringrequired

Error category: validation_error, unauthorized, forbidden, not_found, conflict, rate_limited, server_error, or service_unavailable.

messagestringrequired

Human-readable explanation, safe to show to end users.

codestringrequired

Stable machine-readable code in CATEGORY_NNN form (e.g. NOT_FOUND_006, AUTH_010, GEN_002).

request_idstring

Correlation id for support requests. Echoes the x-request-id request header when one was supplied.

errorsobject

Field-level validation messages keyed by field name. Present on 400/422 validation failures only.