/evaluate


Retrieve the tokenized credit card information and pass it along with the /evaluate request. FlexFactor will then determine if this transaction can be rescued or not.

❗️

Prerequisites to invoke this API:


Workflows

FlexFactor will process different types of transactions in the following way



Customer Initiated Transactions


These are straight sales happening on a checkout page.

You will need to update the definitive status. See Order Status.

CIT general workflow





Merchant Initiated Transactions (MIT)


MIT are rebills on subscriptions, or billing after free trial.

These transactions are being processed without the consumer facing the checkout page, so when failing, these transactions can be retried at a later point.

🔀

Who's managing the MIT:

Sync MIT: these MIT will not be managed by FlexFactor, you will receive a real-time response, however, FlexFactor will continue processing in the background. You must retry these using the same order Id over the course of your retry period. Retries will return the current state of the rescue within FlexFactor.

Managed MIT: these MIT will be managed by FlexFactor for the time you allocate. You will have to mark these transactions as 'pending' until FlexFactor responds with their definitive status.


Sync MIT by FlexFactor

If you don't want FlexFactor to manage the MIT (e.g., you want to use your retry mechanism or you cannot mark a transaction as 'pending'), we will configure your account accordingly.

This way, /evaluate will return a real-time status response that you can reconcile within your system. Note - when configuring this flow, you must notify FlexFactor of the length of your retry period so the expiration of the declines can be set without needing to send an expiryDateUTC value.


Sync MIT by FlexFactor



MIT managed by FlexFactor

If you want FlexFactor to manage your MIT, we will configure your account accordingly.

This flow requires that you interrupt your retry mechanism, and that you set an Expiry Date for the orders that will be pending over at FlexFactor.

You will need to reconcile the definitive status with a webhook. See Order Status.

MIT managed by Flex




Request parameters

Property NameTypeRequired?Notes
isDeclinedboolrequiredRequired, send this as true for all requests to evaluate.
transactionTypeenumoptionalAUTHORIZATION | PURCHASE
  • Authorization:* In a 2-step authorization / capture flow, please provide authorization in order to receive the Capture Required response status, and then call /capture
  • Purchase:* In a straight sale flow, provide 'purchase'
By default, accounts are configured for purchaseonly, and this parameter can be omitted. If you request to be able to use authorization you must provide a value.
midstringoptional

FlexFactor Merchant Identification Number.

Get your merchants' Mid

orderIdstringrequiredYour internal order ID. This will reference your system of record with FlexFactor.
siteIdstringrequired

Unique FlexFactor ID of the website/campaign generating this transaction.

Retrieve your merchant's siteId

customerIpstring
  • required* for CIT
Customer's IP as captured on the checkout page
siteUrlstringoptionalUrl can be specified if multiple domains share the same siteId.
orderSourceenumoptionalSource of the order. if not sent the default enum is ecommerce ecommerce, terminal, vterminal
idempotencyKeyguid/uuidrequiredYou need to generate a unique GUID/UUID, so that we can identify repeated requests.
sequenceNumberstringrequired for batch via SFTP
  • SFTP ONLY* Numerical position of that transaction within the batch. Starting from 1.
isMITboolrequired

true for merchant-initiated transactions. When true, requires

specific MIT fields

.

transactionobjectrequired

See

transaction

fields below.

payerobjectrequired

See

payer

fields below.

billingInformationobjectrequired

See

billingInformation

fields below.

paymentMethodobjectrequired

See

paymentMethod

fields below.

shippingInformationobjectoptional

See

shippingInformation

fields below.

deviceDetailsobjectoptional

See

deviceDetails

fields below.

merchantobjectrequired for partners

See

merchant

fields below

orderItemsobject arrayoptional

See

orderItems

fields below.

additionalFieldsobject arrayoptional

See

additionalFields

fields below.

Try it right now: check out the /evaluate Reference. or the Postman Collection

Additional parameters for MIT

A request for Merchant Initiated Transaction (e.g.: subscriptions) requires the additional following fields:

Property NameTypeRequired?Notes
isMITboolrequiredtrue for merchant-initiated transactions. When true, requires specific MIT fields below.
isRecurringboolrequired for MITtrue for subscriptions.
expiryDateUtcdatetimeDepends on MIT configurationIndicates period during which FlexFactor will retry the transaction.
  • Required when your configuration is async MIT.
  • Must be left empty when your configuration is sync MIT. Otherwise will return a validation error.
siteUrlstringOptional for MITWebsite linked to the descriptor of the subscription.
subscriptionobjectrequired for MIT

See

subscription

fields below.

threeDSecureobjectrequired for MIT

See

3DSecure

fields below.

❗️

Send only MIT that have just failed

The FlexFactor service is optimized to work with failed Merchant Initiated Transactions (MIT) that have just failed. These need to be passed to FlexFactor on that day (and not after a few days or weeks) and should not be retried by the Merchant up to the set expiry date.


Detailed object parameters:

transaction

Required object

Property NameTypeRequired?Notes
idstringrequiredExternal transaction identifier in the format of a GUID
amountintegerrequired

Amount of the transaction in cents.

Must be >$0.00 and <$200.00_E.g. $19.99 -> '1999'_

currencystringrequiredISO 4217 currency code. E.g.: 'USD', 'EUR'
dynamicDescriptorstringconditional

Required only if enabled by FlexFactor for your configuration,

pass the descriptor from the gateway that declined the transaction.

timestampUtcdatetimeoptionalDate and time of the transaction.
timezoneUtcOffset`integeroptionalUTC offset of the timezone.
transactionTypestringoptionalE.g.: 'Auth', 'Capture', 'Void'
responseCodestringoptionalResponse code received from the gateway.
responseDescriptionstringoptionalDescription of the response, usually the response message.
responseStatusstringoptionalE.g.: Approved, Declined, Voided, Refunded, Chargeback, etc.
responseSubStatusstringoptionalSub-status of the response.
responseCodeSourcestringoptional

This is the source of the code from the original transaction

E.g.: "nmi", "Paypal"

processorNamestringoptionalName of the processor.
avsResultCodestringoptionalAddress Verification Service result code.
cvvResultCodestringoptionalCard Verification Value result code.
cavvResultCodestringoptionalCardholder Authentication Verification Value result code.
cardNotPresentbooloptionalIndicates if the card was present during the transaction.


paymentMethod

Property NameTypeRequired?Notes
cardNumberstringrequired
  • Send the token that was returned with /tokenize
expirationYearintegerrequired
expirationMonthintegerrequired
verificationValuestringoptionalCVV value
holderNamestringrequiredCard Holder Name
tokenbooleanoptional
  • If you send a FlexFactor token in cardNumber: provide true
cardTypestringrequiredCREDIT, DEBIT, PREPAID
cardBrandstringrequiredE.g.: VISA, Mastercard, AMEX, etc.
cardCountrystringrequiredISO 3166-1 alpha-2 country code (2-letter)
cardIssuerstringoptional
cardLevelstringoptional
cardFingerprintstringoptional
cardBinNumberstringrequired6-character string.
cardLast4Digitsstringrequired4-character string.


billingInformation

Optional object.

Property NameTypeRequired?Notes
firstNamestringrequired
lastNamestringrequired
phonestringoptional
countrystringrequired
countryCodestringrequiredISO 3166-1 alpha-2 country code (2-letter)
addressLine1stringrequired
addressLine2stringoptional
statestringrequired for US cards2-letter and 2-digit codes from the ANSI standard INCITS 38:2009 (supersedes FIPS 5-2)
citystringrequired
zipCodestringrequired5 or 9 digits

Payer

Required object

Property NameTypeRequired?Noted
emailstringrequiredCustomer's email
phonestringoptionalCustomer's phone
idstringoptionalCustomer's id in your system
birthdatedatetimeoptionalCustomer's birthdate
paymentMethodsarrayoptionalCustomer's additional payment methods information on file. See details below.

PaymentMethods

Optional array within the Payer object.

NOTE This is for integrations leveraging wallet-style decline recovery where a customer may have multiple stored payment methods. This allows the merchant to send all payment methods at once, allowing FlexFactor to optimize the recovery and manage which payment instrument can be rescued.

Contains an array of payment method information (ACH, credit cards). Each payment method follows a consistent structure with a type identifier, payment-specific data, and optional billing information.

Property NameTypeRequired?Notes
TypestringrequiredCARD | ACH (case-insensitive)
ValueobjectrequiredPayment method-specific properties
  • ACH: bank transfer, see required values below

  • CARD: credit card, see required values below

  • SEPA: European bank transfer, see required values below

BillingInformationobjectoptionalOptional billing details per payment method. See values below.

ACH

Value object when 'type':'ACH' in PaymentMethods

PropertyTypeRequired?Notes
AccountTypestringrequired

Type of bank account. CHECKING | SAVINGS

(case-insensitive)

AccountNumberstringrequiredBank account number
RoutingNumberstringrequiredBank routing number
AccountHolderTypestringoptionalType of account holder. Allowed values: “company”, “individual” (case-insensitive)

Card

Value object when 'type':'card' in PaymentMethods

Same format as paymentMethod object.


billingInformation

Optional

Same object as billingInformation


affiliate

optional object

Property NameTypeRequired?Notes
idstringoptionalThis is an internal identifier for the affiliate. It's typically used for backend or database purposes to uniquely identify affiliates within a system.
namestringoptionalThis is a friendly name or label associated with the affiliate.



deviceDetails

Optional object.

Property NameTypeRequired?Notes
deviceTypestringrequired if this object is providedType of device used for that transaction (e.g., 'mobile', 'laptop', 'tablet')
deviceNamestringrequired if this object is providedName of the device (e.g., 'iPhone 12', 'Samsung Galaxy S21')
deviceOSstringrequired if this object is providedOperating system of the device (e.g., 'iOS 14', 'Android 11')
browserstringrequired if this object is providedName of the browser (e.g., 'Chrome', 'Safari')
userAgentstringrequired if this object is providedUser-agent string (a detailed string provided by the browser that identifies the browser, its version, and the operating system)

merchant

Required object for partners only.

Property NameTypeRequired?Notes
idstringrequired if this object is providedExternal ID
namestringoptionalName of the merchant
mccintegerrequired if this object is providedMCC code that merchant is enrolled with standard processing MID(s).
countrystringrequired if this object is providedThe country in which the merchant operates

subscription

Required object when_isMITandisRecurring** are true._

Property NameTypeRequired?Notes
subscriptionIdstring

required

if this object is provided

Note - this should be unique per subscriber within the merchant platform. This is combined with other subscription elements to make acceptance decisions.
priceint

required

if this object is provided

Amount in cents
currencystring

required

if this object is provided

intervalstring

required

if this object is provided

E.g.: 'daily', 'weekly', 'monthly', 'quarterly', 'yearly'.
schemeTransactionIdstringoptional

Unique reference of the transaction returned by the authorization server of the issuer.

Allows to chain an MIT (Merchant Initiated Transaction) to an initial CIT (Customer Initiated Transaction).Visa Example Transaction ID: _987654321234567_MC Example: Trace ID: MCCABC1XY0107

schemeBrandstringoptional

Card/scheme brand associated with the subscription.

Will generally be similar to the cardBrand value in most cases, but might be different in some edge cases.E.g.: Visa

paymentNumberstringoptional

The sequential number indicates the specific payment within the subscription cycle.

E.g., Customer subscribed monthly on Jan 15:Jan 15 is paymentNumber : 1Feb 15 is paymentNumber : 2Mar 15 is paymentNumber : 3

totalPaymentsstringoptional

Total number of payments for that subscription.

E.g. 1, Customer subscribed monthly for 6 months: totalPayments : 6\
Leave null if the subscription is indefinite.


threeDSecure

Required object when_isMITandisRecurring** are true._

Property NameTypeRequired?Notes
threeDsVersionstringoptionalProtocol version for the card payment authentication. E.g.: '1.0.2' '2.1.0' '2.2.0'
ecommerceIndicatorstringrequired if this object is providedThe indication of an online commerce transaction.
authenticationValuestringrequired if this object is providedThe encrypted code from the cardholder's bank.
directoryServerTransactionIdstringrequired if this object is providedThe unique ID for the transaction with the bank.
xidstringoptionalTransaction identifier generated by the 3D Secure system.
authenticationValueAlgorithmstringoptionalThe encryption algorithm used to secure the payment. E.g.: SHA-256
directoryResponseStatusstringoptionalThe response status code from the bank's directory. E.g.: 'Y'
authenticationResponseStatusstringoptionalThe response status code for the payment authentication. E.g.: 'Y'
enrolledstringoptionalThe card's enrollment status in 3D Secure. E.g.: 'Y'

orderItems

Optional object.

Property NameTypeRequired?Notes
skustringoptionalThe SKU of the item.
namestringoptionalThe name of the item.
descriptionstringoptionalThe description of the item.
amountintegeroptionalThe amount of the item.
discountAmountintegeroptionalThe discount amount on the item.
taxintegeroptionalThe tax on the item.
discountTypestringoptionalThe discount type on the item.
quantitystringoptionalThe quantity of this item.

shippingInformation

Optional object.

Property NameTypeRequired?Notes
firstNamestringrequired if this object is provided
lastNamestringrequired if this object is provided
phonestringoptional
countrystringrequired if this object is provided
countryCodestringrequired if this object is providedISO 3166-1 alpha-2 country code (2-letter)
addressLine1stringrequired if this object is provided
addressLine2stringoptional
statestringoptional2-letter and 2-digit codes from the ANSI standard INCITS 38:2009 (supersedes FIPS 5-2)
citystringrequired if this object is provided
zipCodestringrequired if this object is provided5 or 9 digits

additionalFields

Optional array of objects. Max 50 objects

Property NameTypeRequired?Notes
keystringoptionalMax 40 characters, Description of the additional information.
valuestringoptionalMax 500 characters, Content of the additional information.


Response status

Property NameTypeNotes
resultstringResult of the API request: SUCCESS | FAILED ⚠️Is notthe result of the transaction, see Status below.
statusstring

For sync calls: APPROVED ; DECLINED ; CHALLENGE ; CAPTUREREQUIRED

For async: SUBMITTED

orderSessionKeyguid/uuidFlexFactor unique transaction identifier
senseKeystringOptional.

Order status

Order StatusType of statusDescriptionReturned by
Challenge⚠️ Conditional

The transaction rescue requires an action from the customer. This action can be performed via the

UI Widget

. If the UI Widget is not embedded, treat as a decline.

/evaluate webhook
Capture required⚠️ Conditional

The transaction rescue requires a **

/capture

.**

/evaluate /orders webhooks
Submitted⏳ Pending

The transaction was successfully received. Order status needs to be updated via

GET /orders

or

webhooks

.

/evaluate
Draft⏳ PendingMIT order was picked up by system, but is not yet being processed./orders
Processing⏳ PendingThe order is being processed./orders
Expired❌ FailThe transaction can no longer be rescued by FlexFactor./orders
Completed✅ SuccessThe transaction was rescued./orders webhook
Approved✅ SuccessThe transaction was rescued./evaluate webhook
Declined❌ FailThe transaction could not be rescued/evaluate webhook
Cancelled❌ FailThe transaction could not be rescued/evaluate webhook

Update the order status with GET /orders

Immediate response from /evaluate cannot cover all scenarios, please update the order status with


Payload examples

Request example

curl --request POST \
     --url https://api-sandbox.flexfactor.io/v1/evaluate \
     --header 'Authorization: Bearer {bearer_token_returned_by_oauth2}' \ //replace with bearer returned by oauth2
     --header 'accept: application/json' \
     --header 'content-type: application/*+json' \
     --data '
{

	"isMIT": true,
	"isRecurring": true,
	"expiryDateUtc": "2023-05-24T12:30:20Z",
	"subscription": {
    //Required fields
		"subscriptionId": "sub_123456",
    "interval": "Monthly",
		"price": 2599,
		"currency": "USD",
    //Optional metadata to improve cure rate
		"schemeTransactionId": "txn_789012",
		"schemeBrand": "Visa",
		"paymentNumber": 2,
		"totalPayments": 12
	}, 
  
   "transaction": {
    //Required fields
    "amount": 15000,	//In cents. must be >10 and <20000 for test calls
    "currency": "USD",
    "id": "3478613",
    "dynamicDescriptor": "MyShoesStore",
    //Optional metadata to improve cure rate
    "timestampUtc": "0001-01-01T00:00:00Z",
    "timezoneUtcOffset": 0,
    "responseCode": "203",
    "avsResultCode": "M",
    "processorName": "Acme Payments",
    "cavvResultCode": "2",
    "responseCodeSource": "NMI",
    "responseDescription": "Activity limit exceeded",
    "responseStatus": "DECLINED",
    "transactionType": "AUTHORIZATION",
  },
  
	"threeDSecure": {
		"threeDsVersion": "2.1.0",
		"ecommerceIndicator": "02",
		"authenticationValue": "abcdefg12345",
		"directoryServerTransactionId": "ds_987654",
		"xid": "xid_246810",
		"authenticationValueAlgorithm": "SHA-256",
		"directoryResponseStatus": "Y",
		"authenticationResponseStatus": "Y",
		"enrolled": "Y"
	},
 
  "payer": {
    "id": "customer123",
    "email": "[email protected]", //must be this exact address mail if using the 4111111111111111 test card
    "phone": "+1 555-123-4567",
    "birthdate": "1990-01-01",
    "additionalPaymentMethods": [
    {
      "Type": "card",
      "Value": {
        "holderName": "Jane Doe",
    		"cardType": "CREDIT",
    		"cardBrand": "VISA",
        "cardCountry": "United States",
        "cardIssuer": "Acme Bank",
        "cardFingerprint": "abcd1234",
        "expirationMonth": 2028,
        "expirationYear": 12,
        "cardBinNumber": "411111",
        "cardLast4Digits": "1111",
        "cardNumber": "zJb6YF7pL5gk8x9VhRnSwHd4q2t" //Do not send credit card number in clear if you are not PCI complipant, send token returned by /tokenize	
      },
      "BillingInformation": {
        "firstName": "Jane",
        "lastName": "Doenowitz",
        "phone": "+1 555-123-4567",
        "country": "United States",
        "countryCode": "US",
        "addressLine1": "123 Main St.",
        "state": "CA",
        "city": "San Francisco",
        "zipcode": "94111"
      }
    }
  ]

  },
  "orderItems": [
    {
      "sku": "SKU123",
      "name": "Subscription 1",
      "description": "Description of Subscription 1",
      "amount": 20000,
      "discountAmount": 0,
      "tax": 100,
      "quantity": 1
    },
    {
      "sku": "SKU456",
      "name": "Subscription 2",
      "description": "Description of Subscription 2",
      "amount": 10000,
      "discountAmount": 0,
      "tax": 50,
      "quantity": 1
    }
  ],
  "shippingInformation": {
    "firstName": "John",
    "lastName": "Doenowitz",
    "phone": "+1 555-123-4567",
    "country": "United States",
    "countryCode": "US",
    "addressLine1": "123 Main St.",
    "city": "CA",
    "zipcode": "94111"
  },
  "merchant": {
    "country": "US",
    "mcc": 1234,
    "id": "merchant123",
    "name": "Acme Inc."
  },
  "affiliate": {
    "id": "123123123",
    "name": "Affiliate 1"
  },
  "paymentMethod": {
    "holderName": "John Doe",
    "cardType": "CREDIT",
    "cardBrand": "VISA",
    "cardCountry": "United States",
    "cardIssuer": "Acme Bank",
    "cardFingerprint": "abcd1234",
    "expirationMonth": 2028,
    "expirationYear": 12,
    "cardBinNumber": "411111",
    "cardLast4Digits": "1111",
    "cardNumber": "zJb6YF7pL5gk8x9VhRnSwHd4q2t" //Do not send credit card number in clear, send token returned by /tokenize
  },
  "billingInformation": {
    "firstName": "John",
    "lastName": "Doenowitz",
    "phone": "+1 555-123-4567",
    "country": "United States",
    "countryCode": "US",
    "addressLine1": "123 Main St.",
    "state": "CA",
    "city": "San Francisco",
    "zipcode": "94111"
  },
  "mid": "123-456", //replace with your mid
  "isDeclined": true,
  "orderId": "987-654-321", //must be unique even for test calls
  "idempotencyKey": "abcd1234",
}
'
curl --request POST \
     --url https://api-sandbox.flexfactor.io/v1/evaluate \
     --header 'Authorization: abc123def456' \ //replace with bearer returned by oauth2
     --header 'accept: application/json' \
     --header 'content-type: application/*+json' \
     --data '
{

	"isMIT": true,
	"isRecurring": true,
	"expiryDateUtc": "2023-05-24T12:30:20Z",
	"subscription": {
		"subscriptionId": "sub_123456",
		"schemeTransactionId": "txn_789012",
		"schemeBrand": "Visa",
		"interval": "Monthly",
		"price": 2599,
		"currency": "USD",
		"paymentNumber": 2,
		"totalPayments": 12
	}, 
	"threeDSecure": {
		"threeDsVersion": "2.1.0",
		"ecommerceIndicator": "02",
		"authenticationValue": "abcdefg12345",
		"directoryServerTransactionId": "ds_987654",
		"xid": "xid_246810",
		"authenticationValueAlgorithm": "SHA-256",
		"directoryResponseStatus": "Y",
		"authenticationResponseStatus": "Y",
		"enrolled": "Y"
	},
  "transaction": {
    "id": "3478613",
    "timestampUtc": "0001-01-01T00:00:00Z",
    "timezoneUtcOffset": 0,
    "amount": 19975, //In cents. must be >10 and <20000 for test calls
    "currency": "USD",
    "responseCode": "203",
    "avsResultCode": "M",
    "cvvResultCode": "NA",
    "processorName": "Acme Payments",
    "cavvResultCode": "2",
    "responseCodeSource": "NMI",
    "responseDescription": "Activity limit exceeded",
    "responseStatus": "DECLINED",
    "transactionType": "CAPTURE",
    "dynamicDescriptor": "MyShoesStore"
  },
  "payer": {
    "id": "customer123",
    "email": "[email protected]", //must be this exact address mail if using the 4111111111111111 test card
    "phone": "+1 555-123-4567",
    "birthdate": "1990-01-01"
  },
  "orderItems": [
    {
      "sku": "SKU123",
      "name": "Subscription 1",
      "description": "Description of Subscription 1",
      "amount": 20000,
      "discountAmount": 0,
      "tax": 100,
      "quantity": 1
    },
    {
      "sku": "SKU456",
      "name": "Subscription 2",
      "description": "Description of Subscription 2",
      "amount": 10000,
      "discountAmount": 0,
      "tax": 50,
      "quantity": 1
    }
  ],
  "shippingInformation": {
    "firstName": "John",
    "lastName": "Doenowitz",
    "phone": "+1 555-123-4567",
    "country": "United States",
    "countryCode": "US",
    "addressLine1": "123 Main St.",
    "city": "CA",
    "zipcode": "94111"
  },
  "merchant": {
    "country": "US",
    "mcc": 1234,
    "id": "merchant123",
    "name": "Acme Inc."
  },
  "affiliate": {
    "id": "123123123",
    "name": "Affiliate 1"
  },
  "paymentMethod": {
    "holderName": "John Doe",
    "cardType": "CREDIT",
    "cardBrand": "VISA",
    "cardCountry": "United States",
    "cardIssuer": "Acme Bank",
    "cardFingerprint": "abcd1234",
    "expirationMonth": 2028,
    "expirationYear": 12,
    "cardBinNumber": "411111",
    "cardLast4Digits": "1111",
    "cardNumber": "zJb6YF7pL5gk8x9VhRnSwHd4q2t" //Do not send credit card number in clear, send token returned by /tokenize
  },
  "billingInformation": {
    "firstName": "John",
    "lastName": "Doenowitz",
    "phone": "+1 555-123-4567",
    "country": "United States",
    "countryCode": "US",
    "addressLine1": "123 Main St.",
    "state": "CA",
    "city": "San Francisco",
    "zipcode": "94111"
  },
  "mid": "123-456", //replace with your mid
  "isDeclined": true,
  "orderId": "987-654-321", //must be unique even for test calls
  "idempotencyKey": "abcd1234",
}
'
//file name: 'evaluate_{yourfilename}'
//any file without the prefix will not be picked up

{
  "mid": "123456789-987654321", //replace with your mid
  "authorizationToken": "Bearer abc123def456" //replace with bearer returned by oauth2
  "expiryDateUtc": "2023-04-05T01:23:45.678Z", //default expiry date and time for the whole batch, you can specify individual expiryDate within each transaction
  "requests": [
    {
    
    "sequenceNumber": 1, // The numerical position of the transaction within the batch.
    "IsDeclined": true
    "isMIT": true,
    "isRecurring": true,
    "SiteUrl": "https://example.com", //Website linked to the descriptor of the subscription.
    "subscription": {
      "subscriptionId": "sub_123456",
      "schemeTransactionId": "txn_789012",
      "schemeBrand": "Visa",
      "interval": "Monthly",
      "price": 2599,
      "currency": "USD",
      "paymentNumber": 2,
      "totalPayments": 12
    }, 
    "threeDSecure": {
      "threeDsVersion": "2.1.0",
      "ecommerceIndicator": "02",
      "authenticationValue": "abcdefg12345",
      "directoryServerTransactionId": "ds_987654",
      "xid": "xid_246810",
      "authenticationValueAlgorithm": "SHA-256",
      "directoryResponseStatus": "Y",
      "authenticationResponseStatus": "Y",
      "enrolled": "Y"
    },
    "transaction": {
      "id": "3478613",
      "timestampUtc": "0001-01-01T00:00:00Z",
      "timezoneUtcOffset": 0,
      "amount": 19975, //in cents, >$10 and <$200 for tests
      "currency": "USD",
      "responseCode": "203",
      "avsResultCode": "M",
      "cvvResultCode": "NA",
      "processorName": "Acme Payments",
      "cavvResultCode": "2",
      "responseCodeSource": "NMI",
      "responseDescription": "Activity limit exceeded",
      "responseStatus": "DECLINED",
      "transactionType": "CAPTURE",
      "dynamicDescriptor": "MyShoesStore"
    },
    "payer": {
      "id": "customer123",
      "email": "[email protected]",
      "phone": "+1 555-123-4567",
      "birthdate": "1990-01-01"
    },
    "orderItems": [
      {
        "sku": "SKU123",
        "name": "Subscription 1",
        "description": "Description of Subscription 1",
        "amount": 20000,
        "discountAmount": 0,
        "tax": 100,
        "quantity": 1
      },
      {
        "sku": "SKU456",
        "name": "Subscription 2",
        "description": "Description of Subscription 2",
        "amount": 10000,
        "discountAmount": 0,
        "tax": 50,
        "quantity": 1
      }
    ],
    "shippingInformation": {
      "firstName": "John",
      "lastName": "Doe",
      "phone": "+1 555-123-4567",
      "country": "United States",
      "countryCode": "US",
      "addressLine1": "123 Main St.",
      "city": "CA",
      "zipcode": "94111"
    },
    "merchant": {
      "country": "US",
      "mcc": 1234,
      "id": "merchant123",
      "name": "Acme Inc."
    },
    "paymentMethod": {
      "holderName": "John Doe",
      "cardType": "CREDIT",
      "cardBrand": "VISA",
      "cardCountry": "United States",
      "cardIssuer": "Acme Bank",
      "cardFingerprint": "abcd1234",
      "expirationMonth": 2028,
      "expirationYear": 12,
      "cardBinNumber": "123456",
      "cardLast4Digits": "7890",
      "cardNumber": "zJb6YF7pL5gk8x9VhRnSwHd4q2t" //Do not send credit card number in clear, send token returned by /tokenize
    },
    "billingInformation": {
      "firstName": "John",
      "lastName": "Doe",
      "phone": "+1 555-123-4567",
      "country": "United States",
      "countryCode": "US",
      "addressLine1": "123 Main St.",
      "state": "CA",
      "city": "San Francisco",
      "zipcode": "94111"
    },

    "orderId": "ed44736a-b5fa-4bc2-bfb9-0e873bc09511", //must be unique even for test calls
    "idempotencyKey": "abcd1234",
    "senseKey": "1234567890"
},
{ 
    "sequenceNumber": 2, // The numerical position of the transaction within the batch.
    "isMIT": true,
    "isRecurring": true,
    "isDecline": true,
    "SiteUrl": "https://example.com", //Website linked to the descriptor of the subscription
    "subscription": {
        "subscriptionId": "sub_654321",
        "schemeTransactionId": "txn_210987",
        "schemeBrand": "Mastercard",
        "interval": "Weekly",
        "price": 1599,
        "currency": "USD",
        "paymentNumber": 3,
        "totalPayments": 52
    },
      "threeDSecure": {
        "threeDsVersion": "2.2.0",
        "ecommerceIndicator": "01",
        "authenticationValue": "hijklm67890",
        "directoryServerTransactionId": "ds_456789",
        "xid": "xid_135790",
        "authenticationValueAlgorithm": "SHA-512",
        "directoryResponseStatus": "A",
        "authenticationResponseStatus": "C",
        "enrolled": "Y"
    },
      "transaction": {
        "id": "1234567",
        "timestampUtc": "0001-01-01T00:00:00Z",
        "timezoneUtcOffset": 0,
        "amount": 14999,
        "currency": "USD",
        "responseCode": "204",
        "avsResultCode": "N",
        "cvvResultCode": "M",
        "processorName": "XYZ Payments",
        "cavvResultCode": "1",
        "responseCodeSource": "Braintree",
        "responseDescription": "Insufficient funds",
        "responseStatus": "DECLINED",
        "transactionType": "AUTHORIZE"
    },
      "payer": {
        "id": "customer456",
        "email": "[email protected]",
        "phone": "+1 555-987-6543",
        "birthdate": "1985-05-05"
    },
      "orderItems": [
    {
        "sku": "SKU789",
        "name": "Product 3",
        "description": "Description of Product 3",
        "amount": 30000,
        "discountAmount": 0,
        "tax": 150,
        "quantity": 2
    },
    {
        "sku": "SKU012",
        "name": "Product 4",
        "description": "Description of Product 4",
        "amount": 25000,
        "discountAmount": 0,
        "tax": 125,
        "quantity": 1
    }
    ],
      "shippingInformation": {
        "firstName": "Jane",
        "lastName": "Doe",
        "phone": "+1 555-987-6543",
        "country": "United States",
        "countryCode": "US",
        "addressLine1": "456 Oak St.",
        "city": "NY",
        "zipcode": "10001"
    },
      "merchant": {
        "country": "US",
        "mcc": 5678,
        "id": "merchant456",
        "name": "XYZ Inc."
    },
    "affiliate": {
   		 "id": "123123123",
   		 "name": "Affiliate 1"
 		 },
      "paymentMethod": {
        "holderName": "Jane Doe",
        "cardType": "CREDIT",
        "cardBrand": "MASTERCARD",
        "cardCountry": "United States",
        "cardIssuer": "XYZ Bank",
        "cardFingerprint": "efgh5678",
        "expirationMonth": 2028,
        "expirationYear": 12,
        "cardBinNumber": "123456",
        "cardLast4Digits": "7890",
        "cardNumber": "zJb6YF7pL5gk8x9VhRnSwHd4q2t" //Do not send credit card number in clear, send token returned by /tokenize
    },

      "billingInformation": {
        "firstName": "Jane",
        "lastName": "Doe",
        "phone": "+1 555-987-6543",
        "country": "United States",
        "countryCode": "US",
        "addressLine1": "456 Oak St.",
        "city": "NY",
        "zipcode": "10001"
      },
      
      "orderId": "ed44736a-b5fa-4bc2-bfb9-0e873bc09512", /must be unique even for test calls
      "idempotencyKey": "abcd1234",
      "senseKey": "1234567890"
}
  ]
}

Response example

{
  "Result":"Success/Failed",
  "Status": "APPROVED | DECLINED | CHALLENGE | SUBMITTED | CAPTUREREQUIRED",
  "OrderSessionKey": "{{$guid}}", //FlexFactor unique transaction identifier
  "SenseKey": "value that was present in evaluate request", //optional
}

Response matrix and approval state

RESPONSESYNC - PURCHASEASYNC - PURCHASESYNC - AUTHORIZEASYNC - AUTHORIZE
APPROVEDSUCCESSFAILEDFAILEDSYNC ONLY
SUBMITTEDFAILEDPENDINGFAILEDSYNC ONLY
CAPTUREREQUIREDFAILEDFAILEDSUCCESSSYNC ONLY
DECLINEDFAILEDFAILEDFAILEDSYNC ONLY
CHALLENGEFAILEDFAILEDFAILEDSYNC ONLY