Skip to main content
POST
/
transactions
Create transaction
curl --request POST \
  --url http://localhost:5001/transactions \
  --header 'X-blnk-key: <api-key>'
Use blnk.Transactions.create to post a transaction between a source and destination balance.
blnk.Transactions.create
const response = await blnk.Transactions.create({
  amount: 1250.34,
  precision: 100,
  currency: 'USD',
  source: '@WorldUSD',
  destination: '@MyBalance',
  reference: 'ref_2ye281ewiu',
  description: 'Customer payment',
});
FieldDescription
amountTransaction amount. Use precise_amount for values with more than 15 digits.
precise_amountAmount with precision already applied.
currencyCurrency of the transaction.
precisionPrecision for the currency (for example 100 for cents).
referenceUnique reference for the transaction.
sourceBalance sending the amount. Prefix @ for an internal balance.
destinationBalance receiving the amount.
descriptionNarration of the transaction.
allow_overdraftAllow the source balance to go negative. See Overdrafts.
inflightHold the transaction until you commit or void it. See Inflight.
inflight_expiry_dateWhen an inflight transaction expires and rolls back.
inflight_commit_dateWhen Core auto-commits the inflight transaction.
scheduled_forDate and time to post a scheduled transaction.
effective_dateActual date the transaction occurred. See Backdated transactions.
skip_queueBypass the transaction queue and process directly.
atomicFor split legs, apply all legs together or none.
meta_dataOptional metadata. Tag funds with BLNK_LINEAGE_PROVIDER for fund lineage.

Response shape

201 Created
{
  "amount": 1250.34,
  "rate": 0,
  "precision": 100,
  "precise_amount": 125034,
  "transaction_id": "txn_c4e70eb8-e4d6-4e04-a2e2-92a43b969e0c",
  "parent_transaction": "",
  "source": "bln_f344b673-e855-4bda-b769-3e94a02c1941",
  "destination": "bln_d5cbde84-d20a-485b-8ce8-6677d782c3a1",
  "reference": "ref_2ye281ewiu",
  "currency": "USD",
  "description": "Customer payment",
  "status": "QUEUED",
  "hash": "0b9c25fb5b00d6c71cb4ca87026bf6dc316e63353d3330deb588bd0b3d74dcc0",
  "allow_overdraft": false,
  "inflight": false,
  "created_at": "2024-11-26T09:33:35.265582042Z",
  "scheduled_for": "0001-01-01T00:00:00Z",
  "inflight_expiry_date": "0001-01-01T00:00:00Z",
  "inflight_commit_date": "0001-01-01T00:00:00Z"
}
FieldDescription
transaction_idUnique ID for the transaction.
statusTransaction status (for example QUEUED, APPLIED).
precise_amountamount × precision.
sourceResolved source balance.
destinationResolved destination balance.
hashHash of the transaction details.
created_atDate and time the transaction was created.

How transactions work

Money movement, statuses, and the transaction lifecycle.

Create new transaction

HTTP request and response schema.

Need help?

We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool. To ask questions or discuss issues, please contact us or join our Discord community.