# Post Transactions

The "Post Transactions" endpoint allows users to initiate a new transaction within the system. This can be done by sending a POST request to the following endpoint:\
\ <mark style="color:green;">`POST`</mark> `/api/postings/v1/posttransaction`\
\
When using this endpoint, users need to include the necessary parameters to describe the transaction accurately. This includes details such as `debitAccount`, `creditAccount`, `amount`, and other relevant information. After a successful request, a new transaction will be initiated within the system.

**Headers**

| Name                                            | Value                |
| ----------------------------------------------- | -------------------- |
| Content-Type<mark style="color:red;">\*</mark>  | `application/json`   |
| Authorization<mark style="color:red;">\*</mark> | `Bearer <token>`     |
| Request-Reference                               | `{unique-reference}` |

**Body**

<table><thead><tr><th width="178">Name</th><th width="174">Data Type (length)</th><th width="105" data-type="checkbox">Required</th><th>Description</th></tr></thead><tbody><tr><td><code>debitAccount</code></td><td>string <a data-footnote-ref href="#user-content-fn-1"><em>(20)</em></a></td><td>true</td><td>The account to be debited on Udara360<br><br><em><mark style="color:orange;">This can either be a customer account or a general ledger account</mark></em></td></tr><tr><td><code>creditAccount</code></td><td>string <a data-footnote-ref href="#user-content-fn-1"><em>(20)</em></a></td><td>true</td><td>The account to be credited<br><br><em><mark style="color:orange;">This can either be a customer account or a general ledger account</mark></em></td></tr><tr><td><code>amount</code></td><td>integer</td><td>true</td><td>The amount to be transferred<br><br><em><mark style="color:orange;">The amount must be provided in the base currency, e.g. NGN 5000.50 should be provided as 500050 kobo</mark></em></td></tr><tr><td><code>feeCharge</code></td><td>integer</td><td>false</td><td>The fee charge is applied to the transaction<br><br><em><mark style="color:orange;">The amount must be provided in the base currency, e.g. NGN 5000.50 should be provided as 500050 kobo</mark></em></td></tr><tr><td><code>feeIncomeGL</code></td><td>string</td><td>false</td><td>The general ledger for fee income<br><br><em><mark style="color:orange;">This is only required if</mark><mark style="color:orange;"> </mark><mark style="color:orange;"><code>FeeCharge</code></mark><mark style="color:orange;"> </mark><mark style="color:orange;">is greater than</mark><mark style="color:orange;"> </mark><mark style="color:orange;"><code>0</code></mark></em></td></tr><tr><td><code>instrumentNumber</code></td><td>string <a data-footnote-ref href="#user-content-fn-1"><em>(50)</em></a></td><td>false</td><td>The instrument number associated with the transaction</td></tr><tr><td><code>narration</code></td><td>string <a data-footnote-ref href="#user-content-fn-1"><em>(5-40)</em></a></td><td>true</td><td>A description or narration of the transaction</td></tr><tr><td><code>unplaceLienAfterPosting</code></td><td>boolean</td><td>false</td><td>Whether to remove the lien after posting<br><br><em><mark style="color:orange;">If the originator account has a lien, that should not be considered and removed after a successful transaction</mark></em></td></tr><tr><td><code>lienReferenceNumber</code></td><td>string <a data-footnote-ref href="#user-content-fn-1"><em>(100)</em></a></td><td>false</td><td>The reference number for the lien<br><br><em><mark style="color:orange;">This is only required if UnplaceLienAfterPosting is</mark><mark style="color:orange;"> </mark><mark style="color:orange;"><code>true</code></mark></em></td></tr><tr><td><code>merchant</code></td><td>string <a data-footnote-ref href="#user-content-fn-1"><em>(100)</em></a></td><td>false</td><td>The merchant involved in the transaction can be any for bill payment (E.g., DSTV, MTN, or Bet9ja)</td></tr><tr><td><code>postingsTransactionType</code></td><td>string</td><td>true</td><td><p>The type of transaction for postings is based on the originator and beneficiary accounts. This allows the system to set the right sort code for easy transaction grouping<br><br>The enumerations are:<br><code>1</code> = GLCustomer </p><p><code>2</code> = GLGL </p><p><code>3</code> = CustomerCustomer<br><br></p></td></tr><tr><td><code>additionalMetadata</code></td><td>object</td><td>false</td><td>Additional metadata related to the transaction</td></tr><tr><td><code>additionalMetadata.orig_AcctNo</code></td><td>string</td><td>false</td><td>The originator's account number</td></tr><tr><td><code>additionalMetadata.orig_Name</code></td><td>string</td><td>false</td><td>The originator's account holder's name</td></tr><tr><td><code>additionalMetadata.orig_BVN</code></td><td>string</td><td>false</td><td>The originator's account holder's Bank Verification Number (BVN)</td></tr><tr><td><code>additionalMetadata.orig_BankCode</code></td><td>string</td><td>false</td><td>The originator's bank's code</td></tr><tr><td><code>additionalMetadata.orig_BankName</code></td><td>string</td><td>false</td><td>The originator's bank's name</td></tr><tr><td><code>additionalMetadata.benf_AcctNo</code></td><td>string</td><td>false</td><td>The beneficiary account number</td></tr><tr><td><code>additionalMetadata.benf_Name</code></td><td>string</td><td>false</td><td>The beneficiary's name</td></tr><tr><td><code>additionalMetadata.benf_BVN</code></td><td>string</td><td>false</td><td>The beneficiary's Bank Verification Number (BVN)</td></tr><tr><td><code>additionalMetadata.benf_BankCode</code></td><td>string</td><td>false</td><td>The beneficiary bank's code</td></tr><tr><td><code>additionalMetadata.benf_BankName</code></td><td>string</td><td>false</td><td>The beneficiary bank's name</td></tr></tbody></table>

Here is an example request and response with a sample payload sent to the endpoint in Curl format.

<details>

<summary>Sample Request</summary>

```json
curl --location -g '{{baseurl}}/api/postings/v1/posttransaction' \
--header 'Authorization: bearer {token}' \
--header 'request-reference: {unique_reference}' \
--header 'Content-Type: application/json' \
--data '{
  "debitAccount": "string",
  "creditAccount": "string",
  "amount": 0,
  "feeCharge": 0,
  "feeIncomeGL": "string",
  "instrumentNumber": "stringstri",
  "narration": "string",
  "unplaceLienAfterPosting": true,
  "lienReferenceNumber": "string",
  "merchant": "string",
  "postingsTransactionType": "string",
  "additionalMetadata": {
    "orig_AcctNo": "string",
    "orig_Name": "string",
    "orig_BVN": "string",
    "orig_BankCode": "string",
    "orig_BankName": "string",
    "benf_AcctNo": "string",
    "benf_Name": "string",
    "benf_BVN": "string",
    "benf_BankCode": "string",
    "benf_BankName": "string"
  }'
```

</details>

<details>

<summary>Respose: <code>200</code></summary>

```json
{
  "status": true,
  "message": "string",
  "data": {
    "statusCode": "string",
    "referenceNumber": "string",
    "instrumentNumber": "string"
  }
}
```

</details>

{% hint style="info" %}
Visit the [response code page](/udara360-docs-1/getting-started/response-code.md#postings-response-code) for a list of all posting status code and their descriptions.
{% endhint %}

[^1]: This is the maximum number of characters allowed.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.udara360.io/udara360-docs-1/transactions/postings-api/post-transactions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
