Transactions
Dry-run a transaction
Preview a transaction without writing it to the ledger.
POST
If you’re using the auto-provisioned
Enterprise Core instance included with your Production License deployment, set the base URL to: https://ENTERPRISE_PUBLIC_URL/core.If you’re connecting to a different Core instance, use the publicly accessible base URL for that instance instead.Authorization
If set, the API uses an API key for authentication. Include the following header in your requests:X-blnk-key: <api-key>.
Replace <api-key> with your secret API key. Ensure the key is kept secure and not exposed in public repositories or client-side code.
See also: Scoped API keys and Secure your Blnk server.
Available in version 0.15.3 and later.
dry_run to true. Blnk returns a projection instead of a recorded transaction.
The preview always answers synchronously with HTTP 200. dry_run takes precedence over skip_queue. A projected rejection is 200 with would_apply: false, not an HTTP error.
dry_run also works on bulk create, refund, and update inflight. See Dry-run transactions.
Body
boolean
required
Set
true to project the transaction without writing anything. No transaction row, balance change, queue entry, webhook, or hook is created, and the reference is not consumed.integer
The transaction amount in its smallest unit (recommended). Include the corresponding
precision value. See Precision.float
The transaction amount as a float. Blnk multiplies
amount by precision to store precise_amount.string
required
The currency of the transaction amount.
string
required
Unique transaction reference. A dry run does not consume it.
string
required
Balance sending the amount.
@ prefix indicates an internal balance.string
required
Balance receiving the amount.
@ prefix indicates an internal balance.string
Narration of the transaction.
boolean
default:"false"
Whether the source can go negative. See Overdrafts.
boolean
default:"false"
When
true, the preview uses INFLIGHT status and projects inflight balances. See Create inflight.boolean
default:"false"
Ignored for a single-transaction dry run. The preview always answers now. For bulk and splits, this flag selects cumulative vs independent projection. See Bulk and split transactions.
array
Multiple sources instead of
source. See Multiple sources.array
Multiple destinations instead of
destination. See Multiple destinations.Response
boolean
required
Always
true. This is a preview, not a recorded transaction.boolean
required
Whether a real post of this payload would be accepted against balances as they stand now.
object
Present when
would_apply is false. code is the same catalog code a real post would return.string
Status the real transaction would carry (
APPLIED, or INFLIGHT if you sent inflight: true). Omitted when would_apply is false.string
The reference you sent. It is still unused after a dry run.
string
Currency of the projected movement.
float
Display amount of the projected movement.
string
Movement in minor units, returned as a string so nothing is rounded.
float
Precision used to convert
precise_amount.string
Present on inflight previews only:
commit or void.array
required
Before and after state for each participating balance. Amounts are minor-unit strings.
array
One entry per split that would apply on a multiple-source or multiple-destination transaction.
array
Advisory messages that are not rejections, such as a currency mismatch or a
scheduled_for date being ignored.