I have a created an order in my sandbox via the api. I’m working on a webhook which is processing the payment creation. From that webhook message, I am able to get the orderId and thus the order.
On each line_item
there is a catalog_object_id
. I am wanting to get that catalog object via the CatalogApi’s Retrieve catalog object
, however it says the object for each item is not in the catalog.
What is catalog_object_id
and how can I retrieve the items that are in the order? Below is the payment object and the related order. It seems like this should be possible, when I go into the sandbox dashboard I can see all the details in the transactions view.
{
"merchant_id": "MLA96JETHMF89",
"type": "payment.updated",
"event_id": "bcdaaf3d-56b1-38ef-a9ac-a6fc0eb7f750",
"created_at": "2024-02-19T00:46:52.559Z",
"data":
{
"type": "payment",
"id": "LNyLeOxUx1HV7KtxD06vf0qZtofZY",
"object":
{
"payment":
{
"amount_money":
{
"amount": 4188,
"currency": "USD"
},
"application_details":
{
"application_id": "sandbox-sq0idb-kqOew23r1THtzrKww4VlCg",
"square_product": "ECOMMERCE_API"
},
"approved_money":
{
"amount": 4188,
"currency": "USD"
},
"card_details":
{
"avs_status": "AVS_ACCEPTED",
"card":
{
"bin": "411111",
"card_brand": "VISA",
"card_type": "CREDIT",
"exp_month": 12,
"exp_year": 2025,
"fingerprint": "sq-1-uVNsmkI7zAzvl4q8-FIEYwEpGzAPqYBt9DsAugPuyNlpA7LkAT8MLrCpbPmtevqjDA",
"last_4": "1111",
"prepaid_type": "NOT_PREPAID"
},
"card_payment_timeline":
{
"authorized_at": "2024-02-19T00:46:44.241Z",
"captured_at": "2024-02-19T00:46:44.406Z"
},
"cvv_status": "CVV_ACCEPTED",
"entry_method": "KEYED",
"statement_description": "SQ *MONTEZUMA GOSQ.COM",
"status": "CAPTURED"
},
"created_at": "2024-02-19T00:46:44.127Z",
"delay_action": "CANCEL",
"delay_duration": "PT168H",
"delayed_until": "2024-02-26T00:46:44.127Z",
"id": "LNyLeOxUx1HV7KtxD06vf0qZtofZY",
"location_id": "LS26WQECK9N8G",
"order_id": "QiX2VkDzqyw2t0C34GdNmoacab4F",
"processing_fee":
[
{
"amount_money":
{
"amount": 151,
"currency": "USD"
},
"effective_at": "2024-02-19T02:46:46.000Z",
"type": "INITIAL"
}
],
"receipt_number": "LNyL",
"receipt_url": "https://squareupsandbox.com/receipt/preview/LNyLeOxUx1HV7KtxD06vf0qZtofZY",
"risk_evaluation":
{
"created_at": "2024-02-19T00:46:44.241Z",
"risk_level": "NORMAL"
},
"source_type": "CARD",
"status": "COMPLETED",
"total_money":
{
"amount": 4188,
"currency": "USD"
},
"updated_at": "2024-02-19T00:46:46.028Z",
"version": 3
}
}
}
}
And the order:
{
"order": {
"id": "QiX2VkDzqyw2t0C34GdNmoacab4F",
"location_id": "LS26WQECK9N8G",
"line_items": [
{
"uid": "ZNVz3CyWjmLCVHRgKz3xqB",
"catalog_object_id": "A7QXIW2X3YVYAAEK76JXCR7F",
"catalog_version": 1706660599161,
"quantity": "1",
"name": "Color Lili (Non-White)",
"variation_name": "Regular",
"base_price_money": {
"amount": 1229,
"currency": "USD"
},
"gross_sales_money": {
"amount": 1229,
"currency": "USD"
},
"total_tax_money": {
"amount": 0,
"currency": "USD"
},
"total_discount_money": {
"amount": 0,
"currency": "USD"
},
"total_money": {
"amount": 1229,
"currency": "USD"
},
"variation_total_price_money": {
"amount": 1229,
"currency": "USD"
},
"item_type": "ITEM",
"total_service_charge_money": {
"amount": 0,
"currency": "USD"
}
},
{
"uid": "Gl4E9LSDjaNbEg9D8ADivC",
"catalog_object_id": "B32WVXC7WI5N2FFZCGZUSBKL",
"catalog_version": 1706660599161,
"quantity": "2",
"name": "Tulip - 6in",
"variation_name": "Regular",
"base_price_money": {
"amount": 1080,
"currency": "USD"
},
"note": "Red/White",
"gross_sales_money": {
"amount": 2160,
"currency": "USD"
},
"total_tax_money": {
"amount": 0,
"currency": "USD"
},
"total_discount_money": {
"amount": 0,
"currency": "USD"
},
"total_money": {
"amount": 2160,
"currency": "USD"
},
"variation_total_price_money": {
"amount": 2160,
"currency": "USD"
},
"item_type": "ITEM",
"total_service_charge_money": {
"amount": 0,
"currency": "USD"
}
},
{
"uid": "2q1UdpUwUOmf5lPepSfdt",
"catalog_object_id": "HKY3BXYYLUYY5U4NQVWK3OOK",
"catalog_version": 1706660599161,
"quantity": "1",
"name": "Delivery Charge",
"variation_name": "Regular",
"base_price_money": {
"amount": 799,
"currency": "USD"
},
"gross_sales_money": {
"amount": 799,
"currency": "USD"
},
"total_tax_money": {
"amount": 0,
"currency": "USD"
},
"total_discount_money": {
"amount": 0,
"currency": "USD"
},
"total_money": {
"amount": 799,
"currency": "USD"
},
"variation_total_price_money": {
"amount": 799,
"currency": "USD"
},
"item_type": "ITEM",
"total_service_charge_money": {
"amount": 0,
"currency": "USD"
}
}
],
"metadata": {
"CPN": "6466445162",
"dAddr": "31535 County Road 12 #67867, Montezuma, KS 67867, USA",
"eta": "2024-02-19T01:29:07Z"
},
"created_at": "2024-02-19T00:46:42.247Z",
"updated_at": "2024-02-19T00:46:46.000Z",
"state": "COMPLETED",
"version": 4,
"total_tax_money": {
"amount": 0,
"currency": "USD"
},
"total_discount_money": {
"amount": 0,
"currency": "USD"
},
"total_tip_money": {
"amount": 0,
"currency": "USD"
},
"total_money": {
"amount": 4188,
"currency": "USD"
},
"closed_at": "2024-02-19T00:46:44.499Z",
"tenders": [
{
"id": "LNyLeOxUx1HV7KtxD06vf0qZtofZY",
"location_id": "LS26WQECK9N8G",
"transaction_id": "QiX2VkDzqyw2t0C34GdNmoacab4F",
"created_at": "2024-02-19T00:46:44Z",
"amount_money": {
"amount": 4188,
"currency": "USD"
},
"type": "CARD",
"card_details": {
"status": "CAPTURED",
"card": {
"card_brand": "VISA",
"last_4": "1111",
"fingerprint": "sq-1-uVNsmkI7zAzvl4q8-FIEYwEpGzAPqYBt9DsAugPuyNlpA7LkAT8MLrCpbPmtevqjDA"
},
"entry_method": "KEYED"
},
"payment_id": "LNyLeOxUx1HV7KtxD06vf0qZtofZY"
}
],
"total_service_charge_money": {
"amount": 0,
"currency": "USD"
},
"net_amounts": {
"total_money": {
"amount": 4188,
"currency": "USD"
},
"tax_money": {
"amount": 0,
"currency": "USD"
},
"discount_money": {
"amount": 0,
"currency": "USD"
},
"tip_money": {
"amount": 0,
"currency": "USD"
},
"service_charge_money": {
"amount": 0,
"currency": "USD"
}
},
"source": {
"name": "www.thegardenstop.us"
},
"customer_id": "J4RENCVAMKHMY2GH2SDS4S89JR",
"pricing_options": {
"auto_apply_taxes": true
},
"net_amount_due_money": {
"amount": 0,
"currency": "USD"
}
}
}