/orders/{id}

GET /orders/{id} to retrieve the status on a specific order.



This endpoint focuses on a specific order identified by its unique ID (represented by {id}). When you access this endpoint, it typically returns detailed information about a single order, such as the customer's name, order details, payment status, and shipment tracking.

Use this API in your Advanced CIT integration, your Standard MIT integration, your SFTP implementation.

If /evaluate returned a 'CHALLENGE', 'CAPTUREREQUIRED' or 'SUBMITTED' order status, you will retrieve FlexFactor decision for that transaction with GET /orders.


Request

Required key

idThe FlexFactor order id returned by the /evaluate response.
bearer tokenThe auth token returned by /oauth2/token

Try it right now:



Response


Field NameField TypeField Explanation
idStringUnique identifier for the order
correlationIdStringIdentifier used to correlate this transaction with other related transactions
referenceNumberStringReference number unique to this request
statusIntegerAn array of integers representing the order statuses to filter by.
See Order status .
"0": "Draft",
"1": "Onhold",
"2": "Cancelled",
"3": "Problem",
"4": "Processing",
"5": "Capturerequired",
"6": "Returned",
"7": "Completed"
statusNameStringTextual representation of the order's status.
See Order status.
orderPlacedDateStringDate and time when the order was placed, in ISO 8601 format
expiryDateStringExpiry date of the order, can be null
billingAddressObjectObject containing billing address details like country, city, and postal code
shippingAddressObjectObject containing shipping address details, can be null
firstNameStringFirst name of the customer
lastNameStringLast name of the customer
emailStringEmail address of the customer
phoneStringPhone number of the customer
secondaryEmailStringSecondary email of the customer, can be empty
currencyCodeStringCurrency code for the transaction (e.g., USD)
currencySymbolStringSymbol representing the currency used (e.g., $)
amountFloatTotal amount of the order
formattedAmountStringFormatted total amount of the order with currency symbol
orderItemsArrayList of items included in the order, each item is an object with details like name, price, and quantity
activityItemsArrayList of payment-related activities for the order, such as authorization and capture transactions, as well as dispute and refund
totalBalancePaidIntegerTotal amount paid towards the order
totalBalancePaidFormattedStringFormatted total amount paid towards the order
balanceToBePaidFloatRemaining balance to be paid
balanceToBePaidFormattedStringFormatted remaining balance to be paid
refundsAmountIntegerTotal amount refunded
paymentInstrumentTokenStringToken representing the payment method used for the transaction
merchantNameStringName of the merchant/store where the order was placed
merchantIdStringMerchant identifier specific to the store

Order status


Order statusDescriptionReturned by
ChallengeConditional status: 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 requiredPending status: The transaction rescue requires a /capture./evaluate
/orders
webhooks
SubmittedPending status: The transaction was successfully received. Order status needs to be updated via GET /orders or webhooks./evaluate
DraftPending status: MIT order was picked up by system, but is not yet being processed./orders
ProcessingPending status: order is being processed./orders
ExpiredFail status: transaction can no longer be rescued./orders
CompletedSuccess status: transaction was rescued./orders
webhook
ApprovedSuccess status: transaction was rescued./evaluate
webhook
DeclinedFail status: transaction could not be rescued/evaluate
webhook
CancelledFail status: transaction could not be rescued/evaluate
webhook

Payload examples

Request

curl --request GET \
     --url https://api-sandbox.flex-charge.com/v1/orders/{Flex unique order id} \
     --header 'Authorization: bearer {the token returned by /oauth2}' \
     --header 'accept: application/json'

Response

{
  "id": "8ee05b5f-652a-471b-bbec-dc0887e1f08f",
  "correlationId": "00000000-0000-0000-0000-000000000000",
  "referenceNumber": "b46cbb4a-90ba-4f5d-b9c3-9d5dcbef8912",
  "status": 7,
  "statusName": "completed",
  "orderPlacedDate": "2024-02-29T15:13:57.787092Z",
  "expiryDate": null,
  "billingAddress": {
    "country": "US",
    "countryCode": "US",
    "line1": "378 EAST ST",
    "line2": "",
    "city": "BLOOMSBURG",
    "zipCode": "178151847",
    "state": "PATTT"
  },
  "shippingAddress": null,
  "firstName": "CURE1",
  "lastName": "TESTER",
  "email": "[email protected]",
  "phone": "+1 234567890",
  "secondaryEmail": "",
  "currencyCode": "USD",
  "currencySymbol": "$",
  "amount": 45.65,
  "formattedAmount": "$45.65",
  "orderItems": [
    {
      "id": "2424de18-26ec-4d47-96c3-b2debdaddc77",
      "name": "Green FlexFactor Fleece Zip Hoodie",
      "referenceId": "0",
      "unitPrice": 45.65,
      "discount": 0,
      "tax": 0,
      "quantity": 1,
      "amount": 45.65
    }
  ],
  "activityItems": [
    {
      "orderId": "8ee05b5f-652a-471b-bbec-dc0887e1f08f",
      "paymentTransactionId": "5dfc23c7-35fa-4370-b055-eecfd8239ed5",
      "relatedTransactionId": null,
      "type": "authorization",
      "description": "Authorization with card that ends with 1111",
      "totalAmountFormatted": null,
      "totalAmount": 4565,
      "discountAmount": 0,
      "requestDate": "0001-01-01T00:00:00",
      "paymentDate": "2024-02-29T15:13:55.397356Z",
      "createDateTime": null
    },
    {
      "orderId": "8ee05b5f-652a-471b-bbec-dc0887e1f08f",
      "paymentTransactionId": "bc12b943-4d6f-4cfa-85da-06ab02818842",
      "relatedTransactionId": "5dfc23c7-35fa-4370-b055-eecfd8239ed5",
      "type": "capture",
      "description": "Captured trx ref: bc12b943-4d6f-4cfa-85da-06ab02818842",
      "totalAmountFormatted": null,
      "totalAmount": 4565,
      "discountAmount": 0,
      "requestDate": "0001-01-01T00:00:00",
      "paymentDate": "2024-02-29T15:13:57.60449Z",
      "createDateTime": null
    },
    {
      "orderId": "8ee05b5f-652a-471b-bbec-dc0887e1f08f",
      "paymentTransactionId": "3095a2bd-adf2-4f4d-b88c-caeefb19bc72",
      "relatedTransactionId": null,
      "type": "chargeback",
      "description": "Transaction Ref: 3095a2bd-adf2-4f4d-b88c-caeefb19bc72 was disputed",
      "totalAmountFormatted": null,
      "totalAmount": 4565,
      "discountAmount": 0,
      "requestDate": "0001-01-01T00:00:00",
      "paymentDate": "2024-02-29T23:07:17.365108Z",
      "createDateTime": null
    }
  ],
  "totalBalancePaid": 0,
  "totalBalancePaidFormatted": "$0",
  "balanceToBePaid": -4519.35,
  "balanceToBePaidFormatted": "$-4519.35",
  "refundsAmount": 4565,
  "paymentInstrumentToken": "88e877a7-9900-4b4c-b344-019cc2a61316",
  "merchantName": "YOUR STORE",
  "merchantId": "{your MID}"
}