<a href="https://www.openledger.com/contact" target="_blank">We are iterating quickly on our docs, please reach out if you need latest and greatest! 🔥🚀</a>
Get a demoPostman Collection
GuideAPI Reference
GuideAPI Reference
  • API Overview
    • Reference
    • Authentication
    • Rate Limits
We are iterating quickly on our docs, please reach out if you need latest and greatest! 🔥🚀
LogoLogo
Get a demoPostman Collection
API OverviewAPI EndpointsTransactions

Create Transaction

POST
/transactions
POST
/v1/transactions
1curl -X POST "https://api.openledger.com/v1/transactions?entityId=entityId" \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "amount": 1.1,
6 "description": "string",
7 "debitAccountId": "string",
8 "creditAccountId": "string"
9}'
Try it
201Created
1{
2 "transaction": {
3 "id": "string",
4 "entityId": "string",
5 "timestamp": "2024-01-15T09:30:00Z",
6 "amount": 1.1,
7 "currency": "USD",
8 "description": "string",
9 "debitAccountId": "string",
10 "creditAccountId": "string",
11 "status": "PENDING",
12 "metadata": {}
13 }
14}
Create a new transaction
Was this page helpful?
Previous

Approve Transaction

Next
Built with
Approve Transaction
Create a new transaction

Headers

AuthorizationstringRequired
Bearer authentication of the form `Bearer <token>`, where token is your auth token.

Query parameters

entityIdstringRequired
entity ID

Request

This endpoint expects an object.
amountdoubleRequired
descriptionstringRequired
debitAccountIdstringRequired
creditAccountIdstringRequired
datestringOptionalformat: "date-time"
currencystringOptionalDefaults to USD
statusenumOptionalDefaults to PENDING
Allowed values:
metadataobjectOptional

Response

Transaction created
transactionobject or null

Errors

entity ID
Transaction created

Bearer authentication of the form Bearer <token>, where token is your auth token.