/evaluate

On declined/failed transactions, you will have to invoke FlexCharge's Evaluate API.
This ACTIVATES the FlexCharge service.

Try it right now:


Invoke /evaluate on declined transactions to process them through FlexCharge.

Prerequisites to invoke this API:


Request

Although similar to /transmit, invoking /evaluate requires additional data: idempotencyKey, billingInformation, paymentMethod.cardNumber, and expiryDateUtc in case of MIT.

Required fields

isDeclinedBooleanRequired
idempotencyKeyStringRequiredYou need to generate a unique GUID/UUID, so that we can identify repeated requests.
orderIdStringRequiredYour order ID
transactionObjectRequiredRequired fields for this object:
transaction.idStringRequiredA string in the format of a GUID
transaction.timestampUtcDateRequiredThe date and time of the transaction
transaction.timezoneUtcOffsetIntegerRequiredThe UTC offset of the timezone
transaction.amountIntegerRequiredThe amount of the transaction in cents.
$19.99 -> '1999'
transaction.currencyStringRequiredThe currency of the transaction (e.g. USD)
transaction.responseCodeStringRequiredThe response code of the transaction
transaction.responseCodeSourceStringRequiredThe source of the response code (e.g. nmi)
transaction.avsResultCodeStringRequiredThe AVS result code
transaction.cvvResultCodeStringRequiredThe CVV result code
transaction.cavvResultCodeStringRequiredThe CAVV result code If this value cannot be provided, use "NA"
transaction.cardNotPresentBooleanRequiredIndicates if the card was present during the transaction
billingInformationObjectRequiredRequired fields for this object:
billingInformation.firstNamestringRequired
billingInformation.lastNamestringRequired
billingInformation.countrystringRequired
billingInformation.countryCodestringRequiredISO 3166-1 alpha-2 country code (2-letter)
billingInformation.addressLine1stringRequired
billingInformation.citystringRequired
billingInformation.zipcodestringRequired5 or 9 digits
payerObjectRequired
payer.emailStringRequiredIf this value cannot be provided, write 'NA' and provide payer.phone instead.
paymentMethodObjectRequiredRequired fields for this object:
paymentMethod.holderNameStringRequired
paymentMethod.cardTypeStringRequired
paymentMethod.cardBrandStringRequired
paymentMethod.cardCountryStringRequired
paymentMethod.cardBinNumberStringRequiredFirst 6 digits of payment method.
paymentMethod.cardLast4DigitsStringRequiredLast 4 digits of payment method
paymentMethod.ExpirationMonthNumberRequired2 digits
paymentMethod.ExpirationYearNumberRequired4 digits
paymentMethod.cardNumberStringRequiredPCI compliance: don't send cardNumber in clear.
Send returned token by /tokenize.
isMITBooleanRequiredIndicates if transaction is CIT or MIT
isRecurringBooleanRequired
only if isMIT is true.
When true, requires Subscription fields.
expiryDateUtcDate-timeRequired
only if isMIT is true.
Indicates period during which FlexCharge will retry the transaction.
threeDSecureObjectRequired
only if isMIT is true.
3DS informations on initial transaction.
See threeDSecure fields.
Additional optional fields
mid String Optional.
Required only for partner integration.
A string in the format of a GUID
siteUrl String Optional.
The url where the transaction is coming from.
senseKey String Optional.
Is a key that is received from SenseJs widget that was embedded on your checkout/payment page.
orderSource String Optional The source of the order (e.g. ecommerce, installment, etc.)
transaction Object Required Optional fields for this object:
transaction.transactionType String Optional The type of transaction
transaction.responseDescription String Optional The description of the response
transaction.responseStatus String Optional The status of the response
transaction.responseSubStatus String Optional The sub-status of the response
transaction.processorName String Optional The name of the processor
billingInformation Object Required Optional fields for this object:
billingInformation.phone String Optional field.
billingInformation.addressLine2 String Optional field.
billingInformation.state String Optional field.
payer Object Required Optional fields for this object:
payer.id String Optional field. A string in the format of a GUID
payer.birthdate Date Optional field. The birthdate of the payer
payer.phone String Optional field. The phone number of the payer
paymentMethod Object Required Optional fields for this object:
paymentMethod.cardIssuer String Optional field.
paymentMethod.cardLevel String Optional field.
paymentMethod.cardFingerprint String Optional field.
merchant Object Optional Optional fields for this object:
merchant.name String Optional The name of the merchant
merchant.id String Optional A string in the format of a GUID
merchant.mcc String Optional The merchant category code
merchant.country String Optional The country of the merchant
orderItems Array of objects Optional Optional fields for this object:
orderItems.sku String Optional The SKU of the item
orderItems.name String Optional The name of the item
orderItems.description String Optional The description of the item
orderItems.amount Integer Optional The amount of the item
orderItems.discountAmount Integer Optional The discount amount on the item
orderItems.tax Integer Optional The tax on the item
orderItems.discountType String Optional The discount type on the item
orderItems.quantity Integer Optional The quantity of this item
shippingInformation Object Optional object Fields for this object:
shippingInformation.firstName String Required field when shippingInformation object is provided.
shippingInformation.lastName String Required field when shippingInformation object is provided.
shippingInformation.phone String Optional field.
shippingInformation.country String Required field when shippingInformation object is provided.
shippingInformation.countryCode String Required field when shippingInformation object is provided.
shippingInformation.addressLine1 String Required field when shippingInformation object is provided.
shippingInformation.addressLine2 String Optional field.
shippingInformation.state String Optional field.
shippingInformation.city String Required field when shippingInformation object is provided.
shippingInformation.zipcode String Required field when shippingInformation object is provided.
subscription Object Required only when isRecurring is true. Fields for this object:
subscription.subscriptionId String Required field when subscription object is provided.
subscription.schemeTransactionId String Required field when subscription object is provided. Unique reference of the transaction returned by authorisation server of the issuer.
subscription.schemeBrand String Required field when subscription object is provided. Eg: 'Visa'
subscription.interval String Required field when subscription object is provided. Eg 'daily', 'weekly', 'monthly', 'quarterly', 'yearly'.
subscription.price String Required field when subscription object is provided. In cents.
subscription.currency String Required field when subscription object is provided.
subscription.paymentNumber String Optional field.
subscription.totalPayments String Optional field.
threeDSecure Object Required only when isMIT is true. Fields for this object:
threeDSecure.threeDsVersion String Optional field. Ex: "2.1.0"
threeDSecure.ecommerceIndicator String Required field when threeDSecure object is provided.
threeDSecure.authenticationValue String Required field when threeDSecure object is provided.
threeDSecure.directoryServerTransactionId String Required field when threeDSecure object is provided.
threeDSecure.xid String Optional field.
threeDSecure.authenticationValueAlgorithm String Optional field.
threeDSecure.directoryResponseStatus String Optional field.
threeDSecure.authenticationResponseStatus String Optional field.
threeDSecure.enrolled String Optional field.
additionalFields Array of objects Optional Information that you want to pass onto us:
additionalFields.key String Optional field.
additionalFields.value String Optional field.

Request example
POST /v1/evaluate HTTP/1.1 Authorization: bearer Replace with token retrieved by /oauth2/token Content-Type: application/json { "idempotencyKey": "{{$guid}}", "senseKey": "{{$guid}}", "mid": "", "isDeclined": true, "orderId": "", "orderSource": "", "transaction": { "id": "", "timezoneUtcOffset": 0, "transactionType": "", "amount": 0, "currency": "usd", "responseCode": "100", "responseDescription": "", "responseStatus": "Approved", "responseSubStatus": "", "responseCodeSource": "nmi, etc.", "processorName": "", "avsResultCode": "", "cvvResultCode": "", "cavvResultCode": "", "cardNotPresent": true }, "payer": { "id": "{{$guid}}", "birthdate": "2002-03-12", "email": "[email protected]", "phone": "+16454534347" }, "merchant": { "name": "Merchant name", "id": "{{$guid}}", "mcc": 701, "country": "US" }, "orderItems": [ { "sku": "Y43VFG", "name": "nike air jordan", "description": "new jordan model 2021", "amount": 54000, "discountAmount": 1000, "discountType": "Fixed", "quantity": 1, "tax": 10 } ], "paymentMethod": { "holderName": "John Doe", "cardType": "Debit", "cardBrand": "VISA", "cardCountry": "US", "cardIssuer": "JPMorgan", "cardLevel": "Classic", "cardFingerprint": "", "expirationMonth": 8, "expirationYear": 2024, "cardBinNumber": "40311628", "cardLast4Digits": "4563", "cardNumber": "4111111111111111" }, "billingInformation": { "firstName": "John", "lastName": "Doe", "phone": "+16454534347", "country": "USA", "countryCode": "US", "addressLine1": "east 74st", "addressLine2": "", "state": "NY", "city": "New York", "zipcode": "20100" }, "shippingInformation": { "firstName": "John", "lastName": "Doe", "phone": "+16454534347", "country": "USA", "countryCode": "US", "addressLine1": "east 74st", "addressLine2": "", "state": "NY", "city": "New York", "zipcode": "20100" }, "isRecurring": false, "additionalFields": [ { "key": "deviceId", "value": "" } ] }

Response

resultstringSuccess/Failed
statusstringFor CIT sync calls: APPROVED ; DECLINED
For MIT sync calls: APPROVED; DECLINED; EXPIRED; PROCESSING; CANCELLED
---
For asynchronous calls: SUBMITTED
Use /outcome or webhook to retrieve status on async calls.
orderSessionKeyguid/uuidUnique FlexCharge transaction identifier
senseKeystringOptional.
Example response
{ "Result":"Success/Failed", "Status": "Eligible | NotEligible | Conditional", "orderSessionKey": "{{$guid}}", "SenseKey": "same value that was present in request" }