Usage
from paystackapi.transaction_split import TransactionSplit
response = TransactionSplit.create(
name="Test Biz 123",
type="percentage",
currency="xxxxxxxxx",
subaccounts="[{'subaccount': 'ACCT_4hl4xenwpjy5wb', 'share':40 },...]",
bearer_type="account"
)Arguments
name: Name of the transaction splittype: The type of transaction split you want to create (percentage or flat)currency: One of NGN, GHS, ZAR, or USDsubaccounts: A list of object containing subaccount code and number of sharesbearer_type: One of subaccount, account, all-proportional, or all.bearer_subaccount: Subaccount code**kwargs
Returns
JSON data from Paystack API.
TransactionSplit.list(perPage, page) - List or search for the transaction splits available on your integration.
Usage
from paystackapi.transaction_split import TransactionSplit
response = TransactionSplit.list(perPage=3, page=1)Arguments
perPage: Records you want to retrieve per page (Integer)page: Which page you want to retrieve (Integer)**kwargs
Returns
JSON data from Paystack API.
Usage
from paystackapi.transaction_split import TransactionSplit
response = TransactionSplit.fetch(split_id=14551)Arguments
split_id: Split ID
Returns
JSON data from Paystack API.
Usage
from paystackapi.transaction_split import TransactionSplit
response = TransactionSplit.update(
split_id=45411,
**kwargs
)Arguments
split_id: Slit IDname: Name of the transaction splitactive: True or Falsesubaccounts: A list of object containing subaccount code and number of sharesbearer_type: Any of subaccount | account | all-proportional | allbearer_subaccount: Subaccount code**kwargs
Returns
JSON data from Paystack API.
TransactionSplit.remove_split_subaccount(split_id, **kwargs) - Remove a subaccount from a transaction split.
Usage
from paystackapi.transaction_split import TransactionSplit
response = TransactionSplit.remove_split_subaccount(
split_id=45411,
**kwargs
)Arguments
split_id: Split IDsubaccount: This is the subaccount code**kwargs
Returns
JSON data from Paystack API.
TransactionSplit.add_or_update_split_subaccount(split_id, **kwargs) - Add a subaccount to a transaction split or update the share of an existing subaccount in a transaction split.
Usage
from paystackapi.transaction_split import TransactionSplit
response = TransactionSplit.add_or_update_split_subaccount(
split_id=45411,
**kwargs
)Arguments
split_id: Split IDsubaccount: This is the sub account codeshare: This is the transaction share for the subaccount**kwargs
Returns
JSON data from Paystack API.