iOS Deep Linking Integration ## Sections • [Deep Linking](https://app.theneo.io/dejavoo/tap-to-pay-on-iphone/deep-linking.md): Tap to Pay on iPhone With iPOSgo! Via Deep Linking Integration Tap to Pay on iPhone with iPOSgo! is accessible through Deep Linking integration, allowing Independent Software Vendors (ISVs) to seamlessly integrate contactless payment acceptance into their applications. With this integration, third-party applications can initiate transactions, process payments through our Tap to Pay on iPhone With iPOSgo! payment app, and receive transaction results back in their own application. While the integration process is straightforward for developers, merchants must install both the third-party application and iPOSgo! to enable payment processing. Deep Linking Versions There are two versions of deep linking available: Version 1 (V1) Version 2 (V2) • [V2 (Version 2)](https://app.theneo.io/dejavoo/tap-to-pay-on-iphone/deep-linking/v2.md): iOS Deep Linking Integration - Version 2.0 Prerequisites The device region must be set to the US (United States). For Sandbox (UAT) Users should be onboarded on the iPOSpays sandbox(UAT) environment as a merchant and have a valid TPN. For Production (Live) Users should be onboarded on the iPOSpays production environment as a merchant and have a valid TPN. If you do not have a TPN, contact your ISO or devsupport@dejavoo.io . Set up Testing Environment Install Xcode Before setting up the testing device Use a separate device for testing. Only use the credentials given to you throughout the testing process. To get sandbox credentials, contact support@dejavoosystems.com Avoid changing the account during testing. Don't change the device's date and time. These rules apply only to the testing environment, not production. To Develop iOS Application , Create a new iOS project or use the existing project and configure the below app setup. Initially, we will use the new TPN. You must accept the Apple Tap-on-Phone Terms and Conditions before proceeding with the Tap-on-Pay transaction. Supported Devices & Versions OS Version Above 16.9 Tap to Pay on iPhone requires iPhone Xs or later. The SDK offers a flexible, parameter-driven UI configuration, allowing customization of the user interface based on the enabled or disabled states of specific features. For example, you have the option to not display the Tip, Transaction Breakup & Customer Approval Screens on the iPOSgo! app’s UI. Configure the URL Scheme Keys invokeApplink and ogApplink are case sensitive. Demo App Setup iPOSgo! Setup Configure the SDK Install the Applications The Demo App and iPOSgo! applications are installed via a link, and a Diawi link is created for testing purposes. The following URL is used to obtain the device’s UDID: https://get.udid.io/ After obtaining the UDID, the source file of the demo application is shared for review and implementation reference. • [TPN Register](https://app.theneo.io/dejavoo/tap-to-pay-on-iphone/deep-linking/v2/tpn-register.md): The TPN register is used to download the parameters to configure the merchant configuration data from the backend application portal. Always perform a parameter update in the iPOSgo! app after making any changes to parameter settings on the iPOSpays portal to ensure the latest configurations are applied. Watch This Video for a Visual Walkthrough of the Steps Input Request Parameters To access the SDK Reader wrapper class, import DeepLinking, and initiate an instance of the class as follows: import DeepLinking Create a variable to access the methods var readerInstance = Wrapper() API CALL Plain text struct RegisterData: Register { var tpn: String var merchantCode: String } let payload = RegisterData(tpn: "12345678912", merchantCode: "12345678912") readerInstance.downloadParameter(param: payload) struct RegisterData: Register { var tpn: String var merchantCode: String } let payload = RegisterData(tpn: "12345678912", merchantCode: "12345678912") readerInstance.downloadParameter(param: payload) Parameter Name Title Description Parameters Name Description TPN A unique 12-digit code assigned to the device that processes the transaction. merchantCode Unique code to identify the merchant Delegate Response and Error Handling To handle responses and errors from the SDK, implement the DLProtocolV2 delegate methods as shown below: Plain text extension ViewController: DLProtocolV2 { func didReceiveRespV2Error(err: String?) { print(">>>>>>ERROR :", err ?? "") } func didReceiveV2Response(success: URL?) { print(">>>>>url", success ?? "") } func didReceive_TransactionResponse(res: String?) { print(">>>res", res ?? "") } } extension ViewController: DLProtocolV2 { func didReceiveRespV2Error(err: String?) { print(">>>>>>ERROR :", err ?? "") } func didReceiveV2Response(success: URL?) { print(">>>>>url", success ?? "") } func didReceive_TransactionResponse(res: String?) { print(">>>res", res ?? "") } } Transaction Response Structure The didReceive_TransactionResponse(res:) method returns the following response, which allows the user to track transaction details : Plain text transactionData: { "TPN": "794525543578", "TimeStamp": "20250602115852", "TXN Ref No": "830266506984" } transactionData: { "TPN": "794525543578", "TimeStamp": "20250602115852", "TXN Ref No": "830266506984" } This response provides essential metadata for the transaction that was just processed. It includes: Title Description Parameters Name Description TPN A unique 12-digit code assigned to the device that processes the transaction. TimeStamp The exact date and time of the transaction, in YYYYMMDDhhmmss format. TXN Ref No A unique reference number assigned to the transaction. These values can be used to log, track , or reconcile transactions . To obtain the Merchant Code : Log in to the iPOSpays portal using a merchant account. Go to Settings → Generate ECOM/TOP Merchant Keys . Choose a Tap on Phone (TOP) TPN from the drop-down menu → copy the merchant code and save it. • [Perform Transactions](https://app.theneo.io/dejavoo/tap-to-pay-on-iphone/deep-linking/v2/tpn-register/perform-transactions.md): This API is used to invoke applications to perform the transaction. It supports: SALE REFUND PRE AUTH TICKET VOID BATCH SETTLEMENT For Sale, Refund, and Pre Auth transactions, ensure that you use the same startTransaction to call their respective APIs. The tranType parameter must be adjusted according to the transaction type. Initiate Transactions Use the deepLink.startTransaction to initiate the transactions. API Call ExamplesAPI Call Examples The structure and API call method are consistent for Sale, Refund, and Pre Auth transactions. You can use it for all three transaction types. Plain text // Define the PayloadParameter struct struct TxnData: PayloadParameter { var amount: String var tipAmount: String? var feeAmount: String? var currencyCode: CurrencyCode var tranType: TransType var showTipScreen: Bool? var showBreakUpScreen: Bool? var showApprovalScreen: Bool? } // Payload of saleStruct let sale = TxnData ( amount: 1, currencyCode: .USD, tranType: .SALE, tipAmount: 1.00, //Optional feeAmount: 5.00, //Optional showTipScreen: true, //Optional showBreakUpScreen: true, //Optional showApprovalScreen: true //Optional ) // Start the transaction using this method. readerInstance.startTransaction(param: sale, delegate: self) // Define the PayloadParameter struct struct TxnData: PayloadParameter { var amount: String var tipAmount: String? var feeAmount: String? var currencyCode: CurrencyCode var tranType: TransType var showTipScreen: Bool? var showBreakUpScreen: Bool? var showApprovalScreen: Bool? } // Payload of saleStruct let sale = TxnData ( amount: 1, currencyCode: .USD, tranType: .SALE, tipAmount: 1.00, //Optional feeAmount: 5.00, //Optional showTipScreen: true, //Optional showBreakUpScreen: true, //Optional showApprovalScreen: true //Optional ) // Start the transaction using this method. readerInstance.startTransaction(param: sale, delegate: self) Transaction Example Using Deep Linking V2 • [Sale Transactions](https://app.theneo.io/dejavoo/tap-to-pay-on-iphone/deep-linking/v2/tpn-register/perform-transactions/sale-transactions.md): A Sale transaction is the most common type of payment operation performed. It represents a standard purchase where the customer pays for goods or services using a supported payment method, such as a credit card, debit card, or tap to pay . Import the payload provided below into your code to perform sale transactions. Plain text // Payload of saleStruct let sale = TxnData ( amount: 1, currencyCode: .USD, tranType: .SALE, tipAmount: 1.00, //Optional feeAmount: 5.00, //Optional showTipScreen: true, //Optional showBreakUpScreen: true, //Optional showApprovalScreen: true //Optional ) // Start the transaction using this method. readerInstance.startTransaction(param: sale, delegate: self) // Payload of saleStruct let sale = TxnData ( amount: 1, currencyCode: .USD, tranType: .SALE, tipAmount: 1.00, //Optional feeAmount: 5.00, //Optional showTipScreen: true, //Optional showBreakUpScreen: true, //Optional showApprovalScreen: true //Optional ) // Start the transaction using this method. readerInstance.startTransaction(param: sale, delegate: self) Below is the tabular representation of the Sale Struct payload: Title Description Title Description Parameters Name Type Description Sample tranType * Enum Specifies the type of transaction, such as SALE. .SALE amount * String Transaction amount 10.00 tipAmount String Tip amount (optional) 1.00 feeAmount Decimal The additional fee amount, if applicable. 5.00 currencyCode * Enum Transaction currency .usd showTipScreen Bool Determines whether the tip input screen should be displayed. TRUE showBreakUpScreen Bool Determines whether the amount breakdown screen should be displayed. TRUE showApprovalScreen Bool Determines whether the approval confirmation screen should be displayed. TRUE • [Refund Transactions](https://app.theneo.io/dejavoo/tap-to-pay-on-iphone/deep-linking/v2/tpn-register/perform-transactions/refund-transactions.md): A standalone Refund transaction is used to return funds to a customer for a previously completed Sale transaction. This type of refund is not linked to the original transaction via the RRN (Retrieval Reference Number). Instead, it is initiated as a separate transaction , typically performed after the batch containing the original sale has been settled . Refunds are commonly used when: A product is returned A service is canceled An overcharge or billing error needs to be corrected Because it occurs post-settlement, a standalone refund ensures that the original sale has already been finalized before reversing the amount. Import the payload provided below into your code to perform sale transactions. Plain text // Refund Transaction let refund = TxnData( amount: "10.00", currencyCode: .USD, tranType: .REFUND, showApprovalScreen: true ) // Start the transaction using this method. readerInstance.startTransaction(param: refund, delegate: self) // Refund Transaction let refund = TxnData( amount: "10.00", currencyCode: .USD, tranType: .REFUND, showApprovalScreen: true ) // Start the transaction using this method. readerInstance.startTransaction(param: refund, delegate: self) • [Pre Auth Transactions](https://app.theneo.io/dejavoo/tap-to-pay-on-iphone/deep-linking/v2/tpn-register/perform-transactions/pre-auth-transactions.md): A Pre-Authorization (Pre-Auth) transaction is used to place a temporary hold on a customer’s funds without immediately capturing the payment. This is commonly used in industries such as hospitality, car rentals, or services where the final amount may vary at checkout. The transaction must later be completed using a Ticket transaction, where the final amount (including tips, fees, or taxes) is captured. Import the payload provided below into your code to perform Pre Auth transactions. Plain text // Pre Auth Transaction let preAuth = TxnData( amount: "10.00", currencyCode: .USD, tranType: .PRE_AUTH, showApprovalScreen: true ) // Start the transaction using this method. readerInstance.startTransaction(param: preAuth, delegate: self) // Pre Auth Transaction let preAuth = TxnData( amount: "10.00", currencyCode: .USD, tranType: .PRE_AUTH, showApprovalScreen: true ) // Start the transaction using this method. readerInstance.startTransaction(param: preAuth, delegate: self) • [Ticket Transactions](https://app.theneo.io/dejavoo/tap-to-pay-on-iphone/deep-linking/v2/tpn-register/perform-transactions/ticket-transactions.md): A Ticket transaction is used to finalize and capture a previously initiated Pre-Authorization (Pre-Auth) . Once the goods or services have been delivered and the final amount is confirmed, the merchant uses the Ticket function to complete the payment. To perform a Ticket transaction, the RRN (Retrieval Reference Number) from the original Pre-Auth transaction is required. This allows the system to locate and complete the correct authorization. Import the payload provided below into your code to perform Ticket transactions. Plain text // Define the Ticket struct struct TicketTxnData: TicketPayloadParameter { var amount: String? var tipAmount: String? var feeAmount: String? var currencyCode: CurrencyCode var tranType: TransType var showTipScreen: Bool? var showBreakUpScreen: Bool? var showApprovalScreen: Bool? var rrn: String } // Payload of Ticket let ticket = TicketTxnData ( currencyCode: .USD, tranType: .TICKET, amount: 10.00, //Optional tipAmount: 1.00, //Optional feeAmount: 1.00, //Optional showTipScreen: false, //Optional showBreakUpScreen: true, //Optional showApprovalScreen: false, //Optional rrn: "123445667788" ) // Start the transaction using this method. readerInstance.startTicket(params: ticket, delegate: self) // Define the Ticket struct struct TicketTxnData: TicketPayloadParameter { var amount: String? var tipAmount: String? var feeAmount: String? var currencyCode: CurrencyCode var tranType: TransType var showTipScreen: Bool? var showBreakUpScreen: Bool? var showApprovalScreen: Bool? var rrn: String } // Payload of Ticket let ticket = TicketTxnData ( currencyCode: .USD, tranType: .TICKET, amount: 10.00, //Optional tipAmount: 1.00, //Optional feeAmount: 1.00, //Optional showTipScreen: false, //Optional showBreakUpScreen: true, //Optional showApprovalScreen: false, //Optional rrn: "123445667788" ) // Start the transaction using this method. readerInstance.startTicket(params: ticket, delegate: self) Tabular Representation of the Ticket Payload Title Description Title Description Parameters Name Type Description Sample tranType * Enum Specifies the type of transaction, e.g., TICKET. .TICKET amount * String The total transaction amount. 10.00 tipAmount String Additional tip amount, if applicable. 1.00 feeAmount String Additional fee amount, if applicable. 2.00 currencyCode * Enum The currency in which the transaction is processed. .usd showTipScreen Bool Determines whether the tip input screen should be displayed. FALSE showBreakUpScreen Bool Determines whether the amount breakdown screen should be displayed. TRUE showApprovalScreen Bool Determines whether the approval confirmation screen should be displayed. FALSE rrn * String Unique identifier to track the transaction from TXN response 123536758578 • [Void Transactions](https://app.theneo.io/dejavoo/tap-to-pay-on-iphone/deep-linking/v2/tpn-register/perform-transactions/void-transactions.md): A Void transaction is used to cancel a sale or refund before it has been settled . Unlike a refund, which returns funds after a transaction has been finalized, a void stops the transaction from completing and prevents it from appearing in the customer’s bank account. To void a specific transaction, the RRN (Retrieval Reference Number) of the original sale or refund is required. This ensures the app targets and cancels the correct transaction before it is submitted for settlement. Import the payload provided below into your code to void a transaction. Plain text // MARK: - PayloadParameter [Void] struct VoidTxnData: VoidPayloadParameter { var rrn: String, // Reference Retrieval Number var tranType: TransType, // Transaction Type var showApprovalScreen: Bool? //Optional } let void = VoidTxnData( rrn: "502213502779", // Sample RRN tranType: .VOID, // Void transaction type showApprovalScreen: true ) // Start the Void transaction using this method. readerInstance.startVoid(params: void, delegate: self) // MARK: - PayloadParameter [Void] struct VoidTxnData: VoidPayloadParameter { var rrn: String, // Reference Retrieval Number var tranType: TransType, // Transaction Type var showApprovalScreen: Bool? //Optional } let void = VoidTxnData( rrn: "502213502779", // Sample RRN tranType: .VOID, // Void transaction type showApprovalScreen: true ) // Start the Void transaction using this method. readerInstance.startVoid(params: void, delegate: self) Parameter Name Title Description Title Description Parameters Name Type Description Sample rrn * String Unique transaction ID 502213502779 tranType * Enum Transaction type .VOID showApprovalScreen Bool Determines whether the approval confirmation screen should be displayed. FALSE • [Batch Settlement](https://app.theneo.io/dejavoo/tap-to-pay-on-iphone/deep-linking/v2/tpn-register/perform-transactions/batch-settlement.md): Batch Settlement is the process of finalizing and submitting all approved transactions collected over a period (typically a day) to the payment processor for funding. Once a batch is settled, the transactions are sent for clearing, and the merchant’s bank account is credited accordingly. Use startBatchSettlement for batch settlements: API Call Example deepLink.startBatchSettlement( delegate: self) Plain text { "transaction_title": "settlements", "Tpn": "794524937054", "transaction_type": 7, "batch_no": 243, "timeStamp": "20241219114620", "transaction_id": "84566476174593705420241219114620", "status": "BATCH SETTLED", "statusCode": "00" } { "transaction_title": "settlements", "Tpn": "794524937054", "transaction_type": 7, "batch_no": 243, "timeStamp": "20241219114620", "transaction_id": "84566476174593705420241219114620", "status": "BATCH SETTLED", "statusCode": "00" } • [Sample Responses](https://app.theneo.io/dejavoo/tap-to-pay-on-iphone/deep-linking/v2/tpn-register/sample-responses.md): Transaction Response Plain text { "Spin_Response": { "RefId": "688041066395", "AuthCode": "DSC380", "PNRef": "400907500270", "TransNum": "4", "ResultCode": "0", "Message": "APPROVED", "RespMsg": "APPROVAL DSC380", "PaymentType": "credit", "ExtData": { "Amount": "10.00", "Tip": "1.00", "Fee": "0.40", "BatchNum": "121", "AcntLast4": "5859", "AcntFirst4": "3530", "FeeLabel": "Custom Fee", "BaseAmount": "10.00", "TaxCity": "1.00", "Tax1Label": "Local Tax", "TaxState": "1.00", "Tax2Label": "State Tax", "RespCode": "00", "RRN": "400907500270", "TraceNum": "4", "HostTxnId": "123456789012345", "txnId": "00000433772392582420240109012159", "TxnType": "1", "EntryType": "tap-on-phone", "TotalAmt": "13.40", "TaxAmount": "2.00", "txnLabel": "Sale", "networkMode": "WIFI", "DateTime": "20240222173537" }, "iPOSToken": "CE268D77935FDBF3F9C72E8894A1F410B3A2856F37999A88F347B002BB5E3AD7", "HostResponseCode": "00", "HostResponseMessage": "APPROVAL DSC380" } } { "Spin_Response": { "RefId": "688041066395", "AuthCode": "DSC380", "PNRef": "400907500270", "TransNum": "4", "ResultCode": "0", "Message": "APPROVED", "RespMsg": "APPROVAL DSC380", "PaymentType": "credit", "ExtData": { "Amount": "10.00", "Tip": "1.00", "Fee": "0.40", "BatchNum": "121", "AcntLast4": "5859", "AcntFirst4": "3530", "FeeLabel": "Custom Fee", "BaseAmount": "10.00", "TaxCity": "1.00", "Tax1Label": "Local Tax", "TaxState": "1.00", "Tax2Label": "State Tax", "RespCode": "00", "RRN": "400907500270", "TraceNum": "4", "HostTxnId": "123456789012345", "txnId": "00000433772392582420240109012159", "TxnType": "1", "EntryType": "tap-on-phone", "TotalAmt": "13.40", "TaxAmount": "2.00", "txnLabel": "Sale", "networkMode": "WIFI", "DateTime": "20240222173537" }, "iPOSToken": "CE268D77935FDBF3F9C72E8894A1F410B3A2856F37999A88F347B002BB5E3AD7", "HostResponseCode": "00", "HostResponseMessage": "APPROVAL DSC380" } } Batch Settlement Response Plain text { "transaction_title": "settlements", "Tpn": "794524937054", "transaction_type": 7, "batch_no": 243, "timeStamp": "20241219114620", "transaction_id": "84566476174593705420241219114620", "status": "BATCH SETTLED", "statusCode": "00" } { "transaction_title": "settlements", "Tpn": "794524937054", "transaction_type": 7, "batch_no": 243, "timeStamp": "20241219114620", "transaction_id": "84566476174593705420241219114620", "status": "BATCH SETTLED", "statusCode": "00" } Transaction Response Details Title Description Title Description Field Type Description Sample RefId * string Unique reference ID assigned to the transaction. 688041066395 AuthCode * string Unique transaction hash key. 83398129492534106720240723110923 PNRef * string RRN number used to track transaction details. 400907500270 TransNum * string Invoice number 4 ResultCode * string For a successful transaction, the code is 0 or 00. If the code is anything else (!= 0), the transaction is considered a failure. 00 Message * string General message from the payment processor after completing the transaction. APPROVED RespMsg * string Additional processor message, sometimes with more detail. APPROVAL DSC380 PaymentType * string Indicates whether the transaction was made via credit or debit. credit CardType * string The type of card used in the transaction. VISA, MASTERCARD Amount * string Base transaction amount before taxes, tips, or fees. 10.00 Tip string Tip amount, if tip was enabled for the TPN and applied. $1.00 TaxCity string Local tax amount, if local tax is enabled. Local fee may also apply if configured. 2.00 Tax1Label string Label for the local tax (Tax 1), set in edit parameters on the portal. Local Tax TaxState string State tax amount, if state tax is enabled. A state-level fee may also apply if configured. 1.00 Tax2Label string Label for the state tax (Tax 2), set in edit parameters on the portal. State Tax Fee string Fee amount applied to the transaction, as configured in the portal under Edit Parameters. 0.40 FeeLabel string Label assigned to the custom fee in the portal (e.g., “Custom Fee”). Custom Fee BaseAmount * string The original transaction amount before taxes, tips, and fees. 10.00 BatchNum * string The batch number the transaction belongs to. Batches are used for settlement. 121 AcntLast4 * string Last four digits of the customer’s card number used in the transaction. 5859 AcntFirst4 string First four digits of the card number used in the transaction. 3530 TotalAmt * string Total amount charged for the transaction, including taxes, tip, and fee. 13.40 TaxAmount string Combined total of applicable taxes (e.g., city, state). 2.00 RespCode * string For a successful transaction, the code is 0 or 00. If the code is anything else (!= 0), the transaction is considered a failure. 00 RRN * string Retrieval Reference Number (RRN) for the transaction, used for tracking and reconciliation. 400907500270 TraceNum * string The invoice or trace number for the transaction. Typically used for internal tracking. 4 HostTxnId * string Transaction ID assigned by the acquiring host system. 123456789012345 txnId * string Unique transaction ID used for tracking. 00000433772392582420240109012159 TxnType * string Indicates the type of transaction (e.g., 1 = Sale, 2 = Refund, etc.). 1 EntryType * string How the card data was entered (e.g., tap-on-phone, chip, manual entry). tap-on-phone txnLabel * string A short text label indicating the transaction type (e.g., sale, refund). sale networkMode string Type of network used by the device at the time of transaction (e.g., WIFI, LTE, Ethernet). WIFI DateTime * string Timestamp of the transaction in YYYYMMDDhhmmss format. 20240222173537 iPOSToken * string A unique token generated by the iPOS system that can be used to reference the transaction securely. CE268D77935FDBF3F9C72E7 HostResponseCode * string The host system’s response code. For a successful transaction, the code is 0 or 00. If the code is anything else (!= 0), the transaction is considered a failure. 00 HostResponseMessage * string Text response from the host system indicating transaction status. APPROVAL DSC380 • [Sample Source Code](https://app.theneo.io/dejavoo/tap-to-pay-on-iphone/deep-linking/v2/sample-source-code.md): Tap to Pay on iPhone Deep Linking Add description here • [Error Codes and Their Meaning](https://app.theneo.io/dejavoo/tap-to-pay-on-iphone/deep-linking/v2/error-codes-and-their-meaning.md): For a complete list of error codes and their explanations, please visit our Error Codes Reference Page. Description Error Codes and Messages • [Support](https://app.theneo.io/dejavoo/tap-to-pay-on-iphone/deep-linking/v2/support.md): Email us directly at devsupport@denovosystem.com with any questions or suggestions. • [V1 (Version 1)](https://app.theneo.io/dejavoo/tap-to-pay-on-iphone/deep-linking/v1-version-1.md): iOS Deep Linking Integration - Version 1.0 Prerequisites The device region must be set to the US (United States). For Sandbox (UAT) Users should be onboarded on iPOSpays sandbox(UAT) environment as a merchant and have a valid TPN. For Production (Live) Users should be onboarded on iPOSpays production environment as a merchant and have a valid TPN. If you do not have a TPN, contact your ISO or devsupport@dejavoo.io . Setup Testing Environment Install Xcode Before setting up the testing device Use a separate device for testing. Only use the credentials given to you throughout the testing process. To get sandbox credentials, contact support@dejavoosystems.com Avoid changing the account during testing. Don't change the device's date and time. These rules apply only to the testing environment, not production. Watch This Video for a Visual Walkthrough of the Steps To Develop iOS Application , Create a new iOS project or use the existing project and configure the below app setup. Initially, we will use the new TPN. You must accept the Apple Tap-on-Phone Terms and Conditions before proceeding with the Tap-on-Pay transaction. Supported Device's & version's OS Version Above 16.9 Tap to Pay on iPhone requires iPhone Xs or later. Configure the URL Scheme Keys invokeApplink and ogApplink are case sensitive. Demo App Setup iPosGo! Setup Configure the SDK Install the Applications To install Demo App and iPosGo!! Application via link. I’ll create a diawi Link for testing purposes using this url to obtain the UDID for your device. I can now share the source file of the Demo application so that you can see how it is implemented. https://get.udid.io/ • [TPN Register](https://app.theneo.io/dejavoo/tap-to-pay-on-iphone/deep-linking/v1-version-1/tpn-register.md): TPN register is used to download the parameters to configure the merchant configuration data from the backend application portal. Watch This Video for a Visual Walkthrough of the Steps Input Request Parameters: Title Description Title Description Field Type Description Example tpn * string It’s a Unique 12-digit code. This value is unique for each merchant. 123456789012 applicationType string The application type is used to identify the application IPosGo! To access the SDK Reader wrapper class, import DeepLinking, and initiate an instance of the class as follows: import DeepLinking Create a variable to access the methods var deepLinkVariable = Wrapper() Access makeARequestBasedOnTPN() on deepLinkVariable deepLinkVariable.makeARequestBasedOnTPN(tpnNo: tpn, delegate: self) Below snippet helps to make a connection between the iPosGo! and Demo App. Plain text func didReceiveResponse(sucess success: URL?) { if UIApplication.shared.canOpenURL(success!) { UIApplication.shared.open(success!, options: [:]) { result in print(result) } } else { print("App Not Installed in the Device!") } } func didReceiveResponse(sucess success: URL?) { if UIApplication.shared.canOpenURL(success!) { UIApplication.shared.open(success!, options: [:]) { result in print(result) } } else { print("App Not Installed in the Device!") } } • [Perform Transactions](https://app.theneo.io/dejavoo/tap-to-pay-on-iphone/deep-linking/v1-version-1/perform-transactions.md): This api is used to Demo application to perform the transaction. It supports SALE, REFUND, VOID, PRE-AUTH & TICKET transaction types. Watch this video for a visual walkthrough of the steps. Input Request Parameters Title Description Title Description Field Type Description Example type * string Transaction type [SALE, REFUND, PREAUTH] sale amount * string Transaction Amount 10.00 Access makeARequestBasedOnTransactionTypes() on deepLinkVariable Plain text deepLinkVariable.makeARequestBasedOnTransactionTypes(type: Type, Amount: Amount, delegate: self) deepLinkVariable.makeARequestBasedOnTransactionTypes(type: Type, Amount: Amount, delegate: self) 2. Below snippet helps to make a sale transaction. Plain text func didReceiveResponse(success: URL?) { if UIApplication.shared.canOpenURL(success!) { UIApplication.shared.open(success!, options: [:]) { result in print(result) } } else { txtResponse.text = "" showAlert(alertMessage: "App Not Installed in the Device!") } } func didReceiveResponse(success: URL?) { if UIApplication.shared.canOpenURL(success!) { UIApplication.shared.open(success!, options: [:]) { result in print(result) } } else { txtResponse.text = "" showAlert(alertMessage: "App Not Installed in the Device!") } } • [VOID, TICKET](https://app.theneo.io/dejavoo/tap-to-pay-on-iphone/deep-linking/v1-version-1/perform-transactions/void-ticket.md): Input Request Parameters Title Description Title Description Field Type Description Example type * string Transaction type [VOID, TICKET] ticket rrn * string Its Unique identifier to track the transaction from TXN response 1234567890 Access makeARequestBasedOnTransactionTypes() on deepLinkVariable deepLinkVariable.makeARequestBasedOnTransactionTypes(type: Type, Amount: rrn, delegate: self) 2. Below snippet helps to make a void transaction. Plain text func didReceiveResponse(success: URL?) { if UIApplication.shared.canOpenURL(success!) { UIApplication.shared.open(success!, options: [:]) { result in print(result) } } else { txtResponse.text = "" showAlert(alertMessage: "App Not Installed in the Device!") } } func didReceiveResponse(success: URL?) { if UIApplication.shared.canOpenURL(success!) { UIApplication.shared.open(success!, options: [:]) { result in print(result) } } else { txtResponse.text = "" showAlert(alertMessage: "App Not Installed in the Device!") } } • [BATCH](https://app.theneo.io/dejavoo/tap-to-pay-on-iphone/deep-linking/v1-version-1/perform-transactions/batch.md): Input Request Parameters Title Description Title Description Field Type Description Example type * string Transaction type [BATCH/ SETTLEMENTS] batch amount string Transaction Amount Access makeARequestBasedOnTransactionTypes() on deepLinkVariable deepLinkVariable.makeARequestBasedOnTransactionTypes(type: Type, Amount :"", delegate: self) 2. Below snippet helps to make a batch settlement . Plain text func didReceiveResponse(success: URL?) { if UIApplication.shared.canOpenURL(success!) { UIApplication.shared.open(success!, options: [:]) { result in print(result) } } else { txtResponse.text = "" showAlert(alertMessage: "App Not Installed in the Device!") } } func didReceiveResponse(success: URL?) { if UIApplication.shared.canOpenURL(success!) { UIApplication.shared.open(success!, options: [:]) { result in print(result) } } else { txtResponse.text = "" showAlert(alertMessage: "App Not Installed in the Device!") } } • [Transaction Response](https://app.theneo.io/dejavoo/tap-to-pay-on-iphone/deep-linking/v1-version-1/transaction-response.md): iPosGo! Call back the result in Demo like this. You can fetch the details. Plain text { { [ "Card": { AID = A000000025010801; Label = AMEX; MaskedPan = 3767522012; }, "BaseAmt": ["Amt": "100", "Label": "Amount"], "TxDetail": {DateNTime = 20240515191215; Tpn = 544424127175; TraceNo = 1; }, "BaseFee": ["Amt": "5", "Label": "BaseFee"], "Tax2": ["Amt": "21", "Label": "Tax2"], "surveyAns": "1", "Currency": "840", "Tip": ["Amt": "20", "Label": "Tip"], "Tax1": ["Amt": "11", "Label": "Tax1"], "Response": { AppCode = AXS802; BatchNo = 63; CardType = CREDIT; DTxId = 03430717348412717520240515191215; HTxId = 000000321000803; InvoiceNo = 5; RespCode = 00; RespMsg = "APPROVAL AXS802 "; Rrn = 413613500098; TxRefNo = 034307173484; } ] "Date" : "03.09.2023" } } { { [ "Card": { AID = A000000025010801; Label = AMEX; MaskedPan = 3767522012; }, "BaseAmt": ["Amt": "100", "Label": "Amount"], "TxDetail": {DateNTime = 20240515191215; Tpn = 544424127175; TraceNo = 1; }, "BaseFee": ["Amt": "5", "Label": "BaseFee"], "Tax2": ["Amt": "21", "Label": "Tax2"], "surveyAns": "1", "Currency": "840", "Tip": ["Amt": "20", "Label": "Tip"], "Tax1": ["Amt": "11", "Label": "Tax1"], "Response": { AppCode = AXS802; BatchNo = 63; CardType = CREDIT; DTxId = 03430717348412717520240515191215; HTxId = 000000321000803; InvoiceNo = 5; RespCode = 00; RespMsg = "APPROVAL AXS802 "; Rrn = 413613500098; TxRefNo = 034307173484; } ] "Date" : "03.09.2023" } } Payment Session Errors Plain text enum PaymentSessionError: String { case notAllowed = "Account not allowed." case backgroundRequestNotAllowed = "Background request not allowed." case unsupported = "Unsupported hardware or a problem with the device" case osVersionNotSupported = "Please update your app to the latest iOS version." case modelNotSupported = "Current device doesn't support NFC." case networkError = "Please check your network settings and try again." case networkAuthenticationError = "An authentication error occurred during the server connection." case serviceConnectionError = "Internal service is unavailable." case notReady = "Please try the session again to resolve the issue." case emptyReaderToken = "The token is empty, making it invalid." case prepareExpired = "Please reinitiate the session to try again" case tokenExpired = "Token Expired." case readerMemoryFull = "The card reader is busy." case accountNotLinked = "Accept the Terms and Conditions using a valid Apple ID." case accountAlreadyLinked = "Terms and Conditions have already been accepted." case accountLinkingFailed = "The system couldn't link or relink the merchant using the provided Apple ID." case accountLinkingRequiresiCloudSignIn = "Please accept the Terms and Conditions on your device while signed into iCloud" case accountLinkingCancelled = "The linking or relinking operation has been canceled." case merchantBlocked = "The merchant is blocked" case invalidMerchant = "The merchant is invalid or unknown" case somethingWentWrong = "" } enum PaymentSessionError: String { case notAllowed = "Account not allowed." case backgroundRequestNotAllowed = "Background request not allowed." case unsupported = "Unsupported hardware or a problem with the device" case osVersionNotSupported = "Please update your app to the latest iOS version." case modelNotSupported = "Current device doesn't support NFC." case networkError = "Please check your network settings and try again." case networkAuthenticationError = "An authentication error occurred during the server connection." case serviceConnectionError = "Internal service is unavailable." case notReady = "Please try the session again to resolve the issue." case emptyReaderToken = "The token is empty, making it invalid." case prepareExpired = "Please reinitiate the session to try again" case tokenExpired = "Token Expired." case readerMemoryFull = "The card reader is busy." case accountNotLinked = "Accept the Terms and Conditions using a valid Apple ID." case accountAlreadyLinked = "Terms and Conditions have already been accepted." case accountLinkingFailed = "The system couldn't link or relink the merchant using the provided Apple ID." case accountLinkingRequiresiCloudSignIn = "Please accept the Terms and Conditions on your device while signed into iCloud" case accountLinkingCancelled = "The linking or relinking operation has been canceled." case merchantBlocked = "The merchant is blocked" case invalidMerchant = "The merchant is invalid or unknown" case somethingWentWrong = "" } Card Reader Session Errors Plain text enum CardReaderSessionError: String { case cardReadFailed = "The reader was unable to read a card" case invalidAmount = "Amount must be positive and contain less than 10 digits." case invalidCurrencyCode = "Currency code in the request must follow the ISO 4217 standard." case nfcDisabled = "The user needs to enable their NFC" case noReaderSession = "No reader session is available or the session isn't ready." case passcodeDisabled = "Passcode disabled. Please set a security passcode on your device." case paymentCardDeclined = "The payment card declined the transaction." case paymentReadFailed = "An internal failure prevented the read operation." case pinCancelled = "The current PIN capture was canceled, thereby canceling any ongoing read operation." case pinNotAllowed = "The time window for capturing a PIN after a card read has expired." case pinEntryFailed = "An error occurred when capturing the PIN." case pinEntryTimeout = "The ongoing PIN capture was not completed within the given time." case pinTokenInvalid = "An error that indicates an invalid PIN token." case readFromBackgroundError = "Read operations aren't allowed when an app is running in the background." case readNotAllowed = "This error usually occurs when there's an entitlement issue." case readNotAllowedDuringCall = "Read operations aren't allowed during a phone call." case readerServiceConnectionError = "The session wasn't able to connect the system UI or other services" case readerServiceError = "Reader service internal state issue occurred." case readerSessionAuthenticationError = "An authentication error occurred while refreshing reader session" case readerSessionBusy = "The reader is busy with another session." case readerSessionExpired = "The reader session expired and couldn't refresh due to other state changes." case readerSessionNetworkError = "Network error occurred that prevented a reader session refresh." case readerTokenExpired = "The configuration token for the reader session expired." case vasReadFail = "Error occurred when reading a loyalty pass." case invalidReaderToken = "Invalid reader token" case prepareFailed = "Prepare session failed" } enum CardReaderSessionError: String { case cardReadFailed = "The reader was unable to read a card" case invalidAmount = "Amount must be positive and contain less than 10 digits." case invalidCurrencyCode = "Currency code in the request must follow the ISO 4217 standard." case nfcDisabled = "The user needs to enable their NFC" case noReaderSession = "No reader session is available or the session isn't ready." case passcodeDisabled = "Passcode disabled. Please set a security passcode on your device." case paymentCardDeclined = "The payment card declined the transaction." case paymentReadFailed = "An internal failure prevented the read operation." case pinCancelled = "The current PIN capture was canceled, thereby canceling any ongoing read operation." case pinNotAllowed = "The time window for capturing a PIN after a card read has expired." case pinEntryFailed = "An error occurred when capturing the PIN." case pinEntryTimeout = "The ongoing PIN capture was not completed within the given time." case pinTokenInvalid = "An error that indicates an invalid PIN token." case readFromBackgroundError = "Read operations aren't allowed when an app is running in the background." case readNotAllowed = "This error usually occurs when there's an entitlement issue." case readNotAllowedDuringCall = "Read operations aren't allowed during a phone call." case readerServiceConnectionError = "The session wasn't able to connect the system UI or other services" case readerServiceError = "Reader service internal state issue occurred." case readerSessionAuthenticationError = "An authentication error occurred while refreshing reader session" case readerSessionBusy = "The reader is busy with another session." case readerSessionExpired = "The reader session expired and couldn't refresh due to other state changes." case readerSessionNetworkError = "Network error occurred that prevented a reader session refresh." case readerTokenExpired = "The configuration token for the reader session expired." case vasReadFail = "Error occurred when reading a loyalty pass." case invalidReaderToken = "Invalid reader token" case prepareFailed = "Prepare session failed" } Custom Error Messages Plain text enum CustomErrorMessage: String { case entitlementIssue = "Please check the tap on phone entitlement configuration." case environmentIssue = "The token key environment is not acceptable." case deviceSupportTapOnPay = "Device Supports Tap to Pay" case deviceUnSupportTapOnPay = "Your current device does not support NFC." case readerSessionCleanUp = "Reader session cleaned up" } enum CustomErrorMessage: String { case entitlementIssue = "Please check the tap on phone entitlement configuration." case environmentIssue = "The token key environment is not acceptable." case deviceSupportTapOnPay = "Device Supports Tap to Pay" case deviceUnSupportTapOnPay = "Your current device does not support NFC." case readerSessionCleanUp = "Reader session cleaned up" } Transaction Response Details: Title Description Title Description Field Type Description Example Rrn * string It’s a Unique code. Just to tracks the TXN status 123456789012 DTxId * string It’s a Unique code.Its TXN hash key 39676826774069372420240510183738 Label * string Its Card type VISA, AMEX MaskedPan * string Last few digit of card number 3767522012 DateNTime * string TXN date and time 20240515191215 Tpn * string Device unique Identifier 544424127175 TraceNo * string Its unique code to track the TXN 1 CardType * string Card type of the TXN CREDIT / DEBIT HTxId * string It’s a Unique code. Just to tracks the TXN’s 000000321000803 TxRefNo * string It’s a Unique code. Just to tracks the TXN’s 034307173484 DateNTime * string It’s specify the date and time on TXN’s 20240515191215 AppCode * string It’s a unique code AXS802 RespCode * string It’s a unique code to represent a success data 00 RespMsg * string It’s a response message for success APPROVAL AXS802 BatchNo * string 63 InvoiceNo * string 5 AID * string A000000025010801 Amt string It’s a base amount 5.00 Label string Amount Tax2 Amt string It’s an amount of State Tax 21 Tax2 Label string Tax2 Tax1 Amt string It’s an amount of Local Tax 11 Tax1 Label string Tax1 Tip Amt string It’s an amount of given by the Tip 20 Tip Label string Tip Fee Amt string It’s an amount of given by the mentioned Fee 9 Fee Label string Custom Fee surveyAns string 1 Currency string It’s a currency code 840