Showing results for 
Search instead for 
Did you mean: 

Token generation

What is the easiest way to generate a token for Accept Hosted redirect payment page?

I want to pass 4 form fields to the payment page.

Integrating the Form using a Redirect

<input type="hidden" name="token" value="Replace with form token from getHostedPaymentPageResponse" />

This is our first payment page.

Using our ID and Tran Key, I am able to get a token in the API Live console, how do I implement the code on our page?  Currently I will get "Missing or invalid token".

Thank you,


To generate a token for the Accept Hosted redirect payment page in Authorize.Net and pass four form fields to it:

  1. Obtain API Credentials: Ensure you have your API Login ID and Transaction Key from Authorize.Net. These credentials are necessary for authentication in making API requests.

  2. Generate the Token: Use these credentials to send a request to the Authorize.Net API endpoint. Specify the form fields you want to pass with this request. You'll receive a token in the API response.

  3. Implement the Token in your Form: Once you have the token from the API response, place it within a hidden input field in your payment form. Ensure that this token is accurately placed within the form structure.

  4. Validate Token Usage: Check for any discrepancies between the token you received and the one placed in the form. Make sure there are no extra characters or spaces that could lead to errors like "Missing or invalid token."

  5. Test Payment Flow: Before deploying it live, thoroughly test the payment flow using Authorize.Net's sandbox or test environment. This ensures that the integration is functioning correctly without any issues.

It's crucial to follow Authorize.Net's documentation and guidelines for API integration to ensure a seamless payment process. If you're using a specific programming language, refer to the corresponding API documentation or code examples provided by Authorize.Net for detailed implementation instructions.