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?
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:
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.
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?
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.
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 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?
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?
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:
Is there any way to simulate Australian payment rules in Sandbox?
If not, can we create or request a test account tied to the Australian region for integration testing?
Are there any recommended best practices for handling rounding when integrating with Square Payments for Australian merchants?
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.