I noticed when i set “COMPLETE” as delay action in the request of initializing terminal checkout with java sdk (latest version so far: 38.0.0.20240222), the created payment is still with delay action as “CANCEL”, is there anything i missed or mistook?
my code is as below:
PaymentOptions paymentOptions = new PaymentOptions.Builder()
.autocomplete(false)
.delayDuration("PT36H") // 36 hours at most for terminal checkout
.delayAction("COMPLETE") // complete the payment
.build();
the testing is done in sandbox env with the sandbox terminal API (without terminal hardware), i didn’t try it in production env (a bit dangerous in our business)
some more info,
we happened to get a card payment (still created through terminal checkout) in production env with delay duration and delay action set as below,
PaymentOptions paymentOptions = new PaymentOptions.Builder()
.autocomplete(false)
.delayDuration("PT36H") // 36 hours at most for terminal checkout
.delayAction("COMPLETE") // complete the payment
.build();
the created payment data in square is as below, delay action is set as “COMPLETE” as expected,
the delay duration is “PT36H0M” (a little different from “PT36H” when created with default delay duration, i think the extra “…0M” doesn’t matter though)