Paytm Got Uninstalled Balance Not Shown on Installing Again
SDK based integration
SDK based integration for All-in-One payment solution allows you to integrate the SDK in your native apps for both Android and iOS apps. The integration lets your customers make seamless payments with Paytm regardless of Paytm app being installed on device or not.
This SDK supports the following flows:
-
App Invoke Catamenia: In example the Paytm app is installed, information technology will exist launched to complete the transaction and give the consequence dorsum to the merchant app.
-
Redirection Period: In instance the Paytm app is not installed, All-in-Ane SDK will open up web-view to procedure transaction and give result to the merchant.
Overview of payment processing via SDK based integration
Note: This page describes the integration steps for integrating All-in-I payment solution for one time payment. In instance yous desire to integrate the same for recurring payments, please refer to the Paytm Subscription.
-
On your mobile app, the user adds goods/services into the shopping/order cart and proceeds to checkout. You call the Initiate Transaction API from your backend to generate the transaction tokens.
Within the Initiate Transaction API, you also get an option to include single or multiple payment sources for the users, thus allowing you to make your own payment page with multiple payment sources.
-
Launch Paytm All-in-One SDK with the transaction token received in step ane.
-
If Paytm app is installed on user'southward phone, the payment will be completed on Paytm app using the user'south saved credentials else transaction volition exist processed via web view within the All-in-I SDK(Paytm hosted redirection flow).
-
Paytm processes the transaction with the user's depository financial institution and returns transaction response to your app.
-
You phone call the Transaction Condition API to verify the transaction response.
-
Notify the payment status to the user and proceed with the gild/service fulfilment.
Menstruation diagram for payment processing via SDK based integration
Pre-requisites
Earlier you begin the integration, brand sure you follow the steps below:
-
Create an account on Paytm every bit a merchant. Click how to create an business relationship.
Annotation: Salve the MID and merchant cardinal generated in the above step.
-
Become through the checksum logic to sympathize how to generate and validate the checksum.
-
Go the staging android or iOS Paytm app for integration testing on the merchant staging environment.
Integration Steps for SDK based integration
- Login to dashboard.paytm.com with your Paytm account details.
- Click on API keys under the Developer settings in the left menu.
- Click theGenerate at present button under theTest API Details.
Note: MID and merchant keys generation may accept few minutes. In case you practise not see these details, please logout and login after 5 minutes. Proceed now to generate these keys.
Notation:
- Download the paytm staging app from here and install it. Login on the staging app with credentials 7777777777 and static otp 888888.
- To help yous with the integration, we take provided a sample merchant app integrated with this SDK. To get the sample app, please click here.
-
Add Dependencies for All-in-1 SDK
-
Add together the line below to 'repositories' section of your project level build.gradle file.
maven { url "https://artifactory.paytm.in/libs-release-local" } -
Add the line below to 'dependencies' section of your app build.gradle.
implementation 'com.paytm.appinvokesdk:appinvokesdk:1.half-dozen.viii'Please refer to the table below for other supported versions:
appinvokesdk version Features Status com.paytm.appinvokesdk:appinvokesdk:one.6.8 Bug Stock-still Published com.paytm.appinvokesdk:appinvokesdk:1.half-dozen.5 Support of EMI subvention for Paytm users on app versions older than 9.10.0 Published com.paytm.appinvokesdk:appinvokesdk:1.six.iv Fixes - In redirection flow, on android back button cancel dialog. On cancelled call close order api Removed Unused permissions Published com.paytm.appinvokesdk:appinvokesdk:1.6.3 Enabled Redirection catamenia when Paytm App is non logged in Published com.paytm.appinvokesdk:appinvokesdk:i.v.4 OTP Auto Read Bug Fixes Published com.paytm.appinvokesdk:appinvokesdk:1.5.iii PlayStore app rejection handled - insecure encryption in EasyPay Published Note: To support PSP Apps (UPI Intent) on redirection flow or to invoke Paytm app for Target SDK version 30 ( Android 11) and above. Please use AllInOneSDK version 1.vi.3 or latest.
- Download the paytm staging app from here and install it. Login on the staging app with credentials 7777777777 and static otp 888888.
-
- Call the Initiate Transaction API from your backend to generate Transaction Token.
In case you want to permit/testify specific payment sources, pass the enablePaymode param in the Initiate Transaction API as depicted below. This feature will enable you to create your own cart payment page with multiple payment sources. Delight refer to the Initiate Transaction API documentation for all possible payment sources that tin be enabled.For Example, if you want to enable UPI as the merely paymode, then laissez passer the parameters below within the Initiate Transaction API.
If you want to utilize only UPI Intent within All-in-One SDK, pass the below params:"enablePaymentMode" : [{ "mode":"UPI", }]"enablePaymentMode" : [{ "mode":"UPI", "channels":["UPIPUSH"] }] - Create an order object every bit following, passing the mandatory parameters.
PaytmOrder paytmOrder = new PaytmOrder(orderid, mid, txnToken, corporeality, callbackurl)Attributes Description Mandatory orderid
Cord(50)
Unique reference ID for a transaction which is generated by merchant Special characters allowed in Society ID are: "@" "-" "_" ".".
Note - laissez passer same club Id in SDK which was used for initiateTransaction
Yes mid
Cord(20)
This is a unique identifier provided to every merchant by Paytm. MID is office of your account credentials and is different on staging and production environs. Aye txnToken
Cord
Transaction token in response to the Initiate Transaction API request. Yeah corporeality
String
Corporeality in INR payable by the customer. Should comprise digits up to two decimal points. The amount should not include any separator like (",") Yes callbackurl
String(255)
On completion of the transaction, Paytm Payment Gateway will send the response on this URL. This URL should be aforementioned every bit passed in callbackURL of Initiate Transaction API. It tin be a dynamic or static response URL as mentioned beneath: - Staging Environment: "https://securegw-stage.paytm.in/theia/paytmCallback?ORDER_ID=<order_id>"
- Production Environment: "https://securegw.paytm.in/theia/paytmCallback?ORDER_ID=<order_id>"
Aye - Create object of TransactionManager class and pass PaytmOrder object created in step 2 along with callback interface to receive results for redirection (webview menstruation).
TransactionManager transactionManager = new TransactionManager(paytmOrder, new PaytmPaymentTransactionCallback() // code argument); - For app invoke restriction (Only Redirection menstruum when imitation else AppInovke if paytm app is installed).
transactionManager.setAppInvokeEnabled(simulated) - For doing transaction on merchant staging
transactionManager.setShowPaymentUrl("https://securegw-stage.paytm.in/theia/api/v1/showPaymentPage"); - Call this method if EMI subvention is integrated and need to be offered for this transaction
transactionManager.setEmiSubventionEnabled(true); - Showtime the transaction passing requestCode to listen for All-in-One SDK flow in onActivityResult.
transactionManager.startTransaction(this, requestCode); - In instance of enabling Redirection menstruation when Paytm App is not logged in, employ the below method-
transactionManager.startTransactionAfterCheckingLoginStatus(this, clientId, requestCode); - Getting payment condition result.
- App Invoke flow i.e. if a transaction is candy via Paytm app
For App Invoke, the result volition be delivered via onActivityResult in your activity. Merchant has to pass request lawmaking while calling TransactionManager.startTransaction.
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == ActivityRequestCode && data != null) { Toast.makeText(this, data.getStringExtra("nativeSdkForMerchantMessage") + information.getStringExtra("response"), Toast.LENGTH_SHORT).show(); } } - Redirection Menstruation (Paytm app is non installed on the user's device)
For redirection flow, the condition of Payment volition be delivered via PaytmPaymentTransactionCallback. This interface has multiple methods as given beneath to get an fault or completion status of the transaction.
public void onTransactionResponse(Bundle inResponse) { /*Brandish the message as below */ Toast.makeText(getApplicationContext(), "Payment Transaction response " + inResponse.toString(), Toast.LENGTH_LONG).show(); }Sample Response
"Bundle"[ { "Status"="TXN_SUCCESS", "ORDERID"="Order Id", "CHARGEAMOUNT"="0.00", "TXNAMOUNT"="1.00", "TXNDATE"="2020-07-21 19:00:05.0", "MID"="Merchant Id", "TXNID"="Transaction Value", "RESPCODE"="01", "PAYMENTMODE"="UPI", "BANKTXNID"="Bank transaction Id", "CURRENCY"="INR", "GATEWAYNAME"="ICICI", "RESPMSG"="Txn Success" } ]
- App Invoke flow i.e. if a transaction is candy via Paytm app
- Paytm provides payment response on both Callback URL and Webhook URL. Please click here for more details.
Note:In case of Okhttp Exception, make the following changes to your build.gradle (app level):
- Exclude okhttp from the app invoke SDK
implementation('com.paytm.appinvokesdk:appinvokesdk:i.v.iv'){
exclude group: "com.squareup.okhttp3", module: 'okhttp3'
}- If okhttp is not added in your project dependencies then add
implementation "com.squareup.okhttp3:okhttp:4.viii.0"
Notation:
- Go the latest Paytm All-in-one SDK for iOS here.
- Download the paytm staging app from here and install information technology. Login on the staging app with credentials 7777777777 and static otp 888888.
- To help you with the integration, we have provided a sample merchant app integrated with this SDK. To get the sample app, please click here.
- Call the Initiate Transaction API from your backend to generate Transaction Token.
In example you desire to allow/show specific payment sources, pass the enablePaymode param in the Initiate Transaction API as depicted beneath. This feature will enable you lot to create your own cart payment folio with multiple payment sources. Please refer to the Initiate Transaction API documentation for all possible payment sources that can exist enabled.For Example, if you want to enable UPI as the only paymode, then pass the below parameters within Initiate Transaction API.
If you want to employ only UPI Intent inside All-in-Ane SDK, pass the params below:"enablePaymentMode" : [{ "manner":"UPI", }]"enablePaymentMode" : [{ "mode":"UPI", "channels":["UPIPUSH"] }] - Phone call the openPaytm method with following mandatory parameters.
Delegate is a blazon of AIDelegate which take 2 protocols.self.appInvoke.openPaytm(merchantId: merchantId, orderId: orderId, txnToken: txnToken, amount: corporeality, callbackUrl: callback, delegate: cocky, environment: env, urlScheme: urlScheme)Attributes Description Mandatory merchantId
String(20)
This is a unique identifier provided to every merchant past Paytm. MID is part of your account credentials and is different on staging and production environment. Yes orderid
String(50)
Unique reference ID for a transaction which is generated by merchant Special characters allowed in Order ID are: "@" "-" "_" ".".
Notation - pass same gild Id in SDK which was used for initiateTransaction
Yes txnToken
String
Transaction token in response to the Initiate Transaction API request. Yep amount
Cord
Amount in INR payable by the customer. Should contain digits upwardly to two decimal points. The amount should not include whatsoever separator like (",") Yes callbackurl
String(255)
On completion of the transaction, Paytm Payment Gateway will ship the response on this URL. This URL should be same every bit passed in callbackURL of Initiate Transaction API. It can be a dynamic or static response URL equally mentioned below: - Staging Surroundings: "https://securegw-stage.paytm.in/theia/paytmCallback?ORDER_ID=<order_id>"
- Production Environment: "https://securegw.paytm.in/theia/paytmCallback?ORDER_ID=<order_id>"
Yes consul
AIDelegate
Merchant gets the Callback of transaction status in AIDelegate in case the app is not installed. No environment
AIEnvironment
User has to set the surroundings in which he is testing. It has two values. - product
- staging
No urlScheme
Cord(255)
Merchant has to provide united states of america with a unique Identifier.
Since iOS doesn't support call dorsum inherently, we volition practise the following things:- For merchants who can requite us the urlScheme for a callback, nosotros volition return transaction status, error cord & response data in the callback. A standard urlScheme API pattern will be provided by us with few free fields to cater to merchant needs. like "merchantScheme://".
- For merchants who tin can't provide urlScheme, they tin apply URL schemes similar Add together a URL Scheme "paytm"+"MID" for more info go through stride 4
Notation:This is only for iOS.
No - In instance the Paytm app is not installed, redirect the user to Paytm hosted Checkout Page.
- As of now, an social club is created in your guild system and the transaction token is besides generated using Initiate Transaction API.
- In case Paytm app does non exist and so the user has to implement consul methods ofAIDelegate. openPaymentWebVC volition provide the merchant with the controller to nowadays/push which handles the Paytm hosted checkout page as described below.
/ Marker: - AIDelegate extension ViewController: AIDelegate { func openPaymentWebVC(_ controller: UIViewController?) { if let vc = controller { DispatchQueue.main.async {[weak self] in cocky?.present(vc, animated: true, completion: aught) } } } }
- In example the merchant doesn't accept callback URL, add an entry into Info.plist. LSApplicationQueriesSchemes(Array) Item 0 (String)->paytm.
- Add a URL Scheme "paytm"+"MID".
- Define the app delegate method to handle Paytm response. The client will become the response in Appdelegate Method.
func application(_ app: UIApplication, open url: URL, options: [UIApplicationOpenURLOptionsKey : Whatsoever] = [:]) -> Bool { permit dict = separateDeeplinkParamsIn(url: url.absoluteString, byRemovingParams: nil) //get paytm params from lexicon render truthful }
- Add a URL Scheme "paytm"+"MID".
- Paytm provides payment response on both Callback URL and Webhook URL. Please click hither for getting more details on this.
On completion of your integration
Post completion of integration on your staging surroundings, exercise a complete transaction from order summary folio on your website or mobile app.
- Attempt a test transaction using the test paymodes credentials.
- Ensure yous re-verify transaction response with Transaction Condition API (OR Fetch Subscription Condition API in case of subscription payments) via server to server call in payment flow and not separately every bit a one-fourth dimension activity.
- Encounter the transaction details in the "Test Information" mode on your dashboard.
Once the test transaction is complete, motion your code to live surround with production account details. Notation that production accounts details are available after you have activated your account on the dashboard. Lastly, it's recommended that yous read about Managing Refunds and late payment notifications In case of any issues with integration, delight go far touch on.
Source: https://business.paytm.com/docs/all-in-one-sdk/sdk-based-integration/
0 Response to "Paytm Got Uninstalled Balance Not Shown on Installing Again"
Postar um comentário