Skip to content

Register a merchant's bank feed

POST/api/v1/credit/bank-feeds

For a merchant whose bank you already hold through Stripe Financial Connections and copy into BigQuery (ab_stripe_fc_{app_id}). Name the merchant (program_id and external_merchant_id while it applies, or credit_line_id) and its app_id. DayZero uses the merchant's DayZero business, creating it the first time, gives your token read access to it, and starts syncing: posted transactions and balances land on that business, where underwriting reads them, every six hours. The dataset must grant DayZero's service account READER; until it does the feed reads error with last_error: not_shared. Registering the same app_id again returns the feed (created: false) and resumes it if it was removed; for another merchant it is 409 CREDIT_832.

Operation ID: register_credit_bank_feed·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

app_idstringrequired

Your organisation id for the merchant, as it appears in the bank data dataset's name (ab_stripe_fc_{app_id}) or your direct-push merchant feed key. Letters, digits and underscores (400 CREDIT_831 otherwise). One organisation feeds one merchant (409 CREDIT_832).

providerstring

Where the merchant's bank data arrives from: stripe_fc_bigquery (pulled from your BigQuery dataset) or direct_push (pushed directly via POST /credit/bank-feeds/{id}/ingest). Defaults to the program's bank_feed_config.provider, else stripe_fc_bigquery.

program_idstring

Your program the merchant is applying under. Required without credit_line_id; with it, must be the line's program if sent.

external_merchant_idstring

Your id for the merchant, as you send it on POST /credit/lines and POST /credit/bank-connections. Required without credit_line_id. The merchant keeps one DayZero business whichever way its bank arrives.

credit_line_idstring

An open line of yours. Its program and merchant are used; a different program_id or external_merchant_id is 400 CREDIT_781.

merchant_legal_namestring

Names the merchant's DayZero business when this call creates it. Ignored when the business exists.

merchant_business_idstring

The merchant's existing DayZero business, when your token can reach it. Leave it out and DayZero uses the business the merchant was linked to before, or creates one (400 CREDIT_788 when it names another).

Responses

201Successful Response

successboolean
messagestring
codestring
dataBankFeedResponse

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.

409Conflict - Resource already exists or is in an incompatible state

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.