I need to test an integration, but gift cards don’t seem to be fully supported in the sandbox. Because I am unable to modify the gift card’s balance, I cannot test rejections or partial payments. Is this correct? If so, that seems like a pretty big flaw, and a huge liability for my company.
Unfortunately, you’re correct. In the sandbox we have preset card numbers (as seen here: https://developer.squareup.com/docs/testing/test-values#client-side-testing), and sandbox doesn’t let you test those beyond found in this document (i.e you can’t test real credit card values).
As for rejections, there are error state nonces. For example
cnon:gift-card-nonce-insufficient-permission that would generate an error while trying to process the payment. Our APIs do not currently support changing the gift card balance in general, so that currently is not possible.