Shopify: 402 PAYMENT_REQUIRED API error Fix
I transferred a headless Shopify Next.js shop from my partner account to a client, and suddenly the site started giving an API error
Unavailable Shop: PAYMENT_REQUIRED.
The error code for this API error is
402 Payment Required, and if you go to Shopify docs, you will find out that detailed message is "The requested shop is currently frozen. The shop owner needs to log in to the shop's admin and pay the outstanding balance to unfreeze the shop"
The fix for this is simply to check if your account has any unpaid balance, and if there is, they need to be paid to unfreeze the store API access.
If there isn't, I would double check the environment variables to make sure you are connected to the right store.