if you are trying to charge your customer the credit card fees you would have to calculate it outside Square and enter it into a variably priced item called "convenience fee" or something like it. There isn't a way for it to auto calculate a fee in Square.
There is not a way to auto calculate a fee and a set amount, like to pass on the charges in the states where it is legal. you can use a sales tax to auto calculate a percentage though and that could work. that can be complicated when it comes to tax season so I would recommend asking your accountant if it would be ok as it will appear in your account as you collected a tax. You can name the tax when making it and call it credit card fee or connivence fee.