PaymentResultCallbackfor Android.PaymentResultfor iOS.
Payment Callback
See the code block below for an example of the callback interface.- Successful Transaction (
onPaymentComplete/.complete): This indicates that the payment process was completed, and the billing provider approved the transaction. - Transaction Failure (
onPaymentFail/.fail): This signifies that the transaction failed due to an issue originating from the Drop-In UI or the billing provider’s side, but not a general SDK error. - General Error (
onError/.error): This indicates that a more general error occurred during the transaction process, which might be related to the SDK’s internal state, network issues, or authentication problems.
Result Data Structures
The callback will return a data structure containing information related to the payment, depending on its outcome. See the sections below.PaymentCompleteData
The PaymentCompleteData data structure is received when a payment is successful and contains the following information:
PaymentFailData
The PaymentFailData data structure is received when a payment fails and contains the following information:
Error Types
The SDK provides several error types to help diagnose issues during a transaction. You can find them in the table below:See Also
Initiate Payments
Call startPayment to launch a payment flow with the Nayax eCom SDK.
Drop-in UI
Display a pre-configured list of payment methods anywhere on your site.