> For the complete documentation index, see [llms.txt](https://kb.logicerp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/accounts/push/save-a-bank-payment.md).

# Save a Bank Payment

Saves a **bank payment voucher** in Logic ERP: money paid **out of a bank account** – by cheque, transfer, UPI, NEFT, RTGS or draft – to one or more accounts such as suppliers or expense heads. You name the bank account and list the accounts paid with their amounts and cheque or transfer details; Logic ERP credits the bank account with the total, debits each account, numbers the voucher and returns its number. The payments are saved **on account** – they are not adjusted against bills.

This is one of four related endpoints that share the same request. The others are [Save a Bank Receipt](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/accounts/push/save-a-bank-receipt.md) (money received into a bank account), [Save a Cash Payment](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/accounts/push/save-a-cash-payment.md) and [Save a Cash Receipt](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/accounts/push/save-a-cash-receipt.md). What is particular to bank payments: `ActUserCode` must be a **bank** account; `PaymentMethod` matters – `UPI`, `NEFT` and `RTGS` lines are marked as **cleared** at once, the others wait for bank reconciliation; the configuration can keep a register of **cheque numbers issued**; and TDS is taken off the amount paid from the bank.

### **Endpoint**

| Name          | Detail                                    |
| ------------- | ----------------------------------------- |
| Address       | `https://your-server/api/SaveBankPayment` |
| Method        | `POST`                                    |
| Authorization | Basic Auth                                |

The response envelope, branches, dates, queueing and the common messages are explained in [How Every API Call Works](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/how-every-api-call-works.md).

### **Request fields**

Field names are not case-sensitive. Codes and names must match Logic ERP's exactly: capitals do not matter and spaces at the end are ignored, but spaces in front are not removed.

| Field                      | Type   | Required                               | Default    | Meaning                                                                                                                                                                                                                              |
| -------------------------- | ------ | -------------------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `BranchCode`               | number | Yes, unless you send `BranchShortName` | `0`        | The branch the voucher belongs to, by Logic ERP's branch number (`Branch_Code` in [Get Branch Info](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/masters/pull/get-branch-info.md)). |
| `BranchShortName`          | text   | No                                     | empty      | The branch by its short name, used only when `BranchCode` is `0` or less. Note the spelling: no underscore, unlike some other endpoints. With neither field, the request is refused.                                                 |
| `ActUserCode`              | text   | Yes                                    | –          | The **bank account** the money is paid from, by its account code in Logic ERP. It must be an account of the type *Bank*; a cash or any other account is refused.                                                                     |
| `VoucherDate`              | date   | No                                     | today      | The voucher date, `yyyy-MM-dd`. It must fall in the **current** financial year.                                                                                                                                                      |
| `Narration`                | text   | No                                     | none       | Narration of the bank account's line, up to 250 characters.                                                                                                                                                                          |
| `Remarks_1`, `Remarks_2`   | text   | No                                     | empty      | Remarks 1 and 2 of the voucher, up to 30 characters each. Spaces at the ends are removed.                                                                                                                                            |
| `Bank_Charges`             | number | No                                     | `0`        | Bank charges on this payment. When above `0`, they are debited to `Bank_Charges_AccountCode` and the bank account is credited with them on top of the payments – see the rules.                                                      |
| `Bank_Charges_AccountCode` | text   | Only when `Bank_Charges` is above `0`  | empty      | The account the bank charges are debited to: an expense, income or liability account code.                                                                                                                                           |
| `Bank_Charges_ActCode`     | number | No                                     | –          | Ignored.                                                                                                                                                                                                                             |
| `ListAccounts`             | list   | Yes                                    | empty list | The accounts paid, one entry per line of the voucher – see below.                                                                                                                                                                    |

**Request fields – `ListAccounts`**

| Field                 | Type   | Required | Default  | Meaning                                                                                                                                                                                                                                                                                                              |
| --------------------- | ------ | -------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `AccountCode`         | text   | Yes      | –        | The account paid (debited), by its account code in Logic ERP. Any type of account is accepted: supplier, customer, employee, expense, another bank or cash account.                                                                                                                                                  |
| `Amount`              | number | Yes      | `0`      | The amount paid to this account. Must be above `0`.                                                                                                                                                                                                                                                                  |
| `Discount`            | number | No       | `0`      | A discount on this line, `0` or more. It needs a discount account in the configuration – see the rules.                                                                                                                                                                                                              |
| `PaymentMethod`       | text   | No       | `Cheque` | How the money was paid: `D.D.`, `Cheque`, `Transfer`, `Pay Order`, `Cash`, `UPI`, `NEFT` or `RTGS` (capitals and spaces around it do not matter); any other value refuses the request. `UPI`, `NEFT` and `RTGS` lines are marked as cleared. `Cash` is allowed only on a line whose `AccountCode` is a cash account. |
| `DD_Cheque_No`        | text   | No       | empty    | The cheque, draft or transfer reference number, up to 25 characters (up to 15 for a cheque when the configuration keeps a cheque-number register – see the rules). It becomes the line's reference number in the account's ledger; when empty, the voucher number is used.                                           |
| `DD_Cheque_Date`      | date   | No       | none     | The cheque or draft date, `yyyy-MM-dd`. A value that is not a date is ignored without a message.                                                                                                                                                                                                                     |
| `Narration`           | text   | No       | none     | Narration of this line, up to 250 characters.                                                                                                                                                                                                                                                                        |
| `CompanyName`         | text   | No       | none     | A company from Logic ERP's company master, by its exact name, recorded on the line for company-wise accounts.                                                                                                                                                                                                        |
| `Cost_Center`         | text   | No       | none     | A cost centre, by its name in Logic ERP, recorded on the line.                                                                                                                                                                                                                                                       |
| `Amount_For_TDS_Calc` | number | No       | `Amount` | The amount TDS is worked out on, when it should differ from `Amount`. Used only when `AccountCode` is linked to a TDS type in Logic ERP; `0` or left out means `Amount`.                                                                                                                                             |

### **Rules Logic ERP applies**

* **Debit and credit.** Each account in `ListAccounts` is **debited** with its `Amount` plus its `Discount`. The bank account is **credited** with the total of all amounts, less any TDS deducted, plus any `Bank_Charges`; the discount account is credited with the total discount. You do not send the bank side, and there is nothing to balance.
* **How accounts are found.** `ActUserCode` is looked up among bank accounts by account code. `AccountCode` is looked up among all accounts by account code. A line whose `AccountCode` is the bank account itself is refused.
* **No bill-wise adjustment.** There is no field for bills. Every line is saved as an unadjusted (on-account) entry: its full amount stays open in the account's ledger, to be adjusted against the supplier's bills later in Logic ERP.
* **Cleared or not.** Lines with `PaymentMethod` `UPI`, `NEFT` or `RTGS` are saved as already cleared by the bank. All other lines – including lines without `PaymentMethod`, which count as cheques – are saved as not yet cleared, to be cleared in Logic ERP's bank reconciliation.
* **TDS.** When an account in `ListAccounts` is linked to a TDS type in Logic ERP (of any nature except *TDS On Goods*) and the type has a TDS account, Logic ERP deducts TDS automatically on `Amount_For_TDS_Calc` (or `Amount`) at the type's rate – the type's above-limit rate when the type has a minimum limit, `Amount` is above it and an above-limit rate is set – plus the type's surcharge and cess. For a TDS type set up as TDS under GST, the account's GST state decides: in your company's GST state the cess and additional cess are added and no surcharge, in another state the surcharge only; an account with no GST state in Logic ERP gets the type's usual rates. The account is still debited with the full `Amount`; the TDS accounts of the type are credited with the tax and the bank account with the rest. The TDS is rounded when the configuration says so, and it is not linked to earlier entries of the account. Accounts without a TDS link are not affected and `Amount_For_TDS_Calc` is ignored for them.
* **Narration and remarks.** `Narration` (top level) goes on the bank account's line; each line's `Narration` on that account's line. `Remarks_1` and `Remarks_2` are saved on the voucher.
* **Configuration.** Your API site's settings for bank payments name, per branch, a **bank payment configuration**. From it Logic ERP applies: the numbering, the cheque-number register, TDS rounding, the discount account, the bank account limit check, and the option that makes a cost centre compulsory (checked on every line). Its other options are not applied, and the series chosen in the settings has no effect. When no settings are saved for the branch, none of these options applies and the voucher is numbered day-wise.
* **Discount.** A line's `Discount` is credited to the discount account named in the configuration, which must be an income or expense account. When the configuration names none – also when no settings are saved for the branch – a request with a `Discount` above `0` is refused with `Discount account is not set in the cash / bank configuration`. A negative `Discount` is refused.
* **Bank charges.** When `Bank_Charges` is above `0`, a bank-charges line debits `Bank_Charges_AccountCode` with that amount, and the bank account is credited with it on top of the payments.
* **Limit check.** When the configuration's limit check is on and a limit is set for the bank account in Logic ERP, a voucher that would take the account's balance beyond that limit is refused with the *Not Within Limit* message.
* **Number.** Day-wise by default: `BP`, the voucher date as `yyyyMMdd`, then the next number for that day in the branch, for example `BP202611052`. A configuration with a numbering prefix gives numbers like `BPBP-2611-7` instead: `BP`, the prefix, an optional year / month / day part, and the next number of that series in the branch, so numbering starts again with each new date part and each financial year.
* **Cheque-number register.** When the configuration keeps a register of cheque numbers, each cheque line (`PaymentMethod` `Cheque` or left out) with a `DD_Cheque_No` is added to the register of the bank account. It must then be at most 15 characters. The register itself is not checked: a cheque number already issued to another account can be saved again (see *Duplicates*).
* **Date and financial year.** The voucher is saved in the financial year of the day the request arrives. A `VoucherDate` outside that year is refused. The request is also refused when `VoucherDate` is on or before the lock date in the access rights of the Logic ERP user linked to your API site.
* **Duplicates.** A line's `DD_Cheque_No`, when sent, is checked: the same number twice for one account in a request is refused, and so is a number already saved for that account on a bank payment of the same branch in the financial year the voucher is saved in. Lines without `DD_Cheque_No` are not checked, so a request without it that succeeds always saves a new voucher. Check `Status` before you resend.
* **All or nothing.** The voucher and all its lines are saved together. If anything fails, nothing is saved.
* **Switching off.** Your support team can switch this endpoint off per branch. Then nothing is saved and the answer has `Status: true` with the *In-Active* sentence in `Message` (as explained in How Every API Call Works).
* Your Logic ERP licence must include the API for bank payments.

### **Example request**

```json
{
  "BranchCode": 2,
  "BranchShortName": "",
  "ActUserCode": "HDFC-CA",
  "VoucherDate": "2026-11-05",
  "Narration": "Supplier payments – week 45",
  "Remarks_1": "Approved by accounts",
  "Remarks_2": "",
  "ListAccounts": [
    {
      "AccountCode": "SUP0148",
      "Amount": 48500.00,
      "Discount": 0,
      "PaymentMethod": "NEFT",
      "DD_Cheque_No": "N2611050093",
      "DD_Cheque_Date": "2026-11-05",
      "Narration": "Against October purchases",
      "CompanyName": "",
      "Cost_Center": "",
      "Amount_For_TDS_Calc": 0
    },
    {
      "AccountCode": "SUP0212",
      "Amount": 12000.00,
      "Discount": 0,
      "PaymentMethod": "Cheque",
      "DD_Cheque_No": "004417",
      "DD_Cheque_Date": "2026-11-07",
      "Narration": "Packing material",
      "CompanyName": "",
      "Cost_Center": "",
      "Amount_For_TDS_Calc": 0
    }
  ]
}
```

### **Test it**

Send a request to the Logic ERP **sandbox** (a test company) from this page: open the block below, enter the sandbox user name and password (ask your Logic ERP support team), change the request if you like, and press **Test it**. This really saves in the sandbox: each send saves a new bank payment of ₹3.00 by cheque from the bank account `207` to the test party `APITESTS01`. Set `VoucherDate` to today's date and keep the small amount and the "API TEST" values.

## Save a Bank Payment

> Saves a bank payment voucher in Logic ERP: money paid out of a bank account – by cheque, transfer, UPI, NEFT, RTGS or draft – to one or more accounts such as suppliers or expense heads. You name the bank account and list the accounts paid with their amounts and cheque or transfer details; Logic ERP credits the bank account with the total, debits each account, numbers the voucher and returns its number. The payments are saved on account – they are not adjusted against bills.

```json
{"openapi":"3.0.3","info":{"title":"Logic ERP API","version":"1.0"},"tags":[{"name":"Accounts - Push"}],"servers":[{"url":"https://demo.logicerp.com/api","description":"Logic ERP sandbox (test company)"}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"The user name and password of your API site."}}},"paths":{"/SaveBankPayment":{"post":{"tags":["Accounts - Push"],"operationId":"SaveBankPayment","summary":"Save a Bank Payment","description":"Saves a bank payment voucher in Logic ERP: money paid out of a bank account – by cheque, transfer, UPI, NEFT, RTGS or draft – to one or more accounts such as suppliers or expense heads. You name the bank account and list the accounts paid with their amounts and cheque or transfer details; Logic ERP credits the bank account with the total, debits each account, numbers the voucher and returns its number. The payments are saved on account – they are not adjusted against bills.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"BranchCode":{"type":"integer","description":"The branch the voucher belongs to, by Logic ERP's branch number (`Branch_Code` in Get Branch Info)."},"BranchShortName":{"type":"string","description":"The branch by its short name, used only when `BranchCode` is `0` or less. Note the spelling: no underscore, unlike some other endpoints. With neither field, the request is refused."},"ActUserCode":{"type":"string","description":"The bank account the money is paid from, by its account code in Logic ERP. It must be an account of the type Bank; a cash or any other account is refused."},"VoucherDate":{"type":"string","description":"The voucher date, `yyyy-MM-dd`. It must fall in the current financial year."},"Narration":{"type":"string","description":"Narration of the bank account's line, up to 250 characters."},"Remarks_1":{"type":"string","description":"Remarks 1 and 2 of the voucher, up to 30 characters each. Spaces at the ends are removed."},"Remarks_2":{"type":"string","description":"Remarks 1 and 2 of the voucher, up to 30 characters each. Spaces at the ends are removed."},"ListAccounts":{"type":"array","items":{"type":"object","properties":{"AccountCode":{"type":"string","description":"The account paid (debited), by its account code in Logic ERP. Any type of account is accepted: supplier, customer, employee, expense, another bank or cash account."},"Amount":{"type":"number","description":"The amount paid to this account. Must be above `0`."},"Discount":{"type":"integer","description":"A discount on this line, `0` or more. It needs a discount account in the configuration – see the rules."},"PaymentMethod":{"type":"string","description":"How the money was paid: `D.D.`, `Cheque`, `Transfer`, `Pay Order`, `Cash`, `UPI`, `NEFT` or `RTGS` (capitals and spaces around it do not matter); any other value refuses the request. `UPI`, `NEFT` and `RTGS` lines are marked as cleared. `Cash` is allowed only on a line whose `AccountCode` is a cash account."},"DD_Cheque_No":{"type":"string","description":"The cheque, draft or transfer reference number, up to 25 characters (up to 15 for a cheque when the configuration keeps a cheque-number register – see the rules). It becomes the line's reference number in the account's ledger; when empty, the voucher number is used."},"DD_Cheque_Date":{"type":"string","description":"The cheque or draft date, `yyyy-MM-dd`. A value that is not a date is ignored without a message."},"Narration":{"type":"string","description":"Narration of this line, up to 250 characters."},"CompanyName":{"type":"string","description":"A company from Logic ERP's company master, by its exact name, recorded on the line for company-wise accounts."},"Cost_Center":{"type":"string","description":"A cost centre, by its name in Logic ERP, recorded on the line."},"Amount_For_TDS_Calc":{"type":"integer","description":"The amount TDS is worked out on, when it should differ from `Amount`. Used only when `AccountCode` is linked to a TDS type in Logic ERP; `0` or left out means `Amount`."}},"required":["AccountCode","Amount"]},"description":"The accounts paid, one entry per line of the voucher – see below."}},"required":["ActUserCode","ListAccounts"]}}}},"responses":{"200":{"description":"Always HTTP 200. Check Status and Message.","content":{"application/json":{"schema":{"type":"object","properties":{"LastSavedDocNo":{"type":"string","description":"The voucher number, for example `BP202611052`. `null` when not saved; left out of the answer when the request was refused for an unknown `BranchShortName`."},"Status":{"type":"boolean","description":"`true` when the voucher was saved. Also `true`, with nothing saved, when the endpoint is switched off – see above."},"Message":{"type":"string","description":"Empty when saved; the reason when not saved."},"LastSavedCode":{"type":"integer","description":"Logic ERP's internal number of the new voucher; `0` when not saved."},"request_ID":{"type":"string","description":"The ID of this request – quote it to support. Empty when the request was refused before saving started (an unknown `BranchShortName`)."}}}}}},"401":{"description":"No login was sent."}}}}}}
```

### **Response**

| Field            | Type         | Meaning                                                                                                                                                     |
| ---------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Status`         | true / false | `true` when the voucher was saved. Also `true`, with nothing saved, when the endpoint is switched off – see above.                                          |
| `Message`        | text         | Empty when saved; the reason when not saved.                                                                                                                |
| `LastSavedCode`  | number       | Logic ERP's internal number of the new voucher; `0` when not saved.                                                                                         |
| `LastSavedDocNo` | text         | The voucher number, for example `BP202611052`. `null` when not saved; left out of the answer when the request was refused for an unknown `BranchShortName`. |
| `request_ID`     | text         | The ID of this request – quote it to support. Empty when the request was refused before saving started (an unknown `BranchShortName`).                      |

### **Example response**

```json
{
  "LastSavedDocNo": "BP202611052",
  "Status": true,
  "Message": "",
  "LastSavedCode": 48231,
  "request_ID": "c5e21f07-4b9a-4d38-a6f2-81d3e0b7c954"
}
```

### **Messages you may see**

| Message                                                                                              | Meaning                                                                                                                                                                     | What to do                                                                      |
| ---------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| `Invalid Voucher Date...`                                                                            | `VoucherDate` is not a date.                                                                                                                                                | Send `yyyy-MM-dd`.                                                              |
| `Please Define Bank Account User Code (ActUserCode) to Continue...`                                  | `ActUserCode` is empty.                                                                                                                                                     | Send the bank account's code.                                                   |
| `Invalid Account User Code : …`                                                                      | No bank account has that code (also when the code is a cash or other account).                                                                                              | Send the code of an account of the type *Bank*.                                 |
| `Invalid Amount againts Account Code : …`                                                            | A line has `Amount` `0` or less (the code shown is that line's `AccountCode`).                                                                                              | Send an amount above `0`.                                                       |
| `Invalid Discount against Account Code : …`                                                          | A line has a negative `Discount`.                                                                                                                                           | Send `0` or more.                                                               |
| `ListAccounts is required`                                                                           | `ListAccounts` is empty or `null`.                                                                                                                                          | Send at least one line.                                                         |
| `Invalid Account Code...`                                                                            | A line has no `AccountCode`.                                                                                                                                                | Send the account code.                                                          |
| `Invalid Account Code : …`                                                                           | No account has that code.                                                                                                                                                   | Send the code exactly as in Logic ERP.                                          |
| `Account Code cannot be the cash / bank account itself : …`                                          | A line's `AccountCode` is the bank account of `ActUserCode`.                                                                                                                | Leave that line out.                                                            |
| `Invalid Company Name : …`                                                                           | No company has that name.                                                                                                                                                   | Send the name exactly as in Logic ERP, or leave it empty.                       |
| `Invalid Cost Center Name : …`                                                                       | No cost centre has that name.                                                                                                                                               | Send the name exactly as in Logic ERP, or leave it empty.                       |
| `Duplicate DD_Cheque_No : … against Account Code : …`                                                | Two lines for the same account carry the same `DD_Cheque_No`.                                                                                                               | Send each number once per account.                                              |
| `DD_Cheque_No : … already exists in Voucher No. … against Account Code : …`                          | That number is already saved for the account on the bank payment shown.                                                                                                     | Check whether the payment was sent before; otherwise send another number.       |
| `Date Not Within The Current Financial Year...`                                                      | `VoucherDate` is outside the financial year of today.                                                                                                                       | Send a date in the current financial year.                                      |
| `Bank_Charges_AccountCode not defined for Bank_Charges...`                                           | `Bank_Charges` is above `0` and `Bank_Charges_AccountCode` is empty.                                                                                                        | Send the bank-charges account code.                                             |
| `Invalid Bank_Charges_AccountCode for Bank_Charges...`                                               | `Bank_Charges` is above `0` and `Bank_Charges_AccountCode` is not an expense, income or liability account.                                                                  | Send an expense, income or liability account code.                              |
| `Branch_Code or Branch_Short_Name is required.`                                                      | Neither `BranchCode` nor `BranchShortName` was sent.                                                                                                                        | Send the branch.                                                                |
| `Discount account is not set in the cash / bank configuration`                                       | A line has a `Discount` above `0`, and the configuration names no discount account (or none that is an income or expense account), or no settings are saved for the branch. | Send `Discount` as `0`, or ask your Logic ERP team to set the discount account. |
| `Cash/Bank Account Balance Not Within Limit. Exceeding by Rs…`                                       | The configuration's limit check is on and this payment would take the bank account's balance beyond the limit set for it.                                                   | Send a smaller payment, or ask your Logic ERP team.                             |
| `Invalid Payment Method : …`                                                                         | `PaymentMethod` is not one of the listed values.                                                                                                                            | Send a listed value, or leave it out for a cheque.                              |
| `Please select Cash A/c...`                                                                          | A line has `PaymentMethod` `Cash`, but its `AccountCode` is not a cash account.                                                                                             | Send another `PaymentMethod`.                                                   |
| `Cost Center selection required..... Please select cost center...`                                   | The configuration makes a cost centre compulsory and the line has none.                                                                                                     | Send `Cost_Center`.                                                             |
| `Modification rights not available for this date.....`                                               | `VoucherDate` is on or before the lock date of the API site's Logic ERP user.                                                                                               | Send a later date or ask your Logic ERP team.                                   |
| A message saying a field allows a maximum number of characters, followed by the value and its length | A text value is too long (for example a remark over 30 characters, or a `DD_Cheque_No` over 25 – over 15 for a cheque with the cheque-number register). Nothing was saved.  | Shorten the value.                                                              |
| `The operation was canceled.`                                                                        | Saving stopped at a later step without a reason. Nothing was saved.                                                                                                         | Retry once; if it repeats, send the `request_ID` to support.                    |
| `Branch_Short_Name : … not exists.`                                                                  | No branch has the `BranchShortName` you sent.                                                                                                                               | Send the short name exactly as in Logic ERP, or send `BranchCode`.              |
| A technical error with an empty `request_ID`                                                         | The request failed before Logic ERP started to save it; nothing was saved.                                                                                                  | Send the same request again.                                                    |
| Another technical error                                                                              | Saving failed inside Logic ERP; nothing was saved.                                                                                                                          | Retry once; if it repeats, send the `request_ID` to support.                    |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/accounts/push/save-a-bank-payment.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
