---
updatedAt: 2026-11-12T11:27:18.000Z
agentTools:
  projectIndex: https://docs.decentro.tech/llms.txt
---

# Create Transaction

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

> 🙌 Important Note
>
> Please use only **Staging Credentials** on each API Reference page to test the APIs directly from our Documentation.

### API Endpoints

| Environment       | Endpoint                                                                    |
| :---------------- | :-------------------------------------------------------------------------- |
| Staging / Sandbox | <https://in.staging.decentro.tech/v2/ledger/journal/{journal_urn}/transact> |
| Production        | <https://in.decentro.tech/v2/ledger/journal/{journal_urn}/transact>         |

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "decentro-staging",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://in.staging.decentro.tech"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/v2/ledger/journal/{journal_urn}/transact": {
      "post": {
        "summary": "Create Transaction",
        "description": "This API is used to pass a transaction entry into a ledger account.",
        "operationId": "create-transaction",
        "parameters": [
          {
            "name": "journal_urn",
            "in": "path",
            "description": "Journal URN under which transaction will be created",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "reference_id",
                  "purpose",
                  "consent",
                  "amount",
                  "status",
                  "transaction_timestamp"
                ],
                "properties": {
                  "reference_id": {
                    "type": "string",
                    "description": "Your unique API reference id"
                  },
                  "purpose": {
                    "type": "string",
                    "description": "Purpose of the transaction"
                  },
                  "consent": {
                    "type": "boolean",
                    "description": "Consent of creation"
                  },
                  "payer_ledger_account_urn": {
                    "type": "string",
                    "description": "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_urn": {
                    "type": "string",
                    "description": "Payee ledger account URN passed at the time of ledger account creation. Required if transaction is happening across accounts or is a Credit"
                  },
                  "amount": {
                    "type": "number",
                    "description": "Transaction amount",
                    "default": 100,
                    "format": "double"
                  },
                  "status": {
                    "type": "string",
                    "description": "Transaction status as desired. Acceptable value - SUCCESS, PENDING, FAILURE"
                  },
                  "expiry": {
                    "type": "string",
                    "description": "Expiry date of the transaction if the transaction type is credit.",
                    "format": "date"
                  },
                  "transaction_timestamp": {
                    "type": "string",
                    "description": "Timestamp of the intended transaction",
                    "format": "date-time"
                  },
                  "additional_parameters": {
                    "type": "object",
                    "description": "Any custom parameters as required",
                    "properties": {
                      "key": {
                        "type": "string"
                      },
                      "value": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "examples": {
                "Success": {
                  "value": {
                    "reference_id": "transaction_1",
                    "purpose": "this is to transact between two accounts",
                    "consent": true,
                    "payer_ledger_account_urn": "LA0001",
                    "amount": 30.5,
                    "payee_ledger_account_urn": "LA0002",
                    "status": "PENDING",
                    "expiry": "2023-08-25",
                    "transaction_timestamp": "2022-06-07 23:23:23.4004",
                    "additional_parameters": [
                      {
                        "key": "parameter1",
                        "value": "value1"
                      },
                      {
                        "key": "parameter2",
                        "value": "value2"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Success": {
                    "value": "{\n    \"decentroTxnId\": \"ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF\",\n    \"status\": \"SUCCESS\",\n    \"responseCode\": \"S00000\",\n    \"message\": \"Transaction successful\",\n    \"data\": {\n        \"transactionStatus\": \"SUCCESS\",\n        \"transactionDescription\": \"Transaction recorded successfully\",\n        \"referenceId\": \"transaction_1\",\n        \"urn\": \"ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF\",\n        \"payerAccount\": {\n            \"urn\": \"LA0001\",\n            \"referenceId\": \"ledger_account_1\",\n            \"name\": \"Ledger Account 1\",\n            \"balance\": {\n                \"available\": 70.0,\n                \"blocked\": 30.5\n            }\n        },\n        \"amount\": 30.5,\n        \"payeeAccount\": {\n            \"urn\": \"LA0002\",\n            \"referenceId\": \"ledger_account_2\",\n            \"name\": \"Ledger Account 2\",\n            \"balance\": {\n                \"available\": 50.0,\n                \"blocked\": 0.0\n            }\n        },\n        \"purpose\": \"this is to transact between two accounts\",\n        \"additionalParameters\": {\n            \"parameter1\": \"value1\",\n            \"parameter2\": \"value2\"\n        },\n        \"currency\": \"INR\",\n        \"status\": \"SUCCESS\",\n        \"expiry\": \"2023-08-25\",  \n        \"creationTimestamp\": \"2022-06-06 21:21:21\",\n        \"lastModificationTimestamp\": \"NA\",\n        \"transactionTimestamp\": \"2022-06-06 21:21:21\"\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "decentroTxnId": {
                      "type": "string",
                      "example": "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF"
                    },
                    "status": {
                      "type": "string",
                      "example": "SUCCESS"
                    },
                    "responseCode": {
                      "type": "string",
                      "example": "S00000"
                    },
                    "message": {
                      "type": "string",
                      "example": "Transaction successful"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "transactionStatus": {
                          "type": "string",
                          "example": "SUCCESS"
                        },
                        "transactionDescription": {
                          "type": "string",
                          "example": "Transaction recorded successfully"
                        },
                        "referenceId": {
                          "type": "string",
                          "example": "transaction_1"
                        },
                        "urn": {
                          "type": "string",
                          "example": "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEF"
                        },
                        "payerAccount": {
                          "type": "object",
                          "properties": {
                            "urn": {
                              "type": "string",
                              "example": "LA0001"
                            },
                            "referenceId": {
                              "type": "string",
                              "example": "ledger_account_1"
                            },
                            "name": {
                              "type": "string",
                              "example": "Ledger Account 1"
                            },
                            "balance": {
                              "type": "object",
                              "properties": {
                                "available": {
                                  "type": "integer",
                                  "example": 70,
                                  "default": 0
                                },
                                "blocked": {
                                  "type": "number",
                                  "example": 30.5,
                                  "default": 0
                                }
                              }
                            }
                          }
                        },
                        "amount": {
                          "type": "number",
                          "example": 30.5,
                          "default": 0
                        },
                        "payeeAccount": {
                          "type": "object",
                          "properties": {
                            "urn": {
                              "type": "string",
                              "example": "LA0002"
                            },
                            "referenceId": {
                              "type": "string",
                              "example": "ledger_account_2"
                            },
                            "name": {
                              "type": "string",
                              "example": "Ledger Account 2"
                            },
                            "balance": {
                              "type": "object",
                              "properties": {
                                "available": {
                                  "type": "integer",
                                  "example": 50,
                                  "default": 0
                                },
                                "blocked": {
                                  "type": "integer",
                                  "example": 0,
                                  "default": 0
                                }
                              }
                            }
                          }
                        },
                        "purpose": {
                          "type": "string",
                          "example": "this is to transact between two accounts"
                        },
                        "additionalParameters": {
                          "type": "object",
                          "properties": {
                            "parameter1": {
                              "type": "string",
                              "example": "value1"
                            },
                            "parameter2": {
                              "type": "string",
                              "example": "value2"
                            }
                          }
                        },
                        "currency": {
                          "type": "string",
                          "example": "INR"
                        },
                        "status": {
                          "type": "string",
                          "example": "SUCCESS"
                        },
                        "expiry": {
                          "type": "string",
                          "example": "2023-08-25"
                        },
                        "creationTimestamp": {
                          "type": "string",
                          "example": "2022-06-06 21:21:21"
                        },
                        "lastModificationTimestamp": {
                          "type": "string",
                          "example": "NA"
                        },
                        "transactionTimestamp": {
                          "type": "string",
                          "example": "2022-06-06 21:21:21"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```