Hi,
I’m trying to send an order to a POS, so I’m following the structure of 1) create order 2) Pay order
The problem is that I get an error with the order/pay API. It says "The total of the requested payments does not match the total of the sale order." but from what I can see it’s the same amount everywhere: 265 cents.
What is the cause of this error so I can solve it?
Thank you very much
v2/orders/tgCNA6tn1nbLaLifXSPm0MoEJYFZY/pay
{
"idempotency_key": "5bb1c88e-c689-46d6-b95f-78f95d817801",
"order": {
"location_id": "REDACTED",
"fulfillments": [
{
"state": "PROPOSED",
"type": "PICKUP",
"uid": "34b9a35a-aa25-4519-8afe-0b9fa348098d",
"pickup_details": {
"auto_complete_duration": "P0DT1H30M15S",
"is_curbside_pickup": true,
"pickup_window_duration": "P0DT0H20M15S",
"prep_time_duration": "P0DT0H05M15S",
"recipient": {
"display_name": "TEST REDACTED - DO NOT FULLFILL",
"email_address": "[email protected]",
"phone_number": "8018954223"
},
"schedule_type": "ASAP"
}
}
],
"line_items": [
{
"quantity": "1",
"base_price_money": {
"amount": 265,
"currency": "USD"
},
"catalog_object_id": "REDACTED",
"item_type": "ITEM"
}
],
"source": {
"name": "REDACTED"
},
"state": "OPEN"
}
}
{
"idempotency_key": "3e3300d2-576b-408b-beb1-c036d34ea6a9",
"source_id": "EXTERNAL",
"amount_money": {
"amount": 265,
"currency": "USD"
},
"external_details": {
"type": "OTHER",
"source": "Subscription Redemption",
"Source_id": "REDACTED",
"source_fee_money": {
"amount": 265,
"currency": "USD"
}
}
}
{
"errors": [
{
"code": "BAD_REQUEST",
"detail": "The total of the requested payments does not match the total of the sale order.",
"category": "INVALID_REQUEST_ERROR"
}
]
}
PUTTING THE RESPONSE FOR REFERNECE BELOW:
{
"order": {
"id": "tgCNA6tn1nbLaLifXSPm0MoEJYFZY",
"location_id": "REDACTED",
"line_items": [
{
"uid": "XlHiwxfaD3fBh7OU4EjwMC",
"catalog_object_id": "REDACTED",
"catalog_version": 1693791865805,
"quantity": "1",
"name": "REDACTED",
"variation_name": "",
"base_price_money": {
"amount": 265,
"currency": "USD"
},
"gross_sales_money": {
"amount": 265,
"currency": "USD"
},
"total_tax_money": {
"amount": 0,
"currency": "USD"
},
"total_discount_money": {
"amount": 0,
"currency": "USD"
},
"total_money": {
"amount": 265,
"currency": "USD"
},
"variation_total_price_money": {
"amount": 265,
"currency": "USD"
},
"item_type": "ITEM",
"total_service_charge_money": {
"amount": 0,
"currency": "USD"
}
}
],
"fulfillments": [
{
"uid": "34b9a35a-aa25-4519-8afe-0b9fa348098d",
"type": "PICKUP",
"state": "PROPOSED",
"pickup_details": {
"pickup_at": "2023-09-06T03:10:20.158Z",
"schedule_type": "ASAP",
"recipient": {
"display_name": "TEST REDACTED - DO NOT FULLFILL",
"email_address": "REDACTED",
"phone_number": "8018954223"
},
"auto_complete_duration": "P0DT1H30M15S",
"pickup_window_duration": "P0DT0H20M15S",
"prep_time_duration": "P0DT0H05M15S",
"is_curbside_pickup": true
}
}
],
"created_at": "2023-09-06T03:05:05.160Z",
"updated_at": "2023-09-06T03:05:05.160Z",
"state": "OPEN",
"version": 1,
"total_tax_money": {
"amount": 0,
"currency": "USD"
},
"total_discount_money": {
"amount": 0,
"currency": "USD"
},
"total_tip_money": {
"amount": 0,
"currency": "USD"
},
"total_money": {
"amount": 265,
"currency": "USD"
},
"total_service_charge_money": {
"amount": 0,
"currency": "USD"
},
"net_amounts": {
"total_money": {
"amount": 265,
"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": "REDACTED"
},
"net_amount_due_money": {
"amount": 265,
"currency": "USD"
}
}
}