Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subaccounts flat rate split payments #17

Open
thukuwanjiku opened this issue Feb 19, 2020 · 3 comments
Open

Subaccounts flat rate split payments #17

thukuwanjiku opened this issue Feb 19, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@thukuwanjiku
Copy link

thukuwanjiku commented Feb 19, 2020

Looking a the Subaccount class constructor it takes an id and transactionSplitRatio. This is convenient for percentage based sharing.
However I want to work with the flat_subaccount transaction_charge_type and simply pass a static amount which I need shared to that particular subaccount. Just static amount and not based on ratio or percentage. For instance if total amount is KES 1,500, I want the subaccount to get KES 1, 050 which I have determined from my own calculations.

Please, how can I achieve this?

@wilburx9 wilburx9 added the enhancement New feature or request label Feb 19, 2020
@wilburx9
Copy link
Owner

From the documentation, I think this should be possible.

I will see about supporting it on the plugin.

@thukuwanjiku
Copy link
Author

From the documentation, I think this should be possible.

I will see about supporting it on the plugin.

Great, thank you for considering it. I hope it'll be soon. Eagerly waiting..

@MarkSure
Copy link

Yeah from the documentation it's possible, but even after updating the Subaccount class I notice that the subaccount data is not being sent in the meta object, rather it sends "sdk" as metaname and "flutter" as metavalue instead of "subaccount_split" and the subaccount data respectively.
Instead of something like this:
"meta": [
{
"id": 200247022,
"metaname": "subaccount_split",
"metavalue": "{"subaccount":"RS_9B3C22C01E05ADA2CA1F9365437F2YT6","transaction_charge":100,"transaction_split_ratio":1,"transaction_charge_type":"flat"}",
"createdAt": "2020-09-24T11:19:12.000Z",
"updatedAt": "2020-09-24T11:19:12.000Z",
"deletedAt": null,
"getpaidTransactionId": 1558577
}
]
You have something like this:
"meta": [
{
"id": 200246633,
"metaname": "sdk",
"metavalue": "flutter",
"createdAt": "2020-09-24T10:10:49.000Z",
"updatedAt": "2020-09-24T10:10:49.000Z",
"deletedAt": null,
"getpaidTransactionId": 1558354
}
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants