Reply
Member
Posts: 6
Registered: ‎02-04-2019

Using Accept.js hosted form to process Subscription/Recurring payments

I see post about this subject, but they are all older posts.   Is their an update for using the Accept.js to process Subscription/Recurring payments.   

Anyone?

Posts: 319
Kudos: 53
Solutions: 35
Registered: ‎03-13-2017

Re: Using Accept.js hosted form to process Subscription/Recurring payments

Hi @jlhutto

 

You can use the Accept.js token to create a subscription . 

 

https://developer.authorize.net/api/reference/features/acceptjs.html#Using_the_Payment_Nonce_in_an_A...

 

<ARBCreateSubscriptionRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
<merchantAuthentication>
<name>3kFew5Z8Ra</name>
<transactionKey>8y25f3QT9qj3A6uh</transactionKey>
</merchantAuthentication>
<refId>123456</refId>
<subscription>
<name>Sample subscription</name>
<paymentSchedule>
<interval>
<length>1</length>
<unit>months</unit>
</interval>
<startDate>2020-08-30</startDate>
<totalOccurrences>12</totalOccurrences>
<trialOccurrences>1</trialOccurrences>
</paymentSchedule>
<amount>10.29</amount>
<trialAmount>0.00</trialAmount>
<payment>
<opaqueData>
<dataDescriptor>COMMON.ACCEPT.INAPP.PAYMENT</dataDescriptor>
<dataValue>eyJjb2RlIjoiNTBfMl8wNjAwMDUyNUMxREY1NEVGNDBGQkNDNDdCNTk3QjI2QzI5MjAzNUJEOTUwRTQ3MjBCMTJDODM2NDk2NDhBMTgwNjg4RTlENTZGMDg5RTE1MEJGMjI4Q0U0NkJCMzQ3QzcwODk1QjE5IiwidG9rZW4iOiI5NTI3ODM1MzMxMzgzOTQ5MTA0NjA0IiwidiI6IjEuMSJ9</dataValue>
</opaqueData>
</payment>
<billTo>
<firstName>John</firstName>
<lastName>Smith</lastName>
</billTo>
</subscription>
</ARBCreateSubscriptionRequest>

 

 

Thanks

Anurag

Follow me at

https://twitter.com/anuragg29

https://www.linkedin.com/in/anuragg



Send feedback at developer_feedback@authorize.net
Member
Posts: 6
Registered: ‎02-04-2019

Re: Using Accept.js hosted form to process Subscription/Recurring payments

I set it up but Now I'm getting this error.

 

E00114 Invalid OTS Token

 

Posts: 2,662
Topics: 57
Kudos: 224
Blog Posts: 67
Registered: ‎12-05-2011

Re: Using Accept.js hosted form to process Subscription/Recurring payments

Hello @jlhutto

 

An E00114 error typically occurs when you attempt to use an Accept nonce twice.  If you need to make multiple transactions, you can:

 

1. Set the createProfile flag on createTransactionRequest.  If the transaction is successful, a customer profile is created which you can use for subsequent transactions.

2. Create a customer profile first using the Accept nonce and then use the customer profile to create subscriptions, transactions, etc.

 

Richard


Build modern websites and mobile applications without increasing PCI burden using Authorize.Net Accept


Still using SIM, DPM or AIM? Please check our upgrade guide for details on migrating to our full Authorize.Net API.
Member
Posts: 6
Registered: ‎02-04-2019

Re: Using Accept.js hosted form to process Subscription/Recurring payments

Thanks for the reply... .  

 

I'm using the accept.js hosted payment page.   Then processing using the createTransacationRequest.    I don't see a createProfile flag.   

 

I found it in the chargeCreditCard api.    

 

I'm trying to stay in the SAQ A compliance and that requires me to just accept.js hosted form.

Is thier anyway other than creating the customer profile first?
I hate the idea of not knowing the credit card is good before creating the profile.

 

 

Highlighted
Posts: 2,662
Topics: 57
Kudos: 224
Blog Posts: 67
Registered: ‎12-05-2011

Re: Using Accept.js hosted form to process Subscription/Recurring payments

@jlhutto

 

If you are using AcceptUI, and the payment nonce returned to create a transaction, you can set create profile:

 

profile The following field enables you to create a customer profile from the data sent to make the transaction.

 
createProfile Indicates whether to create a customer profile.

If set to true, a customer profile and payment profile will be generated from the customer and payment data.
Boolean.

Either true or false.

 

If your transaction is successful, it will contain a customer profile which can be used to create a subscription.

 

OR, if you only need to create a subscription but not immediately process a transaction, you can just use the nonce to create a subscription which will run on the date you specify.

 

Richard


Build modern websites and mobile applications without increasing PCI burden using Authorize.Net Accept


Still using SIM, DPM or AIM? Please check our upgrade guide for details on migrating to our full Authorize.Net API.
Member
Posts: 6
Registered: ‎02-04-2019

Re: Using Accept.js hosted form to process Subscription/Recurring payments

I've been able to setup the profile using the information you provided. 

But if the customer already has a profile, it doesn't return the profileID.   

It just send the error.   

 

How can I get the ProfileID if they already have one?