question

superdave avatar image
superdave asked superdave commented

using API to get a list of paymentID, sorted by time, get the latest one

Is it possible?

depends on webhook is quite expensive, I am trying to create a listener to get the latest payment id, the latest one, by API.


is it possible?

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.

1 Answer

David Marginian avatar image
David Marginian Deactivated answered superdave commented

You want to obtain the last payment? How often do you need to do this. Yes, that could be done via API, but if you are doing it very frequently it would be better to use a webhook.

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

superdave avatar image superdave commented ·
about 5 seconds,

i am considering webhook as well, but push notification back to the APP could take a longer time?

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ superdave commented ·
I don't think so, plus you don't want to be making unnecessary API calls
0 Likes 0 ·
superdave avatar image superdave superdave commented ·

is there anyway, that my APP got notify the webhook message directly without going thru an external server and push back the notification?


I am trying to also trying to use

ACTION_START_PRINT_RECEIPTS

Intents, but it doesn't seem to fire for me. I included the following in my AndroidManifest.xml:

<activity
    android:name=".PrintActivity"
    android:exported="true">
    <intent-filter>
        <action android:name="com.clover.intent.action.START_PRINT_RECEIPTS"/>
        <category android:name="android.intent.category.DEFAULT"/>
    </intent-filter>
</activity>
0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ superdave commented ·
If you have a native app you shouldn't be using webhooks. There's a payment process intent you an listen for.
0 Likes 0 ·
Show more comments

Welcome to the
Clover Developer Community