v1

latestOpenAPI 3.1.02026-07-2418201.6 MB

Create Transaction

This API is used to pass a transaction entry into a ledger account.

post/v2/ledger/journal/{journal_urn}/transact

Path parameters

journal_urnstring required

Journal URN under which transaction will be created

Request body

reference_idstring required

Your unique API reference id

purposestring required

Purpose of the transaction

consentboolean required

Consent of creation

payer_ledger_account_urnstring

Payer ledger account URN passed at the time of ledger account creation. Required if transaction is happening across accounts or is a Debit

payee_ledger_account_urnstring

Payee ledger account URN passed at the time of ledger account creation. Required if transaction is happening across accounts or is a Credit

amountnumber double required

Transaction amount

statusstring required

Transaction status as desired. Acceptable value - SUCCESS, PENDING, FAILURE

expirystring date

Expiry date of the transaction if the transaction type is credit.

transaction_timestampstring date-time required

Timestamp of the intended transaction

Response

200

decentroTxnIdstring
statusstring
responseCodestring
messagestring

Example response

{
  "decentroTxnId": "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF",
  "status": "SUCCESS",
  "responseCode": "S00000",
  "message": "Transaction successful",
  "data": {
    "transactionStatus": "SUCCESS",
    "transactionDescription": "Transaction recorded successfully",
    "referenceId": "transaction_1",
    "urn": "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF",
    "payerAccount": {
      "urn": "LA0001",
      "referenceId": "ledger_account_1",
      "name": "Ledger Account 1",
      "balance": {
        "available": 70,
        "blocked": 30.5
      }
    },
    "amount": 30.5,
    "payeeAccount": {
      "urn": "LA0002",
      "referenceId": "ledger_account_2",
      "name": "Ledger Account 2",
      "balance": {
        "available": 50
      }
    },
    "purpose": "this is to transact between two accounts",
    "additionalParameters": {
      "parameter1": "value1",
      "parameter2": "value2"
    },
    "currency": "INR",
    "status": "SUCCESS",
    "expiry": "2023-08-25",
    "creationTimestamp": "2022-06-06 21:21:21",
    "lastModificationTimestamp": "NA",
    "transactionTimestamp": "2022-06-06 21:21:21"
  }
}