Showing results for 
Search instead for 
Did you mean: 

E00114 Invalid OTS Token at create subscription request after Accept.js


I'm trying to use Accept.js + my Server request to create subscription. 


Here a code i found at documentation:


// Set the transaction's refId
        $refId = 'ref' . time();
        // Subscription Type Info
        $subscription = new AnetAPI\ARBSubscriptionType();
        $subscription->setName("Socks Subscription ".mt_rand(0,9999));
        $interval = new AnetAPI\PaymentScheduleType\IntervalAType();
        $paymentSchedule = new AnetAPI\PaymentScheduleType();
        $paymentSchedule->setStartDate(new DateTime('2019-01-22'));

        $payment = new AnetAPI\PaymentType();

        $creditCard = new AnetAPI\CreditCardType();


        $order = new AnetAPI\OrderType();
        $order->setDescription("Description of the subscription");

        $billTo = new AnetAPI\NameAndAddressType();
        $request = new AnetAPI\ARBCreateSubscriptionRequest();
        $controller = new AnetController\ARBCreateSubscriptionController($request);
        $response = $controller->executeWithApiResponse( \net\authorize\api\constants\ANetEnvironment::SANDBOX);

        if (($response != null) && ($response->getMessages()->getResultCode() == "Ok") )
            echo "SUCCESS: Subscription ID : " . $response->getSubscriptionId() . "\n";
            echo "ERROR :  Invalid response\n";
            $errorMessages = $response->getMessages()->getMessage();
            echo "Response : " . $errorMessages[0]->getCode() . "  " .$errorMessages[0]->getText() . "\n";

It's working well, but it insert card data directly. I want to use Accept.js so i switched

$creditCard = new AnetAPI\CreditCardType();




$opaqueData = new AnetAPI\OpaqueDataType();


 $opaquedataValue contains a value i recieved from Accept.js 

So now it's not working and i have ERROR : Invalid response Response : E00114 Invalid OTS Token.

What is wrong?

Please help me :)


I think i have the same issue like a guy from this topic:


I took only one token from Accept.js every time i send there different card data


Hi @serg1992a,

We generally get the above response code in the following case:


When payment token is not found on the server (most likely because it already got used).  Can you please try generating the new token and try with it ?


Also, sometimes incase of duplicate transactions, you encounter this issue. As it is a One time token, therefore, in the very first transaction it was consumed and for the second and forth coming transactions it is giving you this error.

Authorize.Net Expert Authorize.Net Expert
Authorize.Net Expert

 Hi @serg1992a


As mentioned by @AforANET you can get the E00114 error code if the token has been already used for a transaction.


But, you will also get the E00114 error if  the token you are generating in a different environment (eg Sandbox) and making create transaction request to different environment (e.g production)


Please make sure the accept.js and the create transaction request is being made to the same account on the same enviornment (either Sandbox or Production).

Authorize.Net Expert Authorize.Net Expert
Authorize.Net Expert