# Independent risk control

> APO’s independent risk control solution enables merchants to automatically perform card payment risk assessments and make authorization decisions based on APO’s recommendations, requiring minimal merchant involvement.

APO's independent risk control solution enables merchants to implement the risk control function of card payment. APO advances the risk control process based on obtaining risk control recommendations, and the entire process does not require the merchant to participate in the decision-making process. The merchant only needs to call the interface to report to Ant Group after the occurrence of the transaction risk.

APO's independent risk control solution can advise you on whether to authorize a transaction before authorization and advance the transaction based on the risk control recommendations obtained.

# Integration flow

The integration process of independent risk control solutions is shown in the following figure:

![1736490573188-ef432a0e-956e-483a-8bd5-28302cf7b8d5.png](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/yuque/idocs/2025/png/7de2fe65-03e2-46c3-a685-861be9f6cdfb.png)

Figure 1. SDK integration flow of independent risk control

# Integration consideration

When a buyer submits a payment request, you need to integrate the card payment capability via SDK or API. The integration steps for this solution are the same as for the [Card payments](https://docs.antom.com/ac/apo/Card_payments.md). If you integrate independent risk control via SDK, you only need to complete the following actions:

## 1\. Introduce an independent risk control SDK package

According to the terminal type, introduce the independent risk control SDK package through the following operations:

#### Tab: Web/WAP

No need to integrate an independent risk control SDK package in the Web/WAP type

#### Tab: Android

1.  **Download Resource Package**: Enter [Antom Dashboard](https://dashboard.alipay.com/global-payments/home), select **Cashier Component** for **Android** in **Resources** > **Download** **Detail**, and click **View the download address of this package** to download.**Note**: You need to agree to the SDK download agreement when you download for the first time.
2.  Place the extracted .aar build file into the project libs file.
3.  Declare a reference to the .aar build file in the build.gradle file of the current project application.
4.  Add dependency information to the build.gradle file.

```json
    dependencies {
    // Configure the SDK aar package, noting that you need to replace x.x.x with the specific version number of the package you downloaded.
    implementation(name: 'ams-component-sdk-release-x.x.x', ext: 'aar')
    // Add the Card Payment Protection SDK aar package, noting that you need to replace x.x.x with the specific version number of the package you downloaded.
    implementation (name: 'apsecurity-oversea-x.x.x-sdk', ext: 'aar')
    implementation (name: 'apsecuritysdk-adapter-oversea-x.x.x-sdk', ext: 'aar')
    implementation 'com.alibaba:fastjson:1.1.70.android'
}
```

#### Tab: iOS

1.  **Download Resource Package**: Enter [Antom Dashboard](https://dashboard.alipay.com/global-payments/home), select **Cashier Component** for **iOS** in **Resources** > **Download Detail**, and click **View the download address of this package** to download.**Note**: You need to agree to the SDK download agreement when you download for the first time.
2.  Add AMSComponent.framework, APPSecuritySDKAdapter.framework, APPSecuritySDKCore.framework, AlipayWebView.framework framework to the project, and add AlipayWebView.framework/IWebContainer.bundle and AMSComponent.framework/AMSComponent.bundle

![image.png](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/1702974491146-6cc04999-17d3-4889-a107-9d8a441a30f3.png)

AMSCOMPONENT.BUNDLE.INCODENEWTEST/ANTOMSDK/AMSCOMPONENT.FRAMEWORK

WEBCONTAINER.BUNDLEINCODENEWTEST/ANTOMSDK/ALIPAYWEBVIEW.FRAMEWORK

LINKBINARYWITHLIBRARIES(4ITEMS)

ALIPAYWEBVIEW.FRAMEWORK

AMSCOMPONENT.FRAMEWORK

COPYBUNDLERESOURCES(5ITEMS)

APPSECURITYSDKADAPTER.FRAMEWORK

APPSECURITYSDKCORE.FRAMEWORK

DRAGTOREORDERLINKEDBINARIES

RUNBUILDTOOLPLUG-INS(OITEMS)

COMPILESOURCES(4ITEMS)

TARGETDEPENDENCIESOITEMS

REGUIREDC

SIGNING&CAPABILITIES

REQUIREDC

REQUIREDC

BUILDSETTINGS

REGUIRED

RESOURCETAGS

BUILDRULES

BUILDPHASES

STATUS

NAME

司FILTER

LNFO

面

前

前

3.  Add -ObjC in **Build Settings** > **Linking** > **Other Linker Flags** ![image.png](https://idocs-assets.marmot-cloud.com/storage/idocs87c36dc8dac653c1/1702974586944-9842b763-16d0-416b-8f46-8edc11bfdcfd.png)

    QUOTELINKERARGUMENTS

    ALIPAYPLUSCLIENT

    SIGNING&CAPABILITIES

    OTHERLINKERFLAGS

    $(INHERITED)

    BUILDSETTINGS

    RESOURCETAGS

    BUILDRULES

    CUSTOMIZED

    EXAMPLE

    SETTING

    OMBINE

    RESOLVED

    OTHERLINK

    BUILDPHASES

    LINKING

    LEVELS

    \-OBJC

    \-OBIC

    GENERAL

    OBJC

    BASIC

    ESC

    INFO

## 2\. Notify a risk

If a transaction is suspected of fraud or card theft or chargeback occurs, you need to call the [**reportRisk**](https://docs.antom.com/ac/risk_control/report_risk.md) API to notify Ant Group of the risk. Please refer to [Notify a risk](https://docs.antom.com/ac/risk_control/card.md#e4pQv) for more details.