Delayed payment using Authorize.net's iframe to collect payment information - authorize.net

We occasionally allow our customers to purchase our product and delay the payment until a pre-determined date. In order to do this, we need to collect the payment information at the time the order is placed. We are using the iframe method of collecting payment information.
I imagine I can use ARB to set up a one-time payment that will be billed at a specific date. However, that only works if I have the payment information stored away in a profile to begin with.
How can I collect the user's payment information without an initial charge, so that I can set up a payment at a later date?

As mentioned by John Conde, there is a hosted form that will allow you to collect payment information. It supports iFrame. You can create a customer profile first and then initiate this form. There are options to verify the card information or defer it to later, depending on your requirements.
You can find documentation in the link below. Search for "GetHostedProfilePage"
https://www.authorize.net/content/dam/anet-redesign/documents/CIM_SOAP_guide.pdf

Related

How to differentiate Basic/Premium plan users for premium-only features in Django REST?

I am working on a beta-stage writing tool SaaS that is built with NextJS, React, and Django REST. As I’m gaining some user base, I am starting to research on introducing a premium plan to the mix using Stripe.
As most other SaaSs, I will have a subscription-based premium plan which grants access to premium-only features. However, even after days of research, I am still lost how this is commonly implemented in Django/Backend. Here is what I’ve thought of so far, but again, I am not sure if it’s the best/common way to accomplish this.
User model has a ‘premium’ field which is either True or False
Whenever user clicks on a premium-only API call, Django will check if user is premium or not to decide whether to make the actual API call. I currently have a '/user/me/' route which returns basic user information as API GET call.
Upon successful stripe payment, stripe redirects user to the success_url. Then, somehow I will detect when user lands on success_url and then set that user’s premium field to True.
I know this is not the ideal way, because I already see lots of issues/hurdles:
How will I set ‘premium’ field back to False after user’s payment stops
How can I ‘detect’ stripe’s payment to set user’s premium field
Is this feature supposed to be implemented with Stripe customer objects instead? I would appreciate any guidance on where I should be looking for solutions.
If you use subscription on Checkout Session (low code solution), you can add additional key-value pair data such as premium: true in metadata and subscription_data.metadata fields when creating a subscription.
Once the payment is completed, those metadata will appear in checkout.session.completed and customer.subscription.updated webhook events, which you can then set the user as premium in your own database.
A customer object in Stripe can have multiple subscriptions, so this feature will be implemented on subscription object instead.

Create complex order with Stripe payment

I am trying to allow my users to pay for their booking (for an event) on my website using Stripe. I've got most of the processing working well but I don't know how to connect the response I get from Stripe which indicates that the payment has been successful to my database so that it knows all the details required to make the booking.
In the standard situation of "buying X number of products", I know that I can create an order on the server which contains those details. Then I can put that order ID into the Stripe request and I can use that when the payment is successful to go and fulfil that order.
But in my case, I have to accept a load more information than that. Each booking can have multiple attendees attached to it - each attendee will have a name and load more information about them which needs to be used when the booking is created.
Is the only way to do this to add ALL of this attendee information in to the request to Stripe so that it can be used when the payment succeeds? Or is there another way?
If it helps to answer this question, I'm using Django on the backend.
The main way to achieve this is to:
Store the information related to the order in your own database with the corresponding payment intent ID (or checkout session ID).
Listen to the webhook event payment_intent.succeeded (or checkout.session.completed) to know when the payment is successful.
In the webhook event, get the payment ID with event.data.object.id and use that to look into your database to retrieve the information needed to fulfill the order.
You can learn more on how to fulfill orders in the Stripe documentation here.
Another option would be to use the metadata field of your payment intent (or checkout session) to directly store all the information related to the order. But I wouldn’t recommend this since it has some limitations (number of keys, length of values, etc.).

Sitecore ECM how to track the same user's activities in different target audiences

We are using Sitecore 6.5, and the Email Campaign Manager 1.3.3 rev.130212 is installed.
Currently, when i add a Sitecore user, for example 'UserA' to multiple target audiences, lets say 'TargetAudience_A' and 'TargeAudience_B', after I send out these two target audiences, 'UserA' clicks the link in the email which comes from 'TargetAudience_A', then the link will bring user to the site, user visits several pages, Sitecore Analytics will be able to track 'UserA' VisitPageCount and Value, and creates the corresponding campaign of 'TargetAudience_A' with that data.
When the user opens the email sent from 'TargetAudience_B' and clicks the link, visits the site, NO campaign is created for 'TargetAudience_B' in the database, I can see all the data should use to create a new campaign for 'TargeAudience_B' is used to update campaign of 'TargetAudience_A'.
The whole link in the sent email has been modified by Sitecore, the corresponding campaign id is added, which makes the link looks like this:'httP:xx.domain.com/?ec_camp=xxxx&ec_as=xxxx'.
It seems that Sitecore just adds an Id to the url, but does not create a campaign for the 'TargeAudience_B' with that Id.
I use this sql query to check the visits data:
Select * From Visits join Automations on Visits.CampaignId = Automations.CampaignId
Where Automations.data = '{EmailTemplateId}'
the data column on Automations table is the email template id of the target audience.
Does any one know, how to track one user's activities for multiple campaigns? Is this possible to do? Or is this something which needs to be fixed by Sitecore?
Any help will be much much appreciated.
Thanks
EDIT: Sitecore does create Campaign for each target audience, but does not create Visits record for every one of them; Sitecore associates Campaign with the Visits, Sitecore cannot find\create Visits of 'TargeAudience_B', it finds the Visits of 'TargeAudience_A', for some reason it just updates the Visits record of 'TargetAudience_A'.
This does look right, does Sitecore create just one visit for a visitor a day no matter how many target audience this visitor in?
Neither target audience, the Visitor.ExternalUser or anything other than a fresh Visitor cookie will make DMS re-consider your visitor. So to answer your question, I do believe you are correct in your observation, and that this behavior is by design.
Also keep in mind; if your users click the email you send out from say their iPhone and come visit the site, they will be granted a Visitor ID. Later, when they're back home at their PC and click the same email again, they will get a fresh Visitor ID and will not be recognized by DMS as one and the same Visitor. This too, is by design.
If you want to achieve what I believe you're aiming to achieve, you're going to have to "tag" your Visitors with a key you recognize - like the email address - and then hook into the APIs and "grab" all Visitors that match your tagged email address. Not sure how well this will work with all areas of the DMS.
In my example above; if a user was triggered to enter an Engagement Plan or a State in an Engagement Plan - the "iPhone Visitor" would get attached to it - and any actions undertaken by the same person on his personal PC visitor profile on his desktop PC would not be affecting anything in this state.
Yes, it is a bit confusing - I may even have some slight details of this wrong - the DMS API changes a lot. But as far as I can determine, the above is correct and all by design.

Authorize.net "x_description"

I need to be able to pass identifying information through to Authorize.net's server so I can use this information when the confirmation comes back for logging purposes. We have information such as IDs for the items we sell on our site, and I'd like to have Authorize.net's response include this information to plug into our database along with the rest of the transaction data that Authorize.net's API natively supplies. Sort of like "merchant-private-data" in Google Checkout carts.
The only field I see that doesn't hold some other specific information in Authorize.net's API is x_description. My question is does the data in x_description get displayed to the customer at any point? The information I'd like to include is sensitive and not for customer's eyes. I've been over the API documentation provided by Authorize.net and it's not clear to me what is done with this field.
If this field is not private, is there a better solution to my problem which I am not seeing?
Dig through their list of API fields and see what you can use. If you want to build a list of line items, for example, look at their x_line_item field. If you're using the AIM/CIM SDK and not telling Authorize.net to e-mail a receipt then I don't see how the customer would see anything you submit to Authorize.net besides the charge on their credit card. If your customer does receive an e-mail directly from Authorize.net though, they will most likely see everything you submit. But double-check the docs I linked to be sure.
You have x_description, but also x_invoice_num and x_po_num. These fields are for the internal use of the merchant. The fields x_description and x_invoice_num can be set in the virtual terminal, if you use it to submit transactions, and also via the API. Authorize.net will return them in the response. If you set any of these two fields in an automatic recurring billing subscription, it will be returned in each individual payment response. They might be included in the email receipt also - I never used the authorize.net email receipt to the buyer. You can disable this email receipt and send your own email receipt.
I know x_description gets sent in plain text to the merchant's email, so I wouldn't use it for anything too sensitive. The description does not, however, appear on my credit card statement (as a customer).
There is another field you can use, refId. It's not well documented, but what you pass in refId will be returned in the response object as refId.
Personally, I recommend creating a database table to store your data, and then use refId to keep track of the insert ID.

How to track client payment information of a visitor redirected from my website

I want to implement a system similar to affilite tracking systems like Skimlinks, Viglink, etc. I searched their customer tracking systems. Found some information about tracking systems. I have also searched Analytics systems like Google Analytics, Piwik, OWA. There is a point I need to be guided.
When a user visits my website, clicks a product link of a shopping website like ebay, amazon, etc. I need to track the payment information of my user at the shopping website.
I achieved tracking user activity, clicks, etc on my web site with using Analytics's tracking methods (JS tracking). But I cannot find a way how Skimlinks or Viglink tracks user activity(succesful payment of users) in the shopping website which user redirected.
(Tracking user activity in the shopping website without using a service from shopping website, without Instant Payment Notification service of PayPay or something else)
I noticed Viglink and Skimlinks redirects user to their server before shopping and adds some additional information (like cookies, URL parameters etc)
Here is an example link to affiliate link of Skimlinks
website : http://www.capoeira-izmir.com/capoeira-kiyafetleri/
link : Street Abada
http://go.redirectingat.com/?id=25227X845172&site=capoeira-izmir.com&xs=1&url=http%3A%2F%2Fwww.ebay.com%2Fitm%2FHELANCA-POLYAMID-CAPOEIRA-PANTS-ABADA-YOGA-FREE-BONFIM-%2F280678232152%3Fpt%3DUS_CSA_MC_Pants%26hash%3Ditem4159b9f058%23ht_2891wt_1163&xguid=94275a6f74c7ce02bf4739e364d8831c&xcreo=0&sref=http%3A%2F%2Fwww.capoeira-izmir.com%2Fcapoeira-kiyafetleri%2F
It redirects user to go.redirectingat.com first, then a redirection is done to ebay.com/...
I also noticed that it adds an attribute to the url of ebay product link : afsrc=1
I guess it is "affiliate source = 1 " or something like that.
Any guidance or documents about this will be great for me.
Thanks in advance!!
I think your question is more about how online advertising works rather than technical.
This is a two parts answer.
1. How a conversion tracking works:
In any advertising platform that tracks conversions (any user action that happens in the advertiser property like, in example, a sale) you need to make a request to the advertising platform to notify this.
This is usually done by placing a "Tracking pixel" in the confirmation page the users see after performing the action, commonly known as the "Thank you page".
So the process goes like:
User goes to a website and sees an ad
User clicks the ad
The user's browser goes to the advertising platform (Adwords, Rightmedia, Appnexus, etc) and a cookie is placed in her browser. In this cookie there's a click ID, containing all the relevant information (website that originated the click, time, IP, campaign, etc) and it is redirected to the advertiser's website
The user lands in the advertiser website and "converts" (buys)
The user is redirected to the Thank you page where a "Tracking pixel" is placed, this makes a request to the advertising platform, which reads the cookies in the user's browser and if there's a match, logs the conversion.
Note: The previous example is a Client Side conversion. The same logic could be done in a Server Side request by the advertiser saving the "click id" in step 4 and sending it to the advertising platform in step 5. This is useful when the conversion occurs offline.
For more information: Adwords Conversion tracking: https://support.google.com/adwords/answer/1722054?hl=en
2. How I assume VigLink works
I noticed that many of the products VigLink tracks are from ClickBank, since this is the one I'm more used to, I will write the answer using this example.
You first need to be aware that VigLink is an "affiliate" of Clickbank. As such, it has a report of every sale made by users they referred. They, as affiliates, also have the chance to pass extra information in each click as a TID parameter. This TID sent as a URL parameter in the click will be shown in the sales report.
When a user clicks on a link to a clickbank product using VigLink. VigLink attaches their affiliate link to this same product and a unique TID. I assume this TID matches an ID in their database containing the information of the VigLink website who referred the click.
If the user buys the product, VigLink will see in their ClickBank report (I assume via the ClickBank API) the product bought and the TID, and so on they will know in which website the sale was originated.
Short answer: VigLink is not tracking user actions in the advertiser's website. They are just matching click IDs between their click tracker and the advertiser's reports.