question

niranjan avatar image
niranjan asked niranjan commented

how to fetch the tip details?

Hi guys, I am new to clover and I need your support to progress. I have a doubt that "how to fetch the tip details? can any one help me to form a request parameter for fetch the details" or send me some sample.

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.

Jeffrey Blattman avatar image Jeffrey Blattman ♦♦ commented ·

Are you asking how to obtain the tip amount for a payment?

0 Likes 0 ·
niranjan avatar image niranjan commented ·

Yes Mr.Jeff can you help me on this ASAP, if possible share the code or link. I have a merchant account and I am seeing my tips detail in the App called "Tips", help me by telling how to fetch the same tip details to my android app.

0 Likes 0 ·
Jacob Abrams avatar image
Jacob Abrams answered

I'm not sure which details you are looking or whether you are trying to do this using the http REST api or from an Android app, can you please specify?

This may be what you are looking for: GET /v3/merchants/{mId}/properties and GET /v3/merchants/{mId}/tip_suggestions. Both are documented at https://www.clover.com/api_docs#!/mer...

10 |2000

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

Jeffrey Blattman avatar image
Jeffrey Blattman answered niranjan commented

Please use the V3 payments API, https://www.clover.com/api_docs#!/pay...

As you can see, tip amount is one of the fields on the payment. Here's an example of how we construct the URI from within our tips app. This may point you towards some useful query parameters for that endpoint,

Uri.Builder uriBuilder = Uri.parse(mBaseUrl).buildUpon()
    .appendEncodedPath("v3/merchants/").appendEncodedPath(mMerchantId).appendEncodedPath("payments")
    .appendQueryParameter("expand", "cardTransaction,order,employee,refunds")
        // NOTE: Server accepts any operator and treats it as equals
    .appendQueryParameter("filter", "cardTransaction.state=PENDING")
    .appendQueryParameter("filter", "result=success")
    .appendQueryParameter("orderBy", "createdTime DESC");
1 comment
10 |2000

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

niranjan avatar image niranjan commented ·

Thank you Mr.Jeff.

0 Likes 0 ·

Welcome to the
Clover Developer Community