Skip to content

    Payment Fragment

    Payment Fragments securely process payment transactions across all applications.

    Learn more about Payment Fragments

    Learn more about payments

    Overview

    Every payment response is received by the calling app in the OnActivityResult (if we consider an application running on the terminal) or through the callbacks for Cloud API’s implementations only once the Payment Fragment is closed.

    This event is not necessarily synced with the completion of the transaction. With the standard configuration, once the transaction is concluded, the Payment Fragment will enable you and/or the cardholder to choose the type of receipt to be generated:

    • no receipt
    • paper receipt
    • digital receipt

    Up to this point, the Payment Fragment is still not closed and no response will be received by the app/web app that has started the payment. The app is waiting for a response.

    There are some attributes that can be added to the Payment object that will allow you to skip this step. This is applicable in case of a successful outcome of the transaction.

    Payment object attributes

    payment.setSkipPaymentConfirmationScreen(true);
    payment.setSkipReceiptScreen(true);
    payment.setAutoClose(true);

    By using these attributes, as soon as a transaction is successfully processed, the calling app will receive the payment response with all the needed information about the transaction.

    For the correct integration with the Nexi services, the following parameters of the Payment object always have to be set to FALSE:

    • cashbackAmount
    • offlineAuth
    • offlineApprovalCode
    • multiTender

    Transaction status

    You will have access to two different objects that determine the result of each transaction. These objects are:

    • PaymentStatus
    • TransactionStatus

    Nexi suggests using only the TransactionStatus object because it always reports the financial outcome of the transaction.

    The following are the most important and common TransactionStatus objects to be used when properly interpreting the correct outcome of a transaction.

    ValueDescription
    CAPTURED
    The transaction is completed successfully and stored in financial systems. This result refers to the payment and closure of pre-authorization transactions.

    AUTHORIZED
    The authorization request is completed successfully. This result refers to pre-authorization transactions only.

    VOIDED
    The reversal transaction has been completed successfully

    Was this helpful?

    What was your feeling about it?