FI Program Custom development Interface

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

  • F-28 Post Incoming Payments. Posts incoming payments manually; does not generate a payment link or read the virtual POS notification.
  • FBL5N Customer Line Items. Shows customer open items; does not give the customer a way to pay.

Tables used

The tables the program reads and updates. ECC and S/4HANA differences are marked separately.

TableRoleAccessSystem
BSIDCustomer Open ItemsCustomer open items (ECC); compatibility view in S/4HANAReadECC only
ACDOCAUniversal Journal Entry Line ItemsCustomer open items and clearing information (S/4HANA)ReadS/4HANA only
BKPFAccounting Document HeaderCollection document header and provider referenceWriteECC + S/4
BSEGAccounting Document SegmentCollection and clearing line itemsWriteECC + S/4
KNA1Customer Master (General Section)Customer name and address numberReadECC + S/4
ADR6E-Mail Addresses (Business Address Services)Email address the link is sent toReadECC + S/4
T012KHouse Bank AccountsBank sub-account used as the virtual POS clearing accountReadECC + 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

ParameterDescriptionTypeReference fieldRequiredExample
S_BUKRSCompany codeRange / multipleBSID-BUKRSYes1000
S_KUNNRCustomerRange / multipleBSID-KUNNRNo200118
S_XBLNRInvoice referenceRange / multipleBSID-XBLNRNoGIB2026000004512
P_KEYDTBalance key dateSingle valueBSID-ZFBDTNo18.11.2026
P_BALCreate the link for the total balance instead of invoicesCheckbox—No—
P_DAYSLink validity (days)Single value—No7

Result list columns

#ColumnSource
1Link numberCalculated Unique number assigned in the link table
2CustomerBSID-KUNNR
3Customer nameKNA1-NAME1
4Invoice referenceBSID-XBLNR
5Link amountBSID-WRBTR
6CurrencyBSID-WAERS
7Link statusCalculated Sent, opened, paid, partially paid or expired
8Paid amountCalculated Approved amount in the provider notification
9Collection documentBKPF-BELNR
10MessageCalculated Posting or clearing return message

Sample result list

Link numberCustomerCustomer nameInvoice referenceLink amountCurrencyLink statusPaid amountCollection documentMessage
PL-26-004581200118Örnek Ev Tekstili Ltd.GIB202600000451218,450TRYPaid18,4501400008812Collection posted, invoice cleared
PL-26-004582200342Demo Perakende A.Ş.62,300TRYPartially paid40,0001400008813Remaining 22,300 TRY open
PL-26-004583200510Anadolu Mağazacılık Ltd.GIB20260000044987,920TRYOpened
PL-26-004560300045Nordic Home GmbHEXP20260000008773,150EURExpiredA new link can be sent with a reminder
A view built with fictional sample data; not real system data.

How does the program work?

  1. 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).
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. 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

FI Report Custom ALV report

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. …

BSID · BSAD · KNA1 · KNB1

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.

Related report: Online Payment Link for Open Invoices and Customer Balance with Virtual POS Collection Posted to SAP