Payments API Value Too Low Issue with Discounts

I’m seeing a strange issue where a Create Payment API call with an Order that has a discount sometimes returns this error even though the totals match:

{
  "category": "INVALID_REQUEST_ERROR",
  "code": "VALUE_TOO_LOW",
  "detail": "total requested amount 0 is below the minimum allowed"
}

Check out these occurrences for merchant ID MLXDPGT56VPW2:

2023-06-22 15:47:37 GMT-7

  • Get Order API call returns an order with ID 98o7e5tREn18HIxC84m1mGLQ8rEZY. It has net total money of $0 after applying a Square Loyalty Reward.
  • Subsequent Payment attempt with Idempotency Key 99C73605-A082-4018-AB45-BDEF869BB018 fails even though the request total of $0 matches the order.

2023-06-22 15:47:16 GMT-7

  • Get Order API call returns an order with ID HZ2ClpSfFswaTpLWGLLA4tIbHPRZY. It has net total money of $0 after applying a Square Loyalty Reward.
  • Subsequent Payment attempt with Idempotency Key 5A84B1DB-8E8C-41BB-A5E2-0F8F51206DCD fails even though the request total of $0 matches the order.

2023-06-15 15:42:56 GMT-7

  • Get Order API call returns an order with ID TZBrocrpEWCB44YN6jahPn20MFNZY. It has net total money of $0 after applying a Square Loyalty Reward.
  • Subsequent Payment attempt with Idempotency Key A30AB3AF-0864-4FF6-B93A-AD96BBE282D9 fails even though the request total of $0 matches the order.

The payment failed cause its not CASH or EXTERNAL payments. Card payments require a minimum of $0.01. :slightly_smiling_face: