Online Payment Link for Open Invoices and Customer Balance with Virtual POS Collection Posted to SAP
Short answer: A solution that emails customers an online payment link for an invoice number or their open balance, and posts the collection from the virtual POS in SAP automatically and clears the related invoice. The customer logs in on a simple payment page, sees the open items and pays by card; card data never enters SAP.
- Estimated effort
- L · 15–25 working days
- System
- ECC and S/4HANA
- Tables
- 7
- Scope
- Global
- Built by
- NeKuDos Teknoloji
- Last updated
Why is the standard not enough?
SAP manages open items, dunning and account statements, but it does not generate a payment link that works with virtual POS providers for an open invoice and does not post card collections automatically. When the collection is looked up in the virtual POS report and entered manually with F-28, which payment belongs to which invoice and the bank commission are matched afterwards.
Who uses it? Receivables and collection teams, finance managers, customer service and sales teams working with small dealers.
Closest standard alternatives
Tables used
The tables the program reads and updates. ECC and S/4HANA differences are marked separately.
| Table | Role | Access | System |
|---|---|---|---|
| BSIDCustomer Open Items | Customer open items (ECC); compatibility view in S/4HANA | Read | ECC only |
| ACDOCAUniversal Journal Entry Line Items | Customer open items and clearing information (S/4HANA) | Read | S/4HANA only |
| BKPFAccounting Document Header | Collection document header and provider reference | Write | ECC + S/4 |
| BSEGAccounting Document Segment | Collection and clearing line items | Write | ECC + S/4 |
| KNA1Customer Master (General Section) | Customer name and address number | Read | ECC + S/4 |
| ADR6E-Mail Addresses (Business Address Services) | Email address the link is sent to | Read | ECC + S/4 |
| T012KHouse Bank Accounts | Bank sub-account used as the virtual POS clearing account | Read | ECC + S/4 |
S/4HANA notes
- BSID → I_OperationalAcctgDocItem: In S/4HANA BSID is no longer filled as a separate index table; reads work through a compatibility view of the same name. For new developments the I_OperationalAcctgDocItem CDS view is recommended.
- T012K: In S/4HANA reads of T012K go through the compatibility view V_T012K_BAM; bank accounts are maintained in Bank Account Management (BAM).
BAPIs and functions used
- BAPI_AR_ACC_GETOPENITEMSCustomer Account Open Items at Key Date. Reads the open items covered by the link
- BAPI_AR_ACC_GETKEYDATEBALANCECustomer Account Balance at Key Date. Returns the key-date balance for a balance-based link
- BAPI_ACC_DOCUMENT_POSTAccounting: Post Document. Posts the virtual POS collection
- POSTING_INTERFACE_CLEARINGPost with Clearing via Internal Posting Interface. Clears the paid invoices
- SO_NEW_DOCUMENT_ATT_SEND_API1SAPoffice: Send New Document with Attachments. Emails the payment link and the collection receipt
Selection screen parameters
| Parameter | Description | Type | Reference field | Required | Example |
|---|---|---|---|---|---|
| S_BUKRS | Company code | Range / multiple | BSID-BUKRS | Yes | 1000 |
| S_KUNNR | Customer | Range / multiple | BSID-KUNNR | No | 200118 |
| S_XBLNR | Invoice reference | Range / multiple | BSID-XBLNR | No | GIB2026000004512 |
| P_KEYDT | Balance key date | Single value | BSID-ZFBDT | No | 18.11.2026 |
| P_BAL | Create the link for the total balance instead of invoices | Checkbox | — | No | — |
| P_DAYS | Link validity (days) | Single value | — | No | 7 |
Result list columns
| # | Column | Source |
|---|---|---|
| 1 | Link number | Calculated Unique number assigned in the link table |
| 2 | Customer | BSID-KUNNR |
| 3 | Customer name | KNA1-NAME1 |
| 4 | Invoice reference | BSID-XBLNR |
| 5 | Link amount | BSID-WRBTR |
| 6 | Currency | BSID-WAERS |
| 7 | Link status | Calculated Sent, opened, paid, partially paid or expired |
| 8 | Paid amount | Calculated Approved amount in the provider notification |
| 9 | Collection document | BKPF-BELNR |
| 10 | Message | Calculated Posting or clearing return message |
Sample result list
| Link number | Customer | Customer name | Invoice reference | Link amount | Currency | Link status | Paid amount | Collection document | Message |
|---|---|---|---|---|---|---|---|---|---|
| PL-26-004581 | 200118 | Örnek Ev Tekstili Ltd. | GIB2026000004512 | 18,450 | TRY | Paid | 18,450 | 1400008812 | Collection posted, invoice cleared |
| PL-26-004582 | 200342 | Demo Perakende A.Ş. | 62,300 | TRY | Partially paid | 40,000 | 1400008813 | Remaining 22,300 TRY open | |
| PL-26-004583 | 200510 | Anadolu Mağazacılık Ltd. | GIB2026000004498 | 7,920 | TRY | Opened | |||
| PL-26-004560 | 300045 | Nordic Home GmbH | EXP2026000000877 | 3,150 | EUR | Expired | A new link can be sent with a reminder |
How does the program work?
- The sending screen reads open items by company code, customer and invoice reference (BAPI_AR_ACC_GETOPENITEMS; BSID in ECC, ACDOCA in S/4HANA). The user creates a link for one invoice, selected invoices or the total balance at a key date (BAPI_AR_ACC_GETKEYDATEBALANCE).
- For each link a unique record with an expiry is kept in a custom link table: customer, items, amount, currency, expiry date. The link is sent to the customer’s email address (ADR6) with SO_NEW_DOCUMENT_ATT_SEND_API1.
- When the customer opens the link, the payment page asks for the customer number and a one-time code sent by email, then reads the open items covered by the link from SAP in real time. If an item has been cleared in the meantime, the page shows it as paid.
- Payment is made on the virtual POS provider’s hosted payment page; card data reaches neither SAP nor the payment page’s server. The provider’s result notification is received after its signature is verified.
- On a successful payment BAPI_ACC_DOCUMENT_POST posts a debit to the virtual POS clearing account (bank sub-account, T012K) and a credit to the customer; the paid invoices are cleared with POSTING_INTERFACE_CLEARING. In a partial payment the rest stays open. The provider reference is written to the reference fields of the document.
- When the bank credits the virtual POS collection with its value date, the clearing account is cleared by the bank statement (FF_5/FEBAN); the commission is posted to an expense account by a statement rule. The monitor shows sent, opened, paid and expired links and posting errors.
Performance notes
The payment page reads the customer's open items every time; limit the read to the documents covered by the link. Queue provider notifications and post them in order, so repeated notifications for the same payment do not create duplicate postings.
Features
- Send the result by email The link, reminders and the collection receipt are emailed to the customer.
- Line-by-line result and error log Each provider notification and posting result is stored.
- Runs as a background job Expired links and pending notifications are processed by a periodic job.
- ALV list (sort, filter, subtotals)
- Double-click drill-down to the document The collection document and the customer open the related screen.
Authorization objects
- F_BKPF_BUKCollection posting authorization by company code (interface user)
- F_BKPF_KOAAccount type authorization for customer and G/L postings
- S_OC_SENDSending external email from SAP
- S_RFCServices called by the payment page
Frequently asked questions
Is card data stored in SAP?
No. Card data is entered only on the virtual POS provider's hosted payment page. Only the payment result, amount, instalment information and the provider reference reach SAP, so card data security obligations stay with the provider.
How are instalment payments and bank commission accounted for?
The customer debt is cleared fully at the time of payment and the amount waits on the virtual POS clearing account. When the bank credits the money with its value date, a statement rule clears the clearing account and posts the commission difference to an expense account. Commission rates are not coded in the program; they come from the bank statement.
Can several virtual POS providers be used?
Yes. The provider connection is kept in a separate connector class; each provider is defined with its own clearing account and is chosen by company code or currency.
Related reports
Electronic Bank Statement Import and Automatic Posting Interface
A custom interface program that reads the account movements banks deliver in different formats (MT940, CAMT.053, bank XML or an Excel export) every …
Customer Receivables Aging Report
A custom ALV report that ages customer open items by net due date and shows down payments received and other special G/L items in the same list. …
Customer Account Statement and Balance Confirmation Email Program
A custom program that prepares a customer account statement as PDF, with opening balance, period movements, open items and closing balance, and sends …
Let us build this program for your system
Briefly describe your system and expectations. We will clarify the scope and come back with an effort and price quote.