In general front end will mostly load payment object in order to provide payment ID to CreatePaymentTransactionDataBuilder. This payment ID is used in turn by PaymentAdapterServiceImpl to load it again from API. We could save an additional unnecessary request by providing optional payment object within CreatePaymentTransactionDataBuilder. If payment object is set than existing object is reused otherwise paymentRef is used to refetch payment object.
In general front end will mostly load payment object in order to provide payment ID to CreatePaymentTransactionDataBuilder. This payment ID is used in turn by PaymentAdapterServiceImpl to load it again from API. We could save an additional unnecessary request by providing optional payment object within
CreatePaymentTransactionDataBuilder
. If payment object is set than existing object is reused otherwisepaymentRef
is used to refetch payment object.