/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
id | The FlexFactor order id returned by the /evaluate response. |
bearer token | The auth token returned by /oauth2/token |
Try it right now:
- Check out the /orders/{id} Reference.
Response
Field Name | Field Type | Field Explanation |
---|---|---|
id | String | Unique identifier for the order |
correlationId | String | Identifier used to correlate this transaction with other related transactions |
referenceNumber | String | Reference number unique to this request |
status | Integer | An 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" |
statusName | String | Textual representation of the order's status. See Order status. |
orderPlacedDate | String | Date and time when the order was placed, in ISO 8601 format |
expiryDate | String | Expiry date of the order, can be null |
billingAddress | Object | Object containing billing address details like country, city, and postal code |
shippingAddress | Object | Object containing shipping address details, can be null |
firstName | String | First name of the customer |
lastName | String | Last name of the customer |
String | Email address of the customer | |
phone | String | Phone number of the customer |
secondaryEmail | String | Secondary email of the customer, can be empty |
currencyCode | String | Currency code for the transaction (e.g., USD) |
currencySymbol | String | Symbol representing the currency used (e.g., $) |
amount | Float | Total amount of the order |
formattedAmount | String | Formatted total amount of the order with currency symbol |
orderItems | Array | List of items included in the order, each item is an object with details like name, price, and quantity |
activityItems | Array | List of payment-related activities for the order, such as authorization and capture transactions, as well as dispute and refund |
totalBalancePaid | Integer | Total amount paid towards the order |
totalBalancePaidFormatted | String | Formatted total amount paid towards the order |
balanceToBePaid | Float | Remaining balance to be paid |
balanceToBePaidFormatted | String | Formatted remaining balance to be paid |
refundsAmount | Integer | Total amount refunded |
paymentInstrumentToken | String | Token representing the payment method used for the transaction |
merchantName | String | Name of the merchant/store where the order was placed |
merchantId | String | Merchant identifier specific to the store |
Order status
Order status | Description | Returned by |
---|---|---|
Challenge | Conditional 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 required | Pending status: The transaction rescue requires a /capture. | /evaluate /orders webhooks |
Submitted | Pending status: The transaction was successfully received. Order status needs to be updated via GET /orders or webhooks. | /evaluate |
Draft | Pending status: MIT order was picked up by system, but is not yet being processed. | /orders |
Processing | Pending status: order is being processed. | /orders |
Expired | Fail status: transaction can no longer be rescued. | /orders |
Completed | Success status: transaction was rescued. | /orders webhook |
Approved | Success status: transaction was rescued. | /evaluate webhook |
Declined | Fail status: transaction could not be rescued | /evaluate webhook |
Cancelled | Fail 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}"
}
Updated 5 months ago