Skip to content

Clear, void or dispute a card transaction

POST/api/v1/credit/sandbox/card-transactions

Sandbox only. Reports a transaction on a mock-issued card the way Ramp's webhook would, and sends it through the same ingest: a cleared purchase becomes a loan with no call from you, a negative amount is a refund, a voided one reverses the loan (or holds it when money was paid on it), a disputed one opens a hold. Returns what happened. A card on a live issuer program is CREDIT_710; a void or dispute of a transaction the book does not hold is CREDIT_711.

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

card_idstringrequired

The card's id from POST /credit/cards. The card must be on a program whose issuer is the mock issuer (CREDIT_710 otherwise).

kindstring

cleared: the issuer reports a purchase (or, with a negative amount, a refund) as settled. voided: it now reports a cleared transaction voided. disputed: it lists a dispute on one.

One of: cleared, voided, disputed

amount_centsinteger

cleared only, required. Signed cents: positive is a purchase, negative a refund. Ignored for the other kinds, which read the amount from the transaction already recorded.

merchant_namestring

cleared only. The merchant.

merchant_category_codestring

cleared only. Four-digit merchant category code.

settled_onstring · date

cleared only. The settlement date. Defaults to today, and may be later on a sandbox.

issuer_transaction_idstring

The issuer's transaction id. Optional for cleared (one is generated and returned; sending the same id again is a duplicate, not a second loan). Required for voided and disputed, which name a transaction recorded earlier (CREDIT_711 if there is none).

refund_of_issuer_transaction_idstring

cleared with a negative amount: the transaction it refunds.

Responses

201Successful Response

successboolean
messagestring
codestring
dataSandboxCardTransactionResponse

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.