Integration and Testing

Authorize.Net API questions and help with your payment integration.

Reply
Member
Posts: 1
Registered: ‎08-12-2019

opaqueData for profile, transaction and recurring billing on same flow!!

Hi,

 

We designed a subscription flow as follows:

 

1. Retrive opaqueData: accept.dispatchData()

2. Create profile: createCustomerProfileRequest

3. Create real time transaction: createTransactionRequest 

4. Create subscription: ARBCreateSubscriptionRequest

 

Is it right to use the same opaqueData retrived on step 1 for use on steps 2, 3 and 4? 

 

Thanks for your help

Member
Posts: 1
Registered: ‎12-09-2020

Re: opaqueData for profile, transaction and recurring billing on same flow!!

DSP #: 
DSP1070
Version: 
1.0.2
Comments: 

.pdf file. DMTF Standard

Publication Date: 
Sunday, May 25, 2014
Status: 
Published
Contributor
Posts: 14
Registered: ‎03-26-2013

Re: opaqueData for profile, transaction and recurring billing on same flow!!

Can anyone answer this? I have the same question.

Highlighted
Contributor
Posts: 14
Registered: ‎03-26-2013

Re: opaqueData for profile, transaction and recurring billing on same flow!!

After a lot of trial and error, and realizing that the docs don't really explain this well at all, I got this working. I'm now charging my initial charge on a subscription, and then the subscription engages on the next interval. Just like a createTransactionRequest, it puts an immediate pending hold on my bank funds for the subscription interval amount before the cutoff time, and on the cuttoff time, it completes the transaction. It's not exactly like your 1-4 list says, however. Instead, it's:

 

1. Retrieve opaqueData: accept.dispatchData(). You only need to do this once for the card, unlike what I thought earlier.

 

2. Create real time transaction and profile in a single step: createTransactionRequest, but with the following inside the transactionRequest:

 

<profile>
<createProfile>true</createProfile>
</profile>
<transactionSettings> <setting> <settingName>recurringBilling</settingName> <settingValue>true</settingValue> </setting> </transactionSettings> <processingOptions> <isFirstRecurringPayment>true</isFirstRecurringPayment> </processingOptions>

3. From the response on that createTransactionRequest, parse the transId, customerProfileId, and the numericString value inside the customerPaymentProfileIdList. You'll need those values on the next step. (The transId is only necessary if you want to store it in your database for perhaps voiding or refunding that single payment later.)

 

4. Create the subscription: ARBCreateSubscriptionRequest, but link it to the profile that you just created by adding this block into the <subscription> element of that request:

 

<profile>
    <customerProfileId>{INSERT CUSTOMER PROFILE ID HERE}</customerProfileId>
    <customerPaymentProfileId>{INSERT CUSTOMER PAYMENT PROFILE ID HERE}</customerPaymentProfileId>
</profile>

...and also, remember to set your startDate to the next interval, not today's date. So, if it's an annual subscription, take today's date and add 12 months. If it's a month, add 1 month.

 

...and then on the response to this, you can parse the subscriptionId and store that in your database in case you want to void or cancel this subscription by its subscriptionId later on.

Contributor
Posts: 14
Registered: ‎03-26-2013

Re: opaqueData for profile, transaction and recurring billing on same flow!!

Forgot on my step 4 to tell you that you'll use the subscription profile instead of the opaqueData dataDescriptor and dataValue (Payment Nonce). So, that's why you don't need to use Accept.js to turn out one Payment Nonce and then your code on the server handles it from there.

Member
Posts: 2
Registered: ‎07-13-2021

Re: opaqueData for profile, transaction and recurring billing on same flow!!

We empower artists, creators, and players to build the platform they always envisioned, providing the means to unleash your creativity. adu builders san jose