startPayment method is the primary entry point for initiating a payment flow within your application using the Nayax eCom SDK. The method internally handles the calls to validateMerchant and initialize (the Nayax eCom API calls, not the SDK initialization). This means that you do not need to explicitly make these API calls before initiating a payment. The SDK will do the following:
- Perform the necessary
validateMerchantcall to authenticate the transaction securely. - Execute the
initializecall to set up the payment session with Nayax servers and the billing provider. - Trigger the Drop-In UI for the user to complete the payment.
PaymentData and handling the payment results, while the SDK takes care of the communication and security protocols.
Payment Data
ThestartPayment method requires a PaymentData object that encapsulates all the necessary details for the transaction.
Initiate a Sale Payment (Android)
The following example shows how to construct aPaymentData object for a standard sale transaction and pass it to startPayment():
Kotlin
See Also
Payment Callbacks
Handle the SDK’s payment result callbacks for Android and iOS.
Drop-in UI
Display a pre-configured list of payment methods anywhere on your site.