Long time Authorize.Net user now changing code to utilize CIM to reduce PCI compliance. Using the .NET C# SDK so far seems straightforward and we can create and update customer and payment profiles and charge cards in sandbox so far. We like the simple Accept.JS with hosted form (simple version, no inline frames) and have it where it will return the nonce data. But what should be next?
When we call createTransactionRequest() using the nonce, will it return both a Customer and Payment Profile ID (assuming successful auth) that we can subsequently use to update values stored there such as merchantCustomerID, address in those profiles for a new customer? Is this the typical order of processing?
Finally, for an existing customer just updating their payment details, would we include their Customer Profile ID and Payment Profile ID in the createTransactionRequest() as well since they are known? How does the transaction know we just want to update information in a payment profile rather than charge the card?
Thank you and excited to implement!
Solved! Go to Solution.
โ04-25-2018 09:08 AM
Hi @beachboy301
Yes you can use the Accept nonce to either create Transaction or to add payment profiles .
For more details on Accept hosted and Customer please check below link
https://developer.authorize.net/api/reference/features/accept_hosted.html
You can have a look at Accept sample app at https://github.com/AuthorizeNet/accept-sample-app
Regarding the not showing the billing info for Accept UI , you can use the below parameter for it .
Parameter | Type | Description |
---|---|---|
data-billingAddressOptions |
JSON-formatted string | Elements of this parameter include:show - Boolean indicating whether the name and postal code fields should be shown on the form. The default is true .required - Boolean indicating whether the name and postal code fields are required to be filled in. The default is true . |
Hope it helps !!
โ04-26-2018 01:11 PM
#1 AcceptJS with hosted form and have it return to the nonce data. But, what should be the next?
Accept.js doesnt have hosted form feature suppoted - please look at this feature list- Accept_Features
AcceptUI, AcceptHosted has the hosted form. In these cases, you can have the return URL configured or show receipt when customer is done with payment
#2/ #3-
Using Accept.js, when used for createTransactionRequest (with createProfile= true) is not supported with payment method with datadescriptor- COMMON.ACCEPT.INAPP.PAYMENT.
But, you can create customerProfile using the datadescriptor as below. you can call createprofile when the transaction is done for each customer you are tracking(based on email).
UpdateCustomerProfile can also be done as below.
Please check out - https://developer.authorize.net/api/reference/#customer-profiles-update-customer-payment-profile.
<createCustomerProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd"> <merchantAuthentication> <name>78BZ5Xprry</name> <transactionKey>8s2F95Q7brhHd7Tn</transactionKey> </merchantAuthentication> <profile> <merchantCustomerId>Merchant_Customer_ID</merchantCustomerId> <description>Profile description here</description> <email>customer-profile-email1@here.com</email> <paymentProfiles> <customerType>individual</customerType> <payment> <opaqueData> <dataDescriptor>COMMON.ACCEPT.INAPP.PAYMENT</dataDescriptor> <dataValue>eyJjb2RlIjoiNTBfMl8wNjAwMDUyOEUwRkQ4MkYyRTg5NjUwOTdGM0IxNDk0Q0Y3NjBGQkQ4MEY1MjVBMTA1MUYzMDRGRUQxRDc2REFBMkMzRkQ5OUYzMjY5NDMzNThBODQ1OTM3NzIyRUYxM0NGQkZFOENGIiwidG9rZW4iOiI5NTI0Njk1NTM2MDMyNzMzNDA0NjA0IiwidiI6IjEuMSJ9</dataValue> </opaqueData> </payment> </paymentProfiles> </profile> <validationMode>testMode</validationMode> </createCustomerProfileRequest>
โ04-25-2018 04:52 PM - edited โ04-25-2018 04:53 PM
Thank you very much...especially for the link to Accept_Features which was most helpful as that page was new to me even though I been all over the documentation and site!
I have started with Accept.js with UI (seemed most simple and documentation has complete example page). I determined yesterday that I cannot use a nonce to charge and a create a profile simultaneously. However, I think I can use it to create a NEW customer/payment profile, store the returned Customer/Payment IDs in the customer record and then subsequently use a regular createTransactionRequest() to charge the card. So it would be 2 API calls minimum and also will end up with CIM profiles even if the auth subsequently fails. I was even able to use a non to update an existing customer/payment profile which is wonderful. Does this sound like a typical or appropriate workflow approach?
My understanding is that the AcceptUI approach is limited in customization. Is there anyway to hide the CVV or ZIP code fields in the popup form for example?
Finally, can you summarize the differences between "Accept Hosted" and "Accept Customer" or point me where this is provided? Advantages of one over the other? I plan to investigate those as well if the UI option is too limiting and understanding the pros and cons could save me much time.
Thank you again!
โ04-26-2018 06:27 AM
Hi @beachboy301
Yes you can use the Accept nonce to either create Transaction or to add payment profiles .
For more details on Accept hosted and Customer please check below link
https://developer.authorize.net/api/reference/features/accept_hosted.html
You can have a look at Accept sample app at https://github.com/AuthorizeNet/accept-sample-app
Regarding the not showing the billing info for Accept UI , you can use the below parameter for it .
Parameter | Type | Description |
---|---|---|
data-billingAddressOptions |
JSON-formatted string | Elements of this parameter include:show - Boolean indicating whether the name and postal code fields should be shown on the form. The default is true .required - Boolean indicating whether the name and postal code fields are required to be filled in. The default is true . |
Hope it helps !!
โ04-26-2018 01:11 PM
Thank you Anurag...very helpful!
Can you confirm that the following workflow is acceptable using AcceptUI?
1) New customer enters general name/address in my form and then I use AcceptUI popup to collect CC values.
2) Use returned nonce in a createCustomerProfileRequest() to create both customer/payment profiles (assume this does NOT charge the card).
3) Use the profile IDs returned from createCustomerProfileRequest() to then perform a regular (non-nonce) transactionRequest() to actually charge the card.
Is the above a good workflow for new customer or is there a better way?
Thank you.
โ04-26-2018 01:44 PM
@beachboy301 Yes this is a correct workflow .
Thanks
โ04-26-2018 01:46 PM