The state licensing exam costs $39 per attempt. That means that even if you only need to retake the state or national portion of the exam, you'll pay the full $39 for your second attempt.
You must pay the $39 examination fee to PSI when you schedule your exam. You can pay by credit card (PSI accepts VISA and Mastercard).