question

lkong avatar image
lkong asked etherealestelle answered

What happened to Invoice API?

Hi,

I am trying the Invoice API during the past few days. But now it seems Invoice API just disappeared. For example the following link now goes to 404:

https://docs.clover.com/reference/createforneworder

When I try to run the example (I copied some examples before the Invoice API reference pages disappeared) in Nodejs, I always get the following error:

"Error: Sorry, this API currently requires multiple forms of authentication which we don't yet support."

Any help will be highly appreciated. Thanks!

REST API
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image
David Marginian Deactivated answered

"Error: Sorry, this API currently requires multiple forms of authentication which we don't yet support."

That isn't coming from our API. I am not sure why the API reference was removed but that isn't why the request isn't working.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

lkong avatar image
lkong answered lkong commented

Here is what I did:

First install the "api" (this seems to be a very generic api name. Is this correct?)

npm install api --save

I copied the following code into an empty invoice.js file (I have left out my sandbox Mid and Token):

const sdk = require('api')('@clover-platform/v3#1w2vi7kz93kqxq');

sdk.auth('...........');

sdk.search({'X-Clover-Merchant-Id': '......'})

.then(res => console.log(res))

.catch(err => console.error(err));


When I try to run it, I got the error:

Error: Sorry, this API currently requires multiple forms of authentication which we don't yet support.

at C:\Users\...\clover-app\api\node_modules\api\src\lib\prepareAuth.js:27:13

at Array.forEach (<anonymous>)

at module.exports (C:\Users\...\clover-app\api\node_modules\api\src\lib\prepareAuth.js:24:12)

at C:\Users\...\clover-app\api\node_modules\api\src\index.js:57:53

I am relatively new to Nodejs. Hopefully this is not a rookie mistake.


Thanks!

2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image David Marginian ♦♦ commented ·

Can you provide some context on what you are trying to do? I am not sure what libraries you are using but they don't appear to be official Clover libraries. If you are trying to take ECommerce Payments we have an SDK for Node and Python, here is a link to the Node SDK - https://www.npmjs.com/package/clover-ecomm-sdk.

0 Likes 0 ·
lkong avatar image lkong David Marginian ♦♦ commented ·

I followed the instructions on

https://docs.clover.com/reference/createforneworder

But the instruction is not available any more.

It's similar to the Node instruction from the following link (with different sdk ID of course)

https://docs.clover.com/reference/handlersgetcustomerscsv

I can follow the above instruction and extract customer list with no problem.

My goal is to use Node to create and send invoices to our customers. Listing the current invoices using the API is the first step.

0 Likes 0 ·
lkong avatar image
lkong answered lkong edited

I disabled the following lines in prepareAuth.js ( from the "api" API), and the invoice api sample code actually worked:

if (schemes.length > 1) {

throw new Error(

`Sorry, this API currently requires multiple forms of authentication which we don't yet support.`

);

}

Now my problem is: with the Invoice API document link missing, I don't know how to create a new invoice. Anybody saved the Invoice API documents for Nodejs or where can I find them?

Thanks!


10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

etherealestelle avatar image
etherealestelle answered

It seems the Invoice API encountered some hiccups, but fear not! With Zindoit's efficient Invoice management system, glitches are swiftly addressed to ensure smooth sailing for your financial processes. Let's dive into the details and get everything back on track.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community