question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add a "Subtract fees from amount" Request Body Parameter to the Greenfield API

See original GitHub issue

The Greenfield API seems to be missing a Subtract fees from amount request body parameter. Right now, Pull payments payout (Public) -> Get Payout is returning only the amount the customer requested despite any kind of fees. On the dashboard, after the customer has accepted the pull payment and provided their address, I can then move to Approve & Send selected payouts which allows the option to subtract fees. I’m thinking it would need to be a multi-step process since it involves multiple endpoints.

We will need to add a subtractFees boolean in the request body and also return it in the 200 response along with the amount key/value, which would be the original amount requested and a fee key/value. That way, we know the amount is the requested amount - fee. This would affect the following POST request:

  • Pull payments (Public) -> Create Payout

For the following GET requests, the 200 response will need to have a subtractFees boolean along with the amount key/value and the fee key/value:

  • Pull payments (Public) -> Get Payout
  • Pull payments (Public) -> Get Payouts
  • Pull payments payout (Public) -> Get Payout

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
AustinWildgrubecommented, Dec 25, 2022

Yeah, from what I gather, it sounds okay @pavlenex. The main feature I am looking for is just adding a subtract fees from amount parameter on the Create Payout post request. If the fee amount cannot be returned in the body of the request, that is fine to leave out in my case.

0reactions
pavlenexcommented, Dec 19, 2022

@AustinWildgrube Is the above solution proposed by @NicolasDorier satisfactory?

Read more comments on GitHub >

github_iconTop Results From Across the Web

REST API a request to add/subtract from a field
REST API a request to add/subtract from a field · Creates the resource (with the given amount) if it doesn't exist yet for...
Read more >
cosmos-sdk/CHANGELOG.md at main
chains: A Framework for Building High Value Public Blockchains :sparkles: ... Referenced from #238 under bnb-chain/greenfield-cosmos-sdk .
Read more >
RECEIVED by MSC 5/25/2022 9:09:54 PM - Michigan Courts
Total payments. Add Lines 57a through 57d. Overpayment. If Line 58 is greater than Line 56, subtract Line 56 from Line 58. Amount...
Read more >
Author: Brian Roden
Post -Marketing and Surveillance: Monitoring a drug post-release can add $20 million to $300 million to the development tab, dependent on the nature...
Read more >
Untitled
Give back to the community value, Dikon heat pumps, 4shared kms activator ... Beli promo body new kaze ninja 150 r, Add rainbow...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found