cancel
Showing results for 
Search instead for 
Did you mean: 

Recurring Payment Flow using Accept.js

Hi, 

 

We decided tu use Accept.js with our own form designed.

In this form, customers can make a payment for pay per view movie, or subscribe montly to a premium service.

 

Wich should be the flow for a recurring payment (premium subscription) with Accept.js?

We need to creat a one-way transaction first, and then creat de recurring payment?

 

Thanks in advanced.

mzelener
Member
3 REPLIES 3

You can create a direct subscription with opaqueData in payment section:-

in place of credit card details here :

"payment": {
                "creditCard": {
                    "cardNumber": "4111111111111111",
                    "expirationDate": "2020-12"
                }
            }

you can place the opaqueData object you receive from Accept.

 

you can check more here :- https://developer.authorize.net/api/reference/#recurring-billing-create-a-subscription

 

I hope it will help you.

 

Thanks,

Shobhit Agrawal

Shoagraw
Authorize.Net Developer Authorize.Net Developer
Authorize.Net Developer

Thanks for your reply!

I was reading in this forum many people suggesting real time transactions before creating an ARB.

 

This has sense for us because we need to be sure the user has effectively paid before enabling permisson to our enterprise services.

 

So the idea is to create first a one time transaction, and then create the ARB,

I have 2 questions:

1)  It is neccessary to create 2 different opaque data or only one opaque could be used for both one time transaction and ARB creation?

 

2)It is suggested to manage any type of time out on our servers for working with one-time transactions or ARB?

I have a similar situation. We appear to successfully re-use the Opaque data. 

1) acquire opaque data with Accept.js from our custom form.

2) Submit opaque data to "createTransactionRequest". 

3) re-use opaque data to then create an ARB.

 

This process happens in less than 2-3 seconds. 

 

We've also discussed another approach...

1) acquire opaque data with Accept.js from our custom form.

2) Submit opaque data to "createTransactionRequest" - and set the properties to create CIM (which stores the payment obj). 

3) call "ARBCreateSubscriptionRequest" and use the CIM information to create the ARB. 

 

In this approach, we only used the opaque data once. 

 

 

 

I'm not sure which approach is *best*, any thoughts?

raisedonors
Contributor