question

shahzadkhan avatar image
shahzadkhan asked forgual answered

Flutter and Payment Connector

Hello,

We are using flutter to build a clover app. We want to use payment connector in our to accept payments. We are not sure how to use clover with flutter. We are kind of new in flutter and clover both. We have added dependency in gradle file but not sure how to use APIs in our dart files. If anyone have sample code or steps please explain the process.

Thanks in advance.

PaymentConnector
1 comment
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

maricris avatar image maricris commented ·

Hi there! Are you building an Android or Web App? I ask because it sounds like you're building an Android app, but it also sounds like you're asking about our Rest API.

Also, do you have any specific questions on how to use the APIs with Flutter / Dart? I don't know Dart, but I imagine you'd use the methods or endpoints provided in our SDK / Rest APIs, except that you'd be writing it in a different format & syntax as described in the following articles and docs:

0 Likes 0 ·

1 Answer

·
forgual avatar image
forgual answered


To integrate Clover with Flutter, you’ll need to set up the Clover SDK in your native Android project within Flutter, as Clover doesn’t have direct Flutter support yet. Here’s a quick guide:

  1. Add Clover dependencies: You’re on the right track by adding the dependency. Ensure you include all necessary permissions and dependencies as per Clover’s API documentation.

  2. Create a platform channel: Use Flutter’s platform channels to communicate between your Dart code and native Android (Kotlin/Java) code where the Clover API calls will reside.

  3. Implement native code: In the Android part of your project, create methods that use Clover’s API to handle payment actions. Then, call these methods from Flutter via the platform channel.

Since you’re new to both Flutter and Clover, partnering with experienced flutter app development companies might be beneficial to help guide you through setting up the platform channel and implementing Clover’s API.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community