Visa Developer Community

Question regarding Javascript SDK. Did the user get charged at V.on("payment.success") ?

Hi Visa Developers!

 

I'm trying to integrate Visa Checkout on an e-commerce site.  I just finished reading this guide: https://developer.visa.com/products/visa_checkout/guides and have a question on it.  

 

Let's say I have the Javascript SDK on my e-commerce checkout page.  The shopper signs in through the lightbox, checks out, and I'll render an order confirmation page using the payment success event handler, something like this:

 

V.on("payment.success", function(payment) { render_order_confirmation(payment)})

 

At this point when the payment success event is triggered, has the user's credit card been charged?

 Or do I still need to make another PUT request to https://sandbox.api.visa.com/wallet-services-web/payment/info/{callId}?apikey={apikey} in order to successfully charge the user's credit card?

 

Thanks in advance for your help!

4 REPLIES
Community Manager

Re: Question regarding Javascript SDK. Did the user get charged at V.on("payment.success"

Hi ECOM, 

 

Once the order confirmation comes up, the intent to purchase is recorded in the back end. 

 

Later, the merchant will use this information to charge the card, which is a process that happens behind the scenes. So, you don't need to invoke the PUT call.

 

Hope this helps!

 

-Ricardo 

Regular Visitor

Who to contact about serious debit card error

I may be in the wrong forum to relate this serious error I discovered while using my VISA debit (Bank of America flavor), but thanks for bearing with me:

 

I was attempting to purchase gas at a Chevron station. Both my wife and I have VISA Debit cards...

Thinking I was swiping my debit card in the pump, while in fact I was swiping my wife's, I entered my own PIN and waited for the customary approval. Naturally, that DID NOT happen.

Checking the card, I realized my error, retrieved my own card, swiped it and entered my PIN again. Approval occurred quickly and I pumped about $35 of gas and went on my way.

 

As it happened, I forgot to return my wife's card to her and a couple of days later she noticed it was missing and called in to report a lost card without checking to see if I knew anything about it. The agent said her card had been used successfully at a Chevron station two days prior! At that point she checked with me and we got things straghtened out.

 

We both checked online to see what charges had posted. Indeed, her account HAD BEEN charged for the gas and mine HAD NOT, even though only my card had received approval!

 

I believe this is a serious problem in some part of the authorization process. Had I not found and used my own card, it seems possible that my wife's card could have been charged for gas pumped by the next person to drive up! Any thoughts?

 

I couldn't find any place on line to report this problem to either Bank of America or to VISA. Thanks for taking time to read this. If I should should call or write a report for some other person, please let me know who.

 

Jim Boardman

 

Tags (3)
Helper

Re: Question regarding Javascript SDK. Did the user get charged at V.on("payment.success"

Hello. May I know whose merchant who will use the payment information to charge the payment card?

 

I tried to use the Update Payment Information API.

https://developer.visa.com/capabilities/visa_checkout/reference#visa_checkout__update_payment_inform...

 

I clicked the sent button and generated a 200 Ok. But I do not know it is working because I tried to use the Get Payment Data API

https://developer.visa.com/capabilities/visa_checkout/reference#visa_checkout__get_payment_data_api

and there is still no changes or update on Payment Data API like total price, tax and  subtotal

 

Is there any code to add on the Javascript/server side script file?

Helper

Re: Question regarding Javascript SDK. Did the user get charged at V.on("payment.success"

deleted message