Most payment systems will offer a test environment to have your develop deployment talk to.
So in your .env file you would use the testing API keys, and then in your production .env you will use the 'real' keys.
Lacking those, just create a fake product for 1cent and buy as much as you want! Do mind the costs the payment provider charge for handling transactions ;)