# Enabling the Radar Free Trial Abuse integration

To enable the [Radar Free Trial Abuse](https://docs.stripe.com/radar/free-trial-abuse) risk control, you may need to make a one-time code change depending on your integration.
No action is required for Stripe users on [Checkout Sessions](https://docs.stripe.com/api/checkout/sessions). The risk control will work out of the box for users on this integration.
## When do I need to take action?
If you use the [Subscriptions API](https://docs.stripe.com/api/subscriptions) as your integration path, you must take action to make the [changes outlined below](#changes).
For different integration paths like the [Setup Intents API](https://docs.stripe.com/api/setup_intents) or [Payment Intents API](https://docs.stripe.com/api/payment_intents), [contact Stripe using this form](https://docs.stripe.com/radar/free-trial-abuse) for next steps.
## What do I need to change?
For the [Subscriptions API](https://docs.stripe.com/api/subscriptions) integration path, there are two changes you need to make:
* In the request, pass in metadata to indicate the subscription is a free trial.
* Handle the authorization failure if the request is blocked by the risk control.
### Requesting metadata
There are two scenarios:
1. Creating Subscriptions via the API with `trial_end` or `trial_period_days`.
   * In this case, Stripe knows it is a free trial, and no metadata change is required.
1. Creating Subscriptions via the API **without** `trial_end` or `trial_period_days`.
   * In this case, add metadata `{"is_free_trial": "true"}` in the Subscription creation request to indicate it is a free trial.
### Handling authorization failures
Use the pattern in the example snippet bewlo to ensure your application logic handles the authorization failure if a request is blocked.
```
const {pending_setup_intent, latest_invoice} = subscription;
if (pending_setup_intent) {
  const {client_secret, status} = subscription.pending_setup_intent;
  if (status === "requires_action") {
    const {setupIntent, error} = await stripe.confirmCardSetup(client_secret);
    if (error) {
      // Display error.message in your UI.
    } else {
      // The setup has succeeded. Display a success message.
    }
  } else if (status === "requires_payment_method") {
    // Collect new payment method.
  }
}
```
We recommend blocking the subscription creation. If the setup intent is blocked by the risk control, the field `pending_setup_intent` won't be empty. You can use this field as a signal to block the subscription. See [our Subscriptions docs](https://docs.stripe.com/billing/subscriptions/deferred-payment#authorization-failures) for more information.
### What happens if I don't make these changes?
If you don't update the request metadata, the Free Trial Abuse risk control won't work for your free trials.
If you don't handle risk control blocks, the subscription and free trial may stay active, despite the associated setup intent being blocked.