Hello,
I see issues with webhooks. I tested them on Sandbox and everything works correctly, but on 11th of May there was an issue on Production.
The error occurs when through Square App on Mobile device user create an order. The first issue is that it’s returned “ECOMMERCE_API” instead one of “SQUARE_POS” or something else that is related. This is bug ? How I can recognize that the order was made through my app ? When I used it on sandbox if I use Square Website it returned “VIRTUAL_TERMINAL” and when using API it returned “ECOMMERCE_API” and that make sense. Please let me know if this is bug or please give me more information about all of types when you send each depend if you use API, Mobile APP, Website app, or POS device. In documentation there is no information about it
PROD WEBHOOK:
{
“merchant_id”: “MLASHESVB7F00”,
“type”: “payment.updated”,
“event_id”: “f381ec59-6c77-3d59-81f9-a04ac6592eab”,
“created_at”: “2024-05-10T21:45:31.32Z”,
“data”: {
“type”: “payment”,
“id”: “RCNUCkZErndBMQv9Gtv02SZJmFHZY”,
“object”: {
“payment”: {
“amount_money”: {
“amount”: 5300,
“currency”: “USD”
},
“application_details”: {
“application_id”: “sq0idp-w46nJ_NCNDMSOywaCY0mwA”,
“square_product”: “ECOMMERCE_API”
},
“approved_money”: {
“amount”: 5300,
“currency”: “USD”
},
“billing_address”: {
“address_line_1”: “1005 Winding Way”,
“country”: “US”,
“first_name”: “Tace”,
“last_name”: “Loeb”,
“locality”: “Baltimore”,
“postal_code”: “21210”
},
“card_details”: {
“auth_result_code”: “09805D”,
“avs_status”: “AVS_ACCEPTED”,
“card”: {
“bin”: “440355”,
“card_brand”: “VISA”,
“card_type”: “CREDIT”,
“exp_month”: 8,
“exp_year”: 2030,
“fingerprint”: “sq-1-2IzpkWPqKGjzqePCQKRkNPMzgQZdiOMNTCKMtE8elTl8aNVSUsx46xn71Q-ifnPSLw”,
“last_4”: “0756”,
“prepaid_type”: “NOT_PREPAID”
},
“card_payment_timeline”: {
“authorized_at”: “2024-05-10T21:43:26.996Z”,
“captured_at”: “2024-05-10T21:43:27.439Z”
},
“cvv_status”: “CVV_NOT_CHECKED”,
“entry_method”: “KEYED”,
“statement_description”: “SQ *BALTIMORE FALLEN LUM”,
“status”: “CAPTURED”
},
“created_at”: “2024-05-10T21:43:26.645Z”,
“customer_id”: “J9KEBNJ8SC22R144R9QWHP9658”,
“delay_action”: “CANCEL”,
“delay_duration”: “PT168H”,
“delayed_until”: “2024-05-17T21:43:26.645Z”,
“id”: “RCNUCkZErndBMQv9Gtv02SZJmFHZY”,
“location_id”: “LG5QD7X8HPC8P”,
“order_id”: “M2gXhrmgec5u0DtIWA1c2HkQcmWZY”,
“processing_fee”: [
{
“amount_money”: {
“amount”: 184,
“currency”: “USD”
},
“effective_at”: “2024-05-10T23:43:28.000Z”,
“type”: “INITIAL”
}
],
“receipt_number”: “RCNU”,
“receipt_url”: “Receipt from Fallen Lumber”,
“risk_evaluation”: {
“created_at”: “2024-05-10T21:45:29.747Z”,
“risk_level”: “NORMAL”
},
“source_type”: “CARD”,
“status”: “COMPLETED”,
“tip_money”: {
“amount”: 0,
“currency”: “USD”
},
“total_money”: {
“amount”: 5300,
“currency”: “USD”
},
“updated_at”: “2024-05-10T21:43:28.999Z”,
“version”: 5
}
}
}
}
The second issue is in order related to the payment why it’s returned custom amount as “ITEM” ? When I using Sandbox and set custom amount the item_type in line_items is “CUSTOM AMOUNT” and that make sense.
PROD RESPONSE:
{
“order”: {
“id”: “M2gXhrmgec5u0DtIWA1c2HkQcmWZY”,
“location_id”: “LG5QD7X8HPC8P”,
“line_items”: [
{
“uid”: “jAZNodnMyfRpCcOTcZIfPC”,
“quantity”: “1”,
“name”: “Custom Amount”,
“base_price_money”: {
“amount”: 5000,
“currency”: “USD”
},
“gross_sales_money”: {
“amount”: 5000,
“currency”: “USD”
},
“total_tax_money”: {
“amount”: 300,
“currency”: “USD”
},
“total_discount_money”: {
“amount”: 0,
“currency”: “USD”
},
“total_money”: {
“amount”: 5300,
“currency”: “USD”
},
“variation_total_price_money”: {
“amount”: 5000,
“currency”: “USD”
},
“applied_taxes”: [
{
“uid”: “663e94d70dfdb”,
“tax_uid”: “F6E33A41-2DB4-4A77-BDC4-089518610A6C”,
“applied_money”: {
“amount”: 300,
“currency”: “USD”
}
}
],
“item_type”: “ITEM”,
“total_service_charge_money”: {
“amount”: 0,
“currency”: “USD”
}
}
],
“taxes”: [
{
“uid”: “F6E33A41-2DB4-4A77-BDC4-089518610A6C”,
“catalog_object_id”: “ZV7XJIWTA7PLOZT42JX4SVDM”,
“catalog_version”: 1715377276883,
“name”: “MD sales tax”,
“percentage”: “6.0”,
“type”: “ADDITIVE”,
“applied_money”: {
“amount”: 300,
“currency”: “USD”
},
“scope”: “LINE_ITEM”
}
],
“fulfillments”: [
{
“uid”: “DGwEEpkgnhYMIWIsLsRt3B”,
“type”: “DIGITAL”,
“state”: “PROPOSED”
}
],
“created_at”: “2024-05-10T21:42:47.178Z”,
“updated_at”: “2024-05-10T21:43:27.494Z”,
“state”: “OPEN”,
“version”: 6,
“total_tax_money”: {
“amount”: 300,
“currency”: “USD”
},
“total_discount_money”: {
“amount”: 0,
“currency”: “USD”
},
“total_tip_money”: {
“amount”: 0,
“currency”: “USD”
},
“total_money”: {
“amount”: 5300,
“currency”: “USD”
},
“tenders”: [
{
“id”: “RCNUCkZErndBMQv9Gtv02SZJmFHZY”,
“location_id”: “LG5QD7X8HPC8P”,
“transaction_id”: “M2gXhrmgec5u0DtIWA1c2HkQcmWZY”,
“created_at”: “2024-05-10T21:43:26.645Z”,
“amount_money”: {
“amount”: 5300,
“currency”: “USD”
},
“type”: “CARD”,
“card_details”: {
“status”: “CAPTURED”,
“card”: {
“card_brand”: “VISA”,
“last_4”: “0756”,
“exp_month”: 8,
“exp_year”: 2030,
“fingerprint”: “sq-1-2IzpkWPqKGjzqePCQKRkNPMzgQZdiOMNTCKMtE8elTl8aNVSUsx46xn71Q-ifnPSLw”,
“card_type”: “CREDIT”,
“prepaid_type”: “NOT_PREPAID”,
“bin”: “440355”
},
“entry_method”: “KEYED”
},
“tip_money”: {
“amount”: 0,
“currency”: “USD”
},
“payment_id”: “RCNUCkZErndBMQv9Gtv02SZJmFHZY”
}
],
“total_service_charge_money”: {
“amount”: 0,
“currency”: “USD”
},
“net_amounts”: {
“total_money”: {
“amount”: 5300,
“currency”: “USD”
},
“tax_money”: {
“amount”: 300,
“currency”: “USD”
},
“discount_money”: {
“amount”: 0,
“currency”: “USD”
},
“tip_money”: {
“amount”: 0,
“currency”: “USD”
},
“service_charge_money”: {
“amount”: 0,
“currency”: “USD”
}
},
“source”: {
“name”: “Payment Link”
},
“customer_id”: “J9KEBNJ8SC22R144R9QWHP9658”,
“net_amount_due_money”: {
“amount”: 0,
“currency”: “USD”
}
}
}
Please let me know ASAP if this it bug on your side or if not what I should handle this ?
Best regards
Michael