Subaccounts flat rate split payments
Opened this issue · 3 comments
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?
From the documentation, I think this should be possible.
I will see about supporting it on the plugin.
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..
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
}
]