Add a "Subtract fees from amount" Request Body Parameter to the Greenfield API
See original GitHub issueThe 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:
- Created a year ago
- Comments:8 (6 by maintainers)
Top GitHub Comments
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 theCreate 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.@AustinWildgrube Is the above solution proposed by @NicolasDorier satisfactory?