ASA Fallback Rules

Decide authorizations with Lithic-hosted rules when your Auth Stream Access (ASA) endpoint does not return a decision.

Overview

ASA Fallback Rules decide authorizations for your program when your Auth Stream Access (ASA) endpoint does not return a decision. Without them, Lithic declines those authorizations.

ASA Fallback Rules are Authorization Rules on the ASA_FALLBACK_AUTHORIZATION event stream. They use the same conditions, lifecycle, and shadow mode as rules on the AUTHORIZATION event stream. On this stream, Lithic approves an authorization that an active rule applies to, unless a rule declines, challenges, or partially approves it.

Fallback changes an authorization's outcome only when a Fallback Rule with an active version applies to it. To stop fallback, disable your Fallback Rules.

📘

Lithic must enable ASA fallback for your program before you can create ASA Fallback Rules. Contact your Lithic representative to enable it.

When Fallback Rules Apply

Lithic evaluates Fallback Rules only when your ASA endpoint does not return a decision:

  • The request times out. See Response Time
  • Lithic cannot complete the request. Lithic retries once on connection errors and 5xx responses before it falls back
  • The response body is not JSON, or does not include a string result. The HTTP status does not matter

A response with a string result is your decision, and fallback does not override it. This rule holds even when Lithic rejects the response, for example because of an invalid approved_amount.

ASA Fallback Rules do not run on credit authorizations, such as refunds. When your endpoint does not return a decision for a credit, Lithic declines the credit, as it does without fallback.

How Fallback Rules Decide

Lithic applies the first outcome in this list that matches:

  1. An active Fallback Rule cannot be evaluated, for example because a Custom Code Rule throws an error. Lithic declines the authorization
  2. Lithic cannot load or evaluate the Fallback Rules in time to answer the network. Lithic declines the authorization
  3. An active Fallback Rule declines. Lithic declines the authorization
  4. An active Fallback Rule challenges. Lithic challenges the authorization
  5. An active Fallback Rule partially approves. Lithic approves the lowest partial amount
  6. At least one active Fallback Rule applies. Lithic approves the authorization
  7. No active Fallback Rule applies. Lithic declines the authorization, as it does without fallback

A Custom Code Rule can also return an APPROVE action with an explanation. APPROVE does not change the outcome, because Lithic already approves when an active rule applies. Its explanation appears in the transaction's rule results.

A rule applies when it is bound to the transaction's program, account, business account, card, or card tag. See Scoping a Rule.

A rule that has only a draft version runs in shadow mode. It never approves an authorization, and Lithic ignores its errors.

Supported Rule Types

ASA Fallback Rules are part of Fraud Essentials, which every Lithic program has at no additional cost. Some rule types and actions also need Lithic Fraud Command. See Feature Tiers.

Rule typeActions on this event streamTier
CONDITIONAL_ACTIONDECLINE, CHALLENGEFraud Essentials. The CHALLENGE action and behavioral attributes need Fraud Command
VELOCITY_LIMITDECLINE, PARTIAL_APPROVE. See Velocity Limits on This StreamFraud Essentials
TYPESCRIPT_CODEDECLINE, CHALLENGE, PARTIAL_APPROVE, APPROVEFraud Command

Conditions, attributes, and Custom Code Rule features match the AUTHORIZATION event stream. Fallback Rules cannot adjust holds. Custom Code Rules on this stream return AsaFallbackAuthorizationAction values.

CHALLENGE works as described in Authorization Challenges. Lithic declines the authorization and asks the cardholder to verify. Lithic sends the retry after verification to your endpoint. If your endpoint again does not return a decision, the Fallback Rules decide the retry.

A Fallback Rule of type CONDITIONAL_ACTION does not challenge again for 24 hours after the cardholder completes a challenge at the same merchant. A Fallback Rule of type TYPESCRIPT_CODE gets no automatic bypass. Read authorization.latest_challenge in your code to skip a repeat challenge.

Example: Decline Large Transactions

The following request creates a program-level ASA Fallback Rule. When your ASA endpoint does not return a decision, the rule declines any authorization over $50, and Lithic approves the rest. Amounts are in cents.

{
  "name": "Fallback: decline over $50",
  "entities": {
    "include": [{ "type": "PROGRAM" }]
  },
  "type": "CONDITIONAL_ACTION",
  "event_stream": "ASA_FALLBACK_AUTHORIZATION",
  "parameters": {
    "action": "DECLINE",
    "conditions": [
      {
        "attribute": "TRANSACTION_AMOUNT",
        "operation": "IS_GREATER_THAN",
        "value": 5000
      }
    ]
  }
}
📘

For the full request schema, see the Create Auth Rule API.

Velocity Limits on This Stream

Velocity limit rules on the ASA_FALLBACK_AUTHORIZATION event stream work as they do on the AUTHORIZATION event stream, and also accept PROGRAM scope.

Partial Approval

When a transaction would take spend over limit_amount on a terminal that supports Partial Approval, the rule partially approves the amount left under the limit. Otherwise the rule declines it. The count and cash limits always decline.

Program Scope

The scope parameter accepts PROGRAM, in addition to CARD and ACCOUNT. PROGRAM scope counts every transaction in the program.

PROGRAM scope is available only on this event stream. Its period must be one day or shorter: the DAY period, or a CUSTOM period with a duration of 86,400 seconds or less.

Custom Code Rules on this stream can use PROGRAM scope too, on a SPEND_VELOCITY feature, with the same period limit.

Capping Fallback Spend

A VELOCITY_LIMIT Fallback Rule with PROGRAM scope limits the total spend in your program while fallback is active. The rule counts all spend in the program for the period, including spend that your ASA endpoint approved. When an authorization that fallback decides would take the program's spend over the limit, the rule partially approves it up to the limit or declines it, as described in Partial Approval.

The following request sets the limit at $50,000 of program spend a day:

{
  "name": "Fallback: program daily cap",
  "entities": {
    "include": [{ "type": "PROGRAM" }]
  },
  "type": "VELOCITY_LIMIT",
  "event_stream": "ASA_FALLBACK_AUTHORIZATION",
  "parameters": {
    "scope": "PROGRAM",
    "period": { "type": "DAY" },
    "limit_amount": 5000000
  }
}

Testing and Managing Rules

ASA Fallback Rules follow the same Authorization Rule Lifecycle as every other rule. A new rule starts as a draft in shadow mode, where you can review its results before you promote it. After you promote an ASA Fallback Rule, it starts to change outcomes. When your endpoint does not return a decision, Lithic approves the authorizations that the rule applies to.

When ASA Fallback Rules decide a transaction event, Lithic sets the event's decision_made_by to ASA_FALLBACK_RULES. On an approved event, detailed_results also names the ASA failure that started fallback, for example ["APPROVED", "CUSTOMER_ASA_TIMEOUT"].

In Sandbox, fallback is available without enablement. To test your rules, let your Sandbox ASA endpoint time out.

📘

Backtests are currently not available for Fallback Rules. Use shadow mode to see how a rule decides before you promote it.

Next Steps


Did this page help you?