Re: Visa Checkout SDK Web

Solved! Go to solution
aminpaks
Regular Visitor

Visa Checkout SDK Web

Hi there,

 

I'm trying to implement Visa Checkout on a webpage with a button to pay but API always return 401 with error of "Invalid API Key".

 

I already check the API and it's correct from credential section of sandbox account.

Configurations look like this:

 

function onVisaCheckoutReady() {
        console.log('VISA Checkout ready');
        V.init({
          apiKey: 'API_FROM_CREDENTIAL_SECTION',
          paymentRequest: {
            currencyCode: 'CAD',
            subtotal: '10.00',
          },
        });
      }

 

3 REPLIES 3
SLi
Visa Developer Support Specialist
Visa Developer Support Specialist

Re: Visa Checkout SDK Web

Hi @aminpaks,

 

Please navigate to the below link for details on how to add Visa Checkout to your webpage.

https://developer.visa.com/capabilities/visa_checkout/docs-how-to

 


Best,
Stacey

Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.
aminpaks
Regular Visitor

Re: Visa Checkout SDK Web

I found the issue, I was passing the wrong key to the object. Instead of "apikey" (all lowercased) I was setting "apiKey" (camelcased).

 

The issue is resolved.

 

Thanks!

API_Products
Visa Developer Support Specialist

Re: Visa Checkout SDK Web

Hey @aminpaks,

 

Happy to hear from you. Thanks for sharing the issue with us and letting us know how it was solved.  




Thanks,

Tee



Was your question answered? Don't forget to click on "Accept as Solution" to help other devs find the answer to the same question.