How to do AUTH_ONLY with Authorize.Net Hosted Payment Form

316 views Asked by At

I'm using Accept.js from Authorize.Net and have managed to successfully get immediate payments working.

However, I would like to do AUTH_ONLY and I am not sure how I would pass this information on.

Here is the current form (sensitive info removed):

<form id="paymentForm"
method="POST"
action="https://YourServer/PathToExistingPaymentProcessingScript">
<input type="hidden" name="dataValue" id="dataValue" />
<input type="hidden" name="dataDescriptor" id="dataDescriptor" />
<button type="button"
    class="AcceptUI"
    data-billingAddressOptions='{"show":true, "required":false}' 
    data-apiLoginID="YOUR API LOGIN ID" 
    data-clientKey="YOUR PUBLIC CLIENT KEY"
    data-acceptUIFormBtnTxt="Submit" 
    data-acceptUIFormHeaderTxt="Card Information"
    data-paymentOptions='{"showCreditCard": true, "showBankAccount": true}' 
    data-responseHandler="responseHandler">Pay
</button>

Could anyone point me in the right direction, please? I find their docs very convoluted.

1

There are 1 answers

0
John Conde On

According to the documentation, the code above will generate a nonce which you would use in place of payment data in a createTransactionRequest API call. In that createTransactionRequest call is where you would specify that this is an AUTH_ONLY request. Basically this is a twp step process where first you get the nonce with the payment info (that never touches your system) and then you make a standard API call using that nonce. That APi call is where you give more payment details like payment type.