Square API Error: Cash Amount Not Divisible by AUD Base Unit

We are currently encountering an issue with the Square Payment API in Australia.

[
  {
    "code": "BAD_REQUEST",
    "detail": "total_money amount of 2468 is not divisible by AUD currency base cash unit.",
    "category": "INVALID_REQUEST_ERROR"
  }
]

Could you please investigate this and advise us on how we can resolve the issue?

:waving_hand: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Troubleshoot the Payments API
Working with Monetary Amounts in Square APIs
Payments Pricing with Square APIs and SDKs

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

The error message you’re encountering indicates that the total_money amount specified in your request is not divisible by the base cash unit for the Australian Dollar (AUD). In Australia, cash payments must be specified in increments of $0.05. This means that the amount you are trying to process, 2468 (which represents $24.68 AUD), is not valid for a cash payment because it is not a multiple of 5 cents.

To resolve this issue, ensure that the total_money amount in your request is divisible by 5 when dealing with cash payments in AUD. For example, you could adjust the amount to 2470 (representing $24.70 AUD) or 2465 (representing $24.65 AUD), both of which are valid increments for cash payments in Australia.

This answer was reviewed by @josh-square.

1 Like

Thank you for the update.

The customer placed the order for $24.68, but we can’t complete the payment using $24.65 or $24.70—it throws an error saying the total amount doesn’t match.

Can you please suggest any workaround for this issue?

Hey @Mahesh! This should only apply to payments of type CASH. Is the error you’re getting for a mismatch between the order object and the amount in the CreatePayment? Do you mind sharing your order ID?

Hi Team,

We encountered a similar issue today with the Square payment endpoint for the following orders:

ivIrbLgH9SbyRmxQn5VjzKTEbQZZY

ouMM2Rf4jvonvcqqhC0cO7fFzVeZY

Let me explain the issue using one of the orders as an example:

Order ID: ivIrbLgH9SbyRmxQn5VjzKTEbQZZY

Subtotal: 1298

Service charge: 65

Total amount: 1363

We successfully created the order in Square. However, when calling the payment endpoint, we received the following error:

“errors”: [
{
“code”: “BAD_REQUEST”,
“detail”: “total_money amount of 1363 is not divisible by AUD currency base cash unit.”,
“category”: “INVALID_REQUEST_ERROR”
}
]

It seems the total amount is causing a validation issue in Square because it’s not divisible by the AUD currency’s base unit.

Could you advise on the best way to handle this scenario to avoid payment errors, while ensuring the customer is charged the correct total of 1363?

With cash payments the amount can only be specified in increments of $0.05. Both orders you provided the total_amount_due isn’t in a increment of $0.05. :slight_smile:

Thank you.

How can we handle these scenarios? The customer has already placed the order with that amount, so we cannot increase or decrease it after placement. Could you please suggest an alternative approach?

The order is still OPEN so you can update the order to accept the correct amount in cash. :slight_smile:

Sorry, I think there’s a misunderstanding.

The customer placed the order with a total amount of 1363, and we’ve created the order with the same amount. However, when creating the payment, it’s throwing an error.

We cannot modify the amount to make it a multiple of 0.05, as this is the exact amount placed by the customer. The order will be injected into Square POS only after the payment is successfully created — but in this case, we’re unable to create the payment with 1363.

Could you please advise how we can handle this scenario, given that the order amount cannot be changed?

When your calling CreatePayment what is the amount that your passing in? If you pass in 1365 does it work when accepting a cash payment? :slight_smile:

If we send the amount as 1365 during payment creation, it will still fail because the payment amount must match the original order total. Square validates that the amount used for payment creation is exactly the same as the order total.

Could you please advise on how we can handle this scenario?

I just tested and it worked for me. If you pass in 1365 in the CreatePayment request for the original order it will complete. :slight_smile:

Are you referring to creating the order with an amount of 13.63 and then creating the payment for 13.65? Could you please confirm?

Yes, that worked for me. :slight_smile:

Thank you @Bryan-Square .

We will check from our side and get back to you.

Hi @Bryan-Square

We’d like to properly test this behavior before going live with Australian clients, but we’ve Square Sandbox which supports US account, and regional validations (like the 0.05 rounding rule) don’t seem to apply there.

Could you please advise on the best approach to test this scenario? Specifically:

  1. Is there any way to simulate Australian payment rules in Sandbox?

  2. If not, can we create or request a test account tied to the Australian region for integration testing?

  3. Are there any recommended best practices for handling rounding when integrating with Square Payments for Australian merchants?

Any guidance would be greatly appreciated.

You can create a test account in your sandbox that’s an Australian account. When you create a new sandbox account it asks you what country to select. Once you create the Australian sandbox account take the access token for that account and you can then test.

:slight_smile:

Thank you @Bryan-Square . Let us check from our end and update our observations

Hi @Bryan-Square

We have created the order in the sandbox environment with a total of 1991. (CPeC6dWN3kDapZbxwZgV6KoC9b4F).

We followed your suggestions to create the payment with a round of number of 1995 with the below payload.

{
  "order_id": "CPeC6dWN3kDapZbxwZgV6KoC9b4F",
  "location_id": "LCQ4WT37PXN0W",
  "idempotency_key": "e41e6b9a-b61f-4e73-89b1-114cdf6dee48",
  "source_id": "CASH",
  "cash_details": {
    "buyer_supplied_money": {
      "amount": 1995,
      "currency": "AUD"
    }
  },
  "amount_money": {
    "amount": 1995,
    "currency": "AUD"
  }
}

But it is throwing the below error

“errors”: [

    **{**

“code”: “ORDER_TOTAL_MISMATCH”,

“detail”: “The payment total does not match the order total.”,

“category”: “INVALID_REQUEST_ERROR”

}

],

Can you please check and update us what needs to be done ?