Integrate with Flutter
To integrate Mercado Pago's Checkout Pro into a mobile application, you need to display the web payment flow within your app. For this, use Custom Tabs for Android and Safari View Controller for iOS.
In this documentation, you will find detailed instructions on how to perform this integration using Flutter and Custom Tabs. We will present the steps for installing the necessary libraries, configuring dependencies, and provide practical examples of how to open web pages using Custom Tabs.
Next, select the operating system and follow the corresponding step-by-step guide.
In this step, you will install and configure the necessary dependencies to implement Custom Tabs in your Flutter project.
Return to the application with Deep Links
For the user to be able to return to your application after completing the payment, you will need to configure Deep Links. This allows the user to be automatically redirected to a specific screen in your application when finishing the payment flow or clicking a return button.
1. Configure return URLs in the payment order
When creating the payment order in your backend, configure the return URLs in the config.online object (success_url, failure_url, pending_url and auto_return). For more information, refer to the documentation on how to Create and configure a payment order.
json
"config": { "online": { "success_url": "tuapp://success", "failure_url": "tuapp://failure", "pending_url": "tuapp://pending", "auto_return": "approved" } }
2. Configure Deep Links reception and management in Flutter
Flutter allows you to manage Deep Links in both Android and iOS. For this, use packages such as uni_links or go_router to detect and manage internal navigation when the application is opened via Deep Link.
