Initiate Payment
This Section briefs about how to initiate a payment !
Foloosi's Android SDK provides easy payment collections.
You can use it on the front-end to open payment page or use the actual flow to create Payment Token
Step - 1 - Add Dependency
We distribute our SDK from the Maven Central Repository. To begin with this SDK opens your build.gradle file of Module:app and adds the following dependency.
Step - 2 - Initialize SDK
To initialize the SDK add the codes below with the merchant key (Taken from foloosi merchant panel). If you do not have a merchant key create a new one and customize the checkout page to your liking.
Step - 3 - Implement Payment Listener
Set and Implement our payment listener to receive payment results for every payment.
Important Note - You can Follow any one of the methods below to initiate payment widget.
a. Make Payments via order object
Create Order Data Object with Necessary Inputs
You can create the OrderData or payment input with our OrderData Model class. Here you need to provide order id, title, description, currency code, order amount and customer details like name, email and mobile number.
*Important Note*
orderData.setCustomerUniqueReference("") value MUST be customer id/email/mobile number for saved card feature.
Now make payments with order data you created above.
b.Make Payments with reference token
Initialize api
Get Reference Token
POST
https://api.foloosi.com/aggregatorapi/web/initialize-setup
Headers
Name | Type | Description |
---|---|---|
secret_key* | String | Your Merchant Key get from Foloosi Panel |
Request Body
Name | Type | Description |
---|---|---|
transaction_amount* | Double | |
customer_unique_identifier | String | |
customer_mobile | String | |
customer_email | String | |
customer_name | String | |
currency* | String | |
billing_state | String | |
customer_city | String | |
customer_address | String | |
billing_country | String | |
billing_postal_code | String |
Make the payment with order reference token.
Api Specification
Request call must be on POST.
This Api will be used to confirm the feature you are about to Use.
For Saved Card Payment Method, You need to pass your customer unique details like email,etc. to customer_unique_identifier.
Post Request Body
customer_unique_identifier |
|
Support
Visit https://www.foloosi.com for support requests or email to [email protected].
Developed by
Foloosi Technologies Pvt Ltd.
License
Copyrights (c) 2024 Foloosi
Last updated