> For the complete documentation index, see [llms.txt](https://kb.bevica.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.bevica.com/documentation/integration/bevica_website_integration/web_integration_-_payments.md).

# Web Integration - Payments

Map payment methods and import payment details from the website.

### Payments

There are usually three scenarios to consider:

* Order is paid as part of the website checkout process.
* Order is on account or not paid for during checkout.
* Payment against a Customer account

Where orders are paid as part of the checkout process and are likely to be Shipped and Invoiced in Business Central immediately, then using an appropriate **Payment Method Code** on either the Customer or the Web Order will post and reconcile the payment when the order is invoiced in Business Central. In this scenario, the Payment API is not necessarily required.

The Payment API is usually implemented if the posting to invoice in Business Central is likely to have a delay, as you will usually want the payment registered independently from the order, to be reconciled when the invoice is posted. Also, if Customers can make a payment against their account on the website – whether against specific invoices or against their account.

### Payment Journal Setup

In **Web Site Setup** set the following:

| Field                    | Usage                                                                                                                         |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------- |
| Payment Journal Template | The journal to use. Usually this will be ‘Cash Receipt’ journal.                                                              |
| Payment Journal Batch    | The journal batch to use. We would recommend setting a specific batch for web payments with an appropriate Balancing Account. |
| Payment Function         | This should be set to 'Standard' unless otherwise agreed with TVision                                                         |

Refer to standard Business Central documentation on journals: [Working with General Journals](https://learn.microsoft.com/en-gb/dynamics365/business-central/ui-work-general-journals#using-journal-templates-and-batches).

### Batch Balancing Account

If your 'Balancing Account' on the above is a Bank Account, then it must be one with no default Currency Code.

### API Fields

The field requirements from the payment API by your web developers will be specific to your implementation. These are general guidance notes.

For Payments against Sales Orders:

* ‘External Document No’ should be the same on the Web Order and Payment. This way both transactions (invoice and payment) will have the same reference to aid reconciliation.
* ‘Payment Reference’ should be the Web Order ID

For separate Payments independently of an order, then the fields will require specific mapping for your requirements.

The Currency Code should be blank for Local currency (LCY), though if the Currency Code is passed by the website which is the same as the **General Ledger Setup** 'Currency Code' value, the journal will convert the text to blank.

### Processing

Once a Payment has been submitted, navigate to the **Web Payments** page to review the submitted payments.

From the ribbon you can:

| Function                 | Usage                                                                                                  |
| ------------------------ | ------------------------------------------------------------------------------------------------------ |
| Process Selected Lines   | Validates the data and create Payment Journal Lines for valid lines for the lines selected by the user |
| Process All Entries      | As above, but does all 'Created' entries on the list                                                   |
| RollBack Error           | Only for entries which have 'Errored' status to allow you to correct the error and re-process          |
| Open Journal             | Opens the Payment Journal for posting.                                                                 |
| Delete Processed Entries | Removes lines which have been Processed.                                                               |

### Posting Journals

Once a **Web Payment** has been ‘Processed’ to create the Journal, there is no link between the Web Payment and the Journal. Users should not amend or edit the Business Central Journal and only Post it.

### Automation

The Process and Posting of Web Payments can be run on a Job Queue using PAYMPROCESS and PAYMPOST. Refer to the Job Queue section.


---

# 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 dynamically by asking a question.

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

```
GET https://kb.bevica.com/documentation/integration/bevica_website_integration/web_integration_-_payments.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
