Get payment details for a specific order - Fabric
Get Payment Details for a Specific Order
cURL
curl --request POST \
--url https://prod01.oms.fabric.inc/api/v2/order/payment-status/{orderNumber} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-site-context: <x-site-context>' \
--data '
{
"paymentIdentifier": "62272e917b12209e68751d94",
"type": "VISA",
"status": "Success",
"balances": {
"captured": 123,
"capturable": 123,
"refunded": 123,
"refundable": 123
},
"connectorInfo": {
"connectorName": "stripe",
"paymentMethodType": "Credit card",
"eventId": "<string>"
}
}
'
Python
import requests
url = "https://prod01.oms.fabric.inc/api/v2/order/payment-status/{orderNumber}"
payload = {
"paymentIdentifier": "62272e917b12209e68751d94",
"type": "VISA",
"status": "Success",
"balances": {
"captured": 123,
"capturable": 123,
"refunded": 123,
"refundable": 123
},
"connectorInfo": {
"connectorName": "stripe",
"paymentMethodType": "Credit card",
"eventId": "<string>"
}
}
headers = {
"x-site-context": "<x-site-context>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
JavaScript
const options = {
method: 'POST',
headers: {
'x-site-context': '<x-site-context>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
paymentIdentifier: '62272e917b12209e68751d94',
type: 'VISA',
status: 'Success',
balances: {captured: 123, capturable: 123, refunded: 123, refundable: 123},
connectorInfo: {connectorName: 'stripe', paymentMethodType: 'Credit card', eventId: '<string>'}
})
};
fetch('https://prod01.oms.fabric.inc/api/v2/order/payment-status/{orderNumber}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
PHP
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://prod01.oms.fabric.inc/api/v2/order/payment-status/{orderNumber}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'paymentIdentifier' => '62272e917b12209e68751d94',
'type' => 'VISA',
'status' => 'Success',
'balances' => [
'captured' => 123,
'capturable' => 123,
'refunded' => 123,
'refundable' => 123
],
'connectorInfo' => [
'connectorName' => 'stripe',
'paymentMethodType' => 'Credit card',
'eventId' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-site-context: <x-site-context>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Response Schema
Successful Response
{
"orderNumber": "309019176",
"channelId": "12",
"statusCode": "ORDER_CREATED",
"items": [...],
"shipInfo": [...],
"version": 123,
"orderId": "5349b4ddd2781d08c09890f4",
"orderDate": "2022-05-12T09:30:31.198Z",
"cancellationDate": "2022-05-12T09:30:31.198Z",
"allocationDate": "2022-05-12T09:30:31.198Z",
"cartId": "b03b72dc-78d8-4ea4-90fc-2fe6a1fe6569",
"type": "WEB",
"subType": "International",
"processName": "CANCEL",
"employeeId": "43278",
"retail": {...},
"orderSubTotal": 123.45,
"originalSubTotal": 113.45,
"orderDiscount": 1.23,
"originalDiscounts": 1.45,
"feeTotal": 12.34,
"originalFeeTotal": 12.34,
"taxTotal": 12.34,
"appeasementTotal": 12.34,
"originalTaxTotal": 12.34,
"returnTotal": 12.34,
"cancelTotal": 12.34,
"invoiceTotal": 12.34,
"orderTotal": 146.9,
"originalOrderTotal": 146.9,
"currency": "USD",
"statusDescription": "Order Created",
"attributes": {...},
"fees": [...],
"appeasements": [...],
"discounts": [...],
"customer": {...},
"payments": [...],
"auditLogs": [...],
"notes": [...],
"orderReleaseTimestamp": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
Error Responses
{
"message": "Bad request"
}
{
"message": "Not found"
}
{
"message": "Internal server error"
}