Payment Gateway (Stripe/PayTabs/HyperPay) → SAP B1 IncomingPayments
Gateway → SAP B1. payment_intent.succeeded webhook → find the open invoice via DocEntry stored in gateway metadata → POST /IncomingPayments with a PaymentInvoices array linking DocEntry + SumApplied. Fees are booked separately: pay gross to a gateway clearing account, expense the fee. Payout reports become journal entries moving clearing → bank. Refunds → CreditNotes + outgoing payment.
Steps in this flow
- Gateway: payment_intent.succeeded
- Verify Webhook Signature (HMAC)
- Guard: Payment Intent ID
- SL Login (B1SESSION)
- SL: GET Invoice by DocEntry (metadata)
- Refund Event?
- SL: POST /IncomingPayments (gross→clearing)
- SL: POST /CreditNotes (refund)
- Log Payment Result