The recalculateSize() response is correct, however there is one case where it does not work. If you set the surrounding div’s style to display: none and then changes it to display: block after paymentForm.begin() , you will continue having this issue. You will need to be setting the visibility, not the display in these cases as the latter creates this console error:
ElementNotVisibleError: SqPaymentForm element with id 'sq-card' is not visible. Does it or a parent element have 'display:none'?