Skip to main content
API Reference
Cards
Real-Time Decisions

Real Time Decisions are created when your application needs to take action in real-time to some event such as a card authorization. For more information, see our Real-Time Decisions guide.

The Real-Time Decision object
{
  "card_authentication": null,
  "card_authentication_challenge": null,
  "card_authorization": {
    "account_id": "account_in71c4amph0vgo2qllky",
    "additional_amounts": {
      "clinic": null,
      "dental": null,
      "original": null,
      "prescription": null,
      "surcharge": null,
      "total_cumulative": null,
      "total_healthcare": null,
      "transit": null,
      "unknown": null,
      "vision": null
    },
    "approval": null,
    "card_id": "card_oubs0hwk5rn6knuecxg2",
    "decision": "approve",
    "decline": null,
    "digital_wallet_token_id": null,
    "direction": "settlement",
    "healthcare": null,
    "merchant_acceptor_id": "5665270011000168",
    "merchant_category_code": "5734",
    "merchant_city": "New York",
    "merchant_country": "US",
    "merchant_descriptor": "AMAZON.COM",
    "merchant_postal_code": "10045",
    "merchant_state": "NY",
    "network_details": {
      "category": "visa",
      "pulse": null,
      "visa": {
        "electronic_commerce_indicator": "secure_electronic_commerce",
        "point_of_service_entry_mode": "manual",
        "stand_in_processing_reason": null,
        "terminal_entry_capability": "magnetic_stripe"
      }
    },
    "network_identifiers": {
      "authorization_identification_response": null,
      "retrieval_reference_number": "785867080153",
      "trace_number": "487941",
      "transaction_id": "627199945183184"
    },
    "network_risk_score": 10,
    "partial_approval_capability": "not_supported",
    "physical_card_id": null,
    "presentment_amount": 100,
    "presentment_currency": "USD",
    "processing_category": "purchase",
    "request_details": {
      "category": "initial_authorization",
      "incremental_authorization": null,
      "initial_authorization": {}
    },
    "settlement_amount": 100,
    "settlement_currency": "USD",
    "terminal_id": "RCN5VNXS",
    "upcoming_card_payment_id": "card_payment_nd3k2kacrqjli8482ave",
    "verification": {
      "card_verification_code": {
        "result": "match"
      },
      "cardholder_address": {
        "actual_line1": "33 Liberty Street",
        "actual_postal_code": "94131",
        "provided_line1": "33 Liberty Street",
        "provided_postal_code": "94132",
        "result": "postal_code_no_match_address_match"
      },
      "cardholder_name": null
    }
  },
  "card_balance_inquiry": null,
  "category": "card_authorization_requested",
  "created_at": "2020-01-31T23:59:59Z",
  "digital_wallet_authentication": null,
  "digital_wallet_token": null,
  "id": "real_time_decision_j76n2e810ezcg3zh5qtn",
  "status": "pending",
  "timeout_at": "2020-01-31T23:59:59Z",
  "type": "real_time_decision"
}
Attributes
card_authentication
dictionary
Nullable

Fields related to a 3DS authentication attempt.

card_authentication_challenge
dictionary
Nullable

Fields related to a 3DS authentication attempt.

card_authorization
dictionary
Nullable

Fields related to a card authorization.

card_balance_inquiry
dictionary
Nullable

Fields related to a card balance inquiry.

category
enum

The category of the Real-Time Decision.

created_at
string

The ISO 8601 date and time at which the Real-Time Decision was created.

digital_wallet_authentication
dictionary
Nullable

Fields related to a digital wallet authentication attempt.

digital_wallet_token
dictionary
Nullable

Fields related to a digital wallet token provisioning attempt.

id
string

The Real-Time Decision identifier.

status
enum

The status of the Real-Time Decision.

timeout_at
string

The ISO 8601 date and time at which your application can no longer respond to the Real-Time Decision.

type
string

A constant representing the object’s type. For this resource it will always be real_time_decision.

Retrieve a Real-Time Decision
curl \
  --url "${INCREASE_URL}/real_time_decisions/real_time_decision_j76n2e810ezcg3zh5qtn" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}"
import Increase from 'increase';

const client = new Increase({
  apiKey: process.env['INCREASE_API_KEY'], // This is the default and can be omitted
});

const realTimeDecision = await client.realTimeDecisions.retrieve(
  'real_time_decision_j76n2e810ezcg3zh5qtn',
);

console.log(realTimeDecision.id);
import os
from increase import Increase

client = Increase(
    api_key=os.environ.get("INCREASE_API_KEY"),  # This is the default and can be omitted
)
real_time_decision = client.real_time_decisions.retrieve(
    "real_time_decision_j76n2e810ezcg3zh5qtn",
)
print(real_time_decision.id)
require "increase"

increase = Increase::Client.new(
  api_key: ENV["INCREASE_API_KEY"] # This is the default and can be omitted
)

real_time_decision = increase.real_time_decisions.retrieve("real_time_decision_j76n2e810ezcg3zh5qtn")

puts(real_time_decision)
package main

import (
	"context"
	"fmt"
	"os"

	"github.com/Increase/increase-go"
	"github.com/Increase/increase-go/option"
)

func main() {
	client := increase.NewClient(
		option.WithAPIKey(os.Getenv("INCREASE_API_KEY")), // This is the default and can be omitted
	)
	realTimeDecision, err := client.RealTimeDecisions.Get(context.TODO(), "real_time_decision_j76n2e810ezcg3zh5qtn")
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", realTimeDecision.ID)
}
package com.increase.api.example;

import com.increase.api.client.IncreaseClient;
import com.increase.api.client.okhttp.IncreaseOkHttpClient;
import com.increase.api.models.realtimedecisions.RealTimeDecision;
import com.increase.api.models.realtimedecisions.RealTimeDecisionRetrieveParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        IncreaseClient client = IncreaseOkHttpClient.fromEnv();

        RealTimeDecision realTimeDecision = client.realTimeDecisions().retrieve("real_time_decision_j76n2e810ezcg3zh5qtn");
    }
}
package com.increase.api.example

import com.increase.api.client.IncreaseClient
import com.increase.api.client.okhttp.IncreaseOkHttpClient
import com.increase.api.models.realtimedecisions.RealTimeDecision
import com.increase.api.models.realtimedecisions.RealTimeDecisionRetrieveParams

fun main() {
    val client: IncreaseClient = IncreaseOkHttpClient.fromEnv()

    val realTimeDecision: RealTimeDecision = client.realTimeDecisions().retrieve("real_time_decision_j76n2e810ezcg3zh5qtn")
}
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Increase\Client;
use Increase\Core\Exceptions\APIException;

$client = new Client(apiKey: getenv('INCREASE_API_KEY'));

try {
  $realTimeDecision = $client->realTimeDecisions->retrieve(
    'real_time_decision_j76n2e810ezcg3zh5qtn'
  );

  var_dump($realTimeDecision);
} catch (APIException $e) {
  echo $e->getMessage();
}
using System;
using Increase.Api;
using Increase.Api.Models.RealTimeDecisions;

IncreaseClient client = new();

RealTimeDecisionRetrieveParams parameters = new()
{
    RealTimeDecisionID = "real_time_decision_j76n2e810ezcg3zh5qtn"
};

var realTimeDecision = await client.RealTimeDecisions.Retrieve(parameters);

Console.WriteLine(realTimeDecision);
Parameters
real_time_decision_id
string
Required

The identifier of the Real-Time Decision.

Action a Real-Time Decision
curl -X "POST" \
  --url "${INCREASE_URL}/real_time_decisions/real_time_decision_j76n2e810ezcg3zh5qtn/action" \
  -H "Authorization: Bearer ${INCREASE_API_KEY}" \
  -H "Content-Type: application/json" \
  -d $'{
    "card_authorization": {
      "approval": {
        "cardholder_address_verification_result": {
          "line1": "match",
          "postal_code": "no_match"
        }
      },
      "decision": "approve"
    }
  }'
import Increase from 'increase';

const client = new Increase({
  apiKey: process.env['INCREASE_API_KEY'], // This is the default and can be omitted
});

const realTimeDecision = await client.realTimeDecisions.action(
  'real_time_decision_j76n2e810ezcg3zh5qtn',
);

console.log(realTimeDecision.id);
import os
from increase import Increase

client = Increase(
    api_key=os.environ.get("INCREASE_API_KEY"),  # This is the default and can be omitted
)
real_time_decision = client.real_time_decisions.action(
    real_time_decision_id="real_time_decision_j76n2e810ezcg3zh5qtn",
)
print(real_time_decision.id)
require "increase"

increase = Increase::Client.new(
  api_key: ENV["INCREASE_API_KEY"] # This is the default and can be omitted
)

real_time_decision = increase.real_time_decisions.action("real_time_decision_j76n2e810ezcg3zh5qtn")

puts(real_time_decision)
package main

import (
	"context"
	"fmt"
	"os"

	"github.com/Increase/increase-go"
	"github.com/Increase/increase-go/option"
)

func main() {
	client := increase.NewClient(
		option.WithAPIKey(os.Getenv("INCREASE_API_KEY")), // This is the default and can be omitted
	)
	realTimeDecision, err := client.RealTimeDecisions.Action(
		context.TODO(),
		"real_time_decision_j76n2e810ezcg3zh5qtn",
		increase.RealTimeDecisionActionParams{},
	)
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", realTimeDecision.ID)
}
package com.increase.api.example;

import com.increase.api.client.IncreaseClient;
import com.increase.api.client.okhttp.IncreaseOkHttpClient;
import com.increase.api.models.realtimedecisions.RealTimeDecision;
import com.increase.api.models.realtimedecisions.RealTimeDecisionActionParams;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        IncreaseClient client = IncreaseOkHttpClient.fromEnv();

        RealTimeDecision realTimeDecision = client.realTimeDecisions().action("real_time_decision_j76n2e810ezcg3zh5qtn");
    }
}
package com.increase.api.example

import com.increase.api.client.IncreaseClient
import com.increase.api.client.okhttp.IncreaseOkHttpClient
import com.increase.api.models.realtimedecisions.RealTimeDecision
import com.increase.api.models.realtimedecisions.RealTimeDecisionActionParams

fun main() {
    val client: IncreaseClient = IncreaseOkHttpClient.fromEnv()

    val realTimeDecision: RealTimeDecision = client.realTimeDecisions().action("real_time_decision_j76n2e810ezcg3zh5qtn")
}
<?php

require_once dirname(__DIR__) . '/vendor/autoload.php';

use Increase\Client;
use Increase\Core\Exceptions\APIException;

$client = new Client(apiKey: getenv('INCREASE_API_KEY'));

try {
  $realTimeDecision = $client->realTimeDecisions->action(
    'real_time_decision_j76n2e810ezcg3zh5qtn',
    cardAuthentication: ['decision' => 'approve'],
    cardAuthenticationChallenge: [
      'result' => 'success',
      'success' => ['email' => 'dev@stainless.com', 'phone' => 'x'],
    ],
    cardAuthorization: [
      'decision' => 'approve',
      'approval' => [
        'cardholderAddressVerificationResult' => [
          'line1' => 'match', 'postalCode' => 'no_match'
        ],
        'partialAmount' => 1,
      ],
      'decline' => ['reason' => 'insufficient_funds'],
    ],
    cardBalanceInquiry: [
      'decision' => 'approve', 'approval' => ['balance' => 0]
    ],
    digitalWalletAuthentication: [
      'result' => 'success',
      'success' => ['email' => 'dev@stainless.com', 'phone' => 'x'],
    ],
    digitalWalletToken: [
      'approval' => ['email' => 'dev@stainless.com', 'phone' => 'x'],
      'decline' => ['reason' => 'x'],
    ],
  );

  var_dump($realTimeDecision);
} catch (APIException $e) {
  echo $e->getMessage();
}
using System;
using Increase.Api;
using Increase.Api.Models.RealTimeDecisions;

IncreaseClient client = new();

RealTimeDecisionActionParams parameters = new()
{
    RealTimeDecisionID = "real_time_decision_j76n2e810ezcg3zh5qtn"
};

var realTimeDecision = await client.RealTimeDecisions.Action(parameters);

Console.WriteLine(realTimeDecision);
Parameters
real_time_decision_id
string
Required

The identifier of the Real-Time Decision.

card_authentication
dictionary

If the Real-Time Decision relates to a 3DS card authentication attempt, this object contains your response to the authentication.

card_authentication_challenge
dictionary

If the Real-Time Decision relates to 3DS card authentication challenge delivery, this object contains your response.

card_authorization
dictionary

If the Real-Time Decision relates to a card authorization attempt, this object contains your response to the authorization.

card_balance_inquiry
dictionary

If the Real-Time Decision relates to a card balance inquiry attempt, this object contains your response to the inquiry.

digital_wallet_authentication
dictionary

If the Real-Time Decision relates to a digital wallet authentication attempt, this object contains your response to the authentication.

digital_wallet_token
dictionary

If the Real-Time Decision relates to a digital wallet token provisioning attempt, this object contains your response to the attempt.