How To: Implement Chargeback Protection
Overview
Coinflow provides multiple ways to protect merchant accounts against fraud. Learn more about fraud prevention methods before you start implementing chargeback protection.
How to Add Chargeback Protection
When merchants opt-in for chargeback protection, they will need to add our chargeback protection provider’s sdk across every page of their site. This integration enables our provider to gather extra data during the customer’s shopping experience. Depending on your implementation method, select from the below options to view instructions on how to implement:
Sample React Native Diff Files: Android | iOS
React
- Add the <CoinflowPurchaseProtection> component to every page on your site.
- Add your
merchantIdas a property to the <CoinflowPurchaseProtection> component. - In every <CoinflowPurchase> component, add the
chargebackProtectionDataproperty and input information about each purchase made via Coinflow.
React Native
Implement the nSure Mobile SDK
IOS:
- Drag and drop LocalPods folder from ReactNative > Resources into local IOS folder. Add this line to the podfile “pod ‘nSure’, :path => ‘LocalPods/nSure’” and run pod install
- Drag and drop NSureSDK.h and NSureSDK.m from ReactNative > Resources into the Xcode workspace. In NSureSDK.h change the conditional import to just “#import <React/RCTBridgeModule.h>”
- Add dependency AdSupport in the Xcode General tab under Frameworks, Libraries and Embedded Content
- In the Xcode Build Settings tab add -framework “nSure” to the Other Linker Flags. Follow the remaining steps in the docs as is.
- Call
nsureSDK.sharedInstanceWithAppIDto get thedeviceId
Android:
- Create a ‘libs’ folder in the android app and drag and drop Nsure.aar into the folder. Drag and drop NSureSDK.java and NSureSDKPackage.java into the project source (android > app > src > main > java > com > ‘project name’ >)
- Change the first line in NSureSDK.java and NSureSDKPackage.java from “package com.nsurereactnativesample;” to “package com.<project name>”. Follow the remaining steps in the docs as is.
- Call
nsureSDK.getDeviceIdto get thedeviceId
Additional Steps:
- Pass the
deviceIdin{"<CoinflowPurchase>"}by implementing the following code:
- In
{"<CoinflowPurchase>"}add thechargebackProtectionDataproperty and add information about every purchase that is being made via Coinflow.
SDK Repositories:
Here are the links for the public repositories of the iOS and Android SDKs:
Application ID: 9JBW2RHC7JNJN8ZQ
API
- Add the following code to every page on your site:
📘 This code will allow us to gather information on the user’s device, how they interact with your website, and other info that allows the models to predict the risk of fraud or chargeback for this particular user.
- To each of your API calls, add the
x-device-idheader and pass the value which comes as a result of callingwindow?.nSureSDK?.getDeviceId()on your website.
This deviceId is how the system relates the individual request to the information collected about the user’s device and session from the SDK added above.
- In the Checkout Endpoint and the Redeem Transaction Endpoint, pass the
chargebackProtectionData.
📘 This information provides information about what is being purchased, which allows the AI models to determine the risk of chargeback for this particular purchase.
What to pass into chargebackProtectionData
Merchants that opt-in for chargeback protection are required to pass chargebackProtectionData as a prop to the <CoinflowPurchase> component or to our card checkout, saved card checkout, ach checkout , and redeem transaction endpoints.
🚧 The more information that you pass here the better the authorization rates will be, so it is in your best interest to supply as much information as possible

