Certification reference

Base payloads, sandbox test cards, and status tables used by the certification cases.

Base payloads, test cards, and status tables for the Certification guide. The test cases cite these by appendix letter.


Appendix A. Base payloads

Reference: /evaluate, Payload examples, /capture, /refund.

Each case changes only the fields it names. Replace every placeholder with your sandbox values.

A.1 Base CIT payload

POST /v1/evaluate
Authorization: Bearer {accessToken}
Content-Type: application/json

{
  "mid": "{sandbox MID}",
  "isDeclined": true,
  "orderId": "{merchant order ID, unique per case}",
  "siteId": "{sandbox Site ID}",
  "idempotencyKey": "{new GUID per case}",
  "isMIT": false,
  "transactionType": "PURCHASE",
  "customerIp": "203.0.113.45",
  "attemptCount": 2,
  "transaction": {
    "id": "{merchant transaction ID}",
    "amount": 9900,
    "currency": "USD",
    "timestampUtc": "{now, ISO 8601 UTC}",
    "timezoneUtcOffset": -6,
    "responseCode": "05",
    "responseCodeSource": "processor",
    "responseDescription": "Do Not Honor",
    "processorName": "{original processor}",
    "avsResultCode": "Y",
    "cvvResultCode": "M",
    "cardNotPresent": true
  },
  "payer": {
    "email": "[email protected]",
    "phone": "5125550123"
  },
  "billingInformation": {
    "firstName": "Jane",
    "lastName": "Smith",
    "addressLine1": "123 Main St",
    "city": "Austin",
    "state": "TX",
    "zipcode": "78701",
    "country": "United States",
    "countryCode": "US"
  },
  "paymentMethod": {
    "cardNumber": "{token from TOKENIZE-01, or the PAN on the DIRECT-CARD path}",
    "token": true,
    "cardBinNumber": "400000",
    "cardLast4Digits": "3184",
    "expirationMonth": 12,
    "expirationYear": 2028,
    "holderName": "Jane Smith",
    "cardType": "credit",
    "cardBrand": "Visa",
    "cardCountry": "US"
  },
  "merchant": {
    "id": "{merchant identifier}",
    "mcc": 5999,
    "country": "US"
  }
}

On the DIRECT-CARD path, set token to false and send the PAN in cardNumber. Add verificationValue when the case calls for a CVV.

A.2 Base MIT payload

Same as A.1 with these changes. Remove customerIp and verificationValue.

{
  "isMIT": true,
  "isRecurring": true,
  "transactionType": "PURCHASE",
  "attemptCount": 3,
  "transaction": {
    "responseCode": "51",
    "cvvResultCode": "P"
  },
  "subscription": {
    "subscriptionId": "{merchant subscription ID}",
    "price": 9900,
    "currency": "USD",
    "interval": "monthly",
    "schemeTransactionId": "{network transaction ID from the original CIT}"
  }
}

expiryDateUtc is optional. Add it only where a case names it.

A.3 Capture request

POST /v1/capture
Authorization: Bearer {accessToken}
Content-Type: application/json

{
  "orderId": "{FlexFactor orderId}",
  "amount": 9900,
  "currency": "USD",
  "idempotencyKey": "{new GUID per capture}"
}

A.4 Refund request

POST /v1/orders/{orderId}/refund
Authorization: Bearer {accessToken}
Content-Type: application/json

{
  "amountToRefund": 99.00,
  "refundMessage": "Certification test",
  "idempotencyKey": "{new GUID; required by this guide on every partial refund}"
}

Appendix B. Test cards used in this guide

The full sandbox card list is on the Sandbox Test Cards page. Use [email protected] as the email and a valid US or CA phone number unless a case states otherwise.

CardOutcomeCVVOther data
4000002760003184Approved rescueAny, or omittedAny name and address
4444555566660030Approved rescueAny, or omittedAny name and address
4111111111111111Approved rescue999Any name other than Cure Tester
4111111111111111CHALLENGE999Name Cure Tester; phone +99.0007 (ask for CVV), +99.0003 (different card), +99.0002 (3DS)
4012888888881881Declined rescueAnyAny name and address

Appendix C. Status reference

C.1 Evaluate response status

Reference: /evaluate response status.

statusFlowsAction
APPROVEDCIT-PURCHASE, SYNC-MIT retryMark the order paid
DECLINEDCIT-PURCHASE, CIT-AUTHORIZE, SYNC-MITReturn the original decline
CHALLENGECIT-PURCHASETreat as a decline
CAPTUREREQUIREDCIT-AUTHORIZECall /capture within the capture window
SUBMITTEDMIT-ASYNC-PURCHASE, MIT-ASYNC-AUTHORIZEHold the order pending; wait for the webhook

DECLINED is also the fallback value when result is Failed. In that case success is false, and the response is not a FlexFactor decision; return the original decline.

C.2 Order status

Returned by GET /v1/orders/{id}. Reference: Order status, GET /orders/{id}.

statusstatusNameMeaningAction
0DraftMIT order receivedPending
1OnholdTemporarily on holdPending; no webhook
2CancelledCancelled, declined asynchronously, or expiredNot rescued; check for order.expired
3ProblemProcessing problemNot rescued; contact support with the orderId
4ProcessingRescue in progressPending
5CapturerequiredAuthorized, not capturedCall /capture
6ReturnedDefined in the enum; not assigned by a refundNot expected; contact support with the orderId if observed
7CompletedCaptured; stays Completed after a full or partial refundPaid; read refundsAmount for refunds

C.3 Webhook events

Reference: Webhooks.

EventPriorityFires when
order.completedRecommendedAn order reaches Completed on any flow, including synchronous CIT approvals and successful captures; delivered after the API response
order.cancelledRecommendedAn order is cancelled by you, or an MIT rescue is declined; sent only when the order status changed
order.expiredRecommendedAn MIT rescue window closes without an approval, or an authorization is not captured within the capture window
order.capturerequiredCritical for MIT-ASYNC-AUTHORIZE and SYNC-MITAn authorization is approved and awaits capture
order.refundedCriticalA refund you initiated is processed
payment.chargeback.receivedCriticalThe issuer raises a chargeback
payment.chargeback.reversedRecommendedA chargeback is reversed in the merchant favor
payment.early_warning.receivedRecommendedA TC40 or SAFE alert arrives before a chargeback
challenge.presentedCritical for challenge flows/evaluate returns CHALLENGE

C.4 Response envelope by endpoint

Reference: Workflows §3.5.

Endpointstatus valuesresultsuccess
POST /v1/evaluateAPPROVED, DECLINED, CHALLENGE, CAPTUREREQUIRED, SUBMITTEDSuccess or Failedfalse only when result is Failed
POST /v1/captureSUCCESS, FAILEDAlways nullStays true when status is FAILED
POST /v1/orders/{id}/refundSUCCESS, FAILEDAlways nullfalse when status is FAILED
POST /v1/orders/{id}/cancel, POST /v1/orders/{external-order-id}/external-cancelNo status fieldNot presenttrue on HTTP 200, also when nothing changed

statusCode is never populated on any of these endpoints. errors items are serialized positionally: item1 message, item2 key, item3 code, item4 friendly flag.



Did this page help you?