question

jeremyinvoiceasap avatar image
jeremyinvoiceasap asked jeremyinvoiceasap commented

Accepting payment via Clover on the web

Thank you for taking the time to read this.

We have an Android-based invoicing app that runs on Clover devices and uses Clover's payment acceptance to pay for the invoice.

If the invoice is not due at the time of sale (30-day payment terms, for instance), the merchant has the ability to send the invoice to their customer via email. The customer would then be able to look at a web version of their invoice, an example of which can be viewed here: https://view.invoiceasap.com/view.php...

For our Clover users, we need the ability for the merchant's customer to hand-key payment information on the web invoice and have that payment information be processed by their Clover merchant account.

Is this currently possible via the REST API? Or, is there another method by which we can go about accepting this payment?

Thank you!

10 |2000

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

1 Answer

Mike M avatar image
Mike M answered jeremyinvoiceasap commented

Hi there! Have you seen this documentation by chance? https://docs.clover.com/faq/#how-do-i...

11 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.

jeremyinvoiceasap avatar image jeremyinvoiceasap commented ·

Mike,

We'll take a look at this. Thank you very much!

0 Likes 0 ·
jeremyinvoiceasap avatar image jeremyinvoiceasap commented ·

Mike,

Is it safe to assume that the auth token which can be retrieved in-app (https://github.com/clover/clover-andr...) does not expire and can be used from a web page running outside of the Clover device?

I have attempted to send a CURL request to the URL in the example code (curl -s https://apisandbox.dev.clover.com/v2/... token]) but am getting a 401 Unauthorized response. The access token is retrieved using the sample code.

0 Likes 0 ·
Mike M avatar image Mike M commented ·

That is correct, tokens retrieved in-app are completely valid to use for API requests. Please note that you should not publicly expose any access tokens on your client-side web pages. You will need to store the tokens server-side and utilize an expirable session token for any client operations. Failure to do so will be deemed a security vulnerability and we will have to void/delete the Clover access token.

In regards to your Unauthorized response, can you please verify that you have the required token permissions? In regards to Payments, you will need Payments W.

0 Likes 0 ·
jeremyinvoiceasap avatar image jeremyinvoiceasap commented ·

Mike,

Our sandbox app has all read and write permissions.

/v2/merchant/name is also returning 401 unauthorized, and the app has read and write permissions for merchant.

0 Likes 0 ·
jeremyinvoiceasap avatar image jeremyinvoiceasap commented ·

The result is "The supplied token does not exist."

I'm retrieving this token from the SDK via the following:

CloverAuth.AuthResult authResult = CloverAuth.authenticate(context, account);
Log.d("Auth token", authResult.authToken);
0 Likes 0 ·
Show more comments

Welcome to the
Clover Developer Community