Skip to content

Latest commit

History

History
358 lines (246 loc) · 9.77 KB

File metadata and controls

358 lines (246 loc) · 9.77 KB

paystack.Split

All URIs are relative to https://api.paystack.co

MethodHTTP requestDescription
add_subaccountPOST /split/{id}/subaccount/addAdd Subaccount to Split
createPOST /splitCreate Split
fetchGET /split/{id}Fetch Split
listGET /splitList/Search Splits
remove_subaccountPOST /split/{id}/subaccount/removeRemove Subaccount from split
updatePUT /split/{id}Update Split

add_subaccount

Response add_subaccount(id, subaccount=subaccount, share=share)

Add Subaccount to Split

Example

  • Bearer Authentication (bearerAuth):
importpaystackfrompprintimportpprint# Set your API key based on domain (test or live mode)paystack.api_key='sk_domain_xxxxxxxx'id='application/json'# str | # Add Subaccount to Splitresponse=paystack.Split.add_subaccount(
id,
)
pprint(response)

Parameters

NameTypeDescriptionNotes
idstr
subaccountstrSubaccount code of the customer or partner[optional]
sharestrThe percentage or flat quota of the customer or partner[optional]

Return type

Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded, application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Request successful-
401Unauthorized operation-
0Server error-

[Back to top][Back to API list][Back to Model list][Back to README]

create

Response create(name, type, subaccounts, currency, bearer_type=bearer_type, bearer_subaccount=bearer_subaccount)

Create Split

Example

  • Bearer Authentication (bearerAuth):
importpaystackfrompprintimportpprint# Set your API key based on domain (test or live mode)paystack.api_key='sk_domain_xxxxxxxx'name='name_example'# str | Name of the transaction splittype='type_example'# str | The type of transaction split you want to create.subaccounts=paystack.SplitSubaccounts() # list[SplitSubaccounts] | A list of object containing subaccount code and number of sharescurrency='currency_example'# str | The transaction currency# Create Splitresponse=paystack.Split.create(
name,
type,
subaccounts,
currency,
)
pprint(response)

Parameters

NameTypeDescriptionNotes
namestrName of the transaction split
typestrThe type of transaction split you want to create.
subaccountslist[SplitSubaccounts]A list of object containing subaccount code and number of shares
currencystrThe transaction currency
bearer_typestrThis allows you specify how the transaction charge should be processed[optional]
bearer_subaccountstrThis is the subaccount code of the customer or partner that would bear the transaction charge if you specified subaccount as the bearer type[optional]

Return type

Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded, application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Request successful-
401Unauthorized operation-
0Server error-

[Back to top][Back to API list][Back to Model list][Back to README]

fetch

Response fetch(id)

Fetch Split

Example

  • Bearer Authentication (bearerAuth):
importpaystackfrompprintimportpprint# Set your API key based on domain (test or live mode)paystack.api_key='sk_domain_xxxxxxxx'id='id_example'# str | # Fetch Splitresponse=paystack.Split.fetch(
id,
)
pprint(response)

Parameters

NameTypeDescriptionNotes
idstr

Return type

Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Request successful-
401Unauthorized operation-
404Entity not found-
0Server error-

[Back to top][Back to API list][Back to Model list][Back to README]

list

Response list(name=name, active=active, sort_by=sort_by, _from=_from, to=to, per_page=per_page, page=page)

List/Search Splits

Example

  • Bearer Authentication (bearerAuth):
importpaystackfrompprintimportpprint# Set your API key based on domain (test or live mode)paystack.api_key='sk_domain_xxxxxxxx'# List/Search Splitsresponse=paystack.Split.list(
)
pprint(response)

Parameters

NameTypeDescriptionNotes
namestr[optional]
activestr[optional]
sort_bystr[optional]
_fromstr[optional]
tostr[optional]
per_pagestr[optional]
pagestr[optional]

Return type

Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Request successful-
401Unauthorized operation-
404Entity not found-
0Server error-

[Back to top][Back to API list][Back to Model list][Back to README]

remove_subaccount

Response remove_subaccount(id, subaccount=subaccount, share=share)

Remove Subaccount from split

Example

  • Bearer Authentication (bearerAuth):
importpaystackfrompprintimportpprint# Set your API key based on domain (test or live mode)paystack.api_key='sk_domain_xxxxxxxx'id='id_example'# str | # Remove Subaccount from splitresponse=paystack.Split.remove_subaccount(
id,
)
pprint(response)

Parameters

NameTypeDescriptionNotes
idstr
subaccountstrSubaccount code of the customer or partner[optional]
sharestrThe percentage or flat quota of the customer or partner[optional]

Return type

Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded, application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Request successful-
401Unauthorized operation-
0Server error-

[Back to top][Back to API list][Back to Model list][Back to README]

update

Response update(id, name=name, active=active, bearer_type=bearer_type, bearer_subaccount=bearer_subaccount)

Update Split

Example

  • Bearer Authentication (bearerAuth):
importpaystackfrompprintimportpprint# Set your API key based on domain (test or live mode)paystack.api_key='sk_domain_xxxxxxxx'id='id_example'# str | # Update Splitresponse=paystack.Split.update(
id,
)
pprint(response)

Parameters

NameTypeDescriptionNotes
idstr
namestrName of the transaction split[optional]
activeboolToggle status of split. When true, the split is active, else it's inactive[optional]
bearer_typestrThis allows you specify how the transaction charge should be processed[optional]
bearer_subaccountstrThis is the subaccount code of the customer or partner that would bear the transaction charge if you specified subaccount as the bearer type[optional]

Return type

Response

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/x-www-form-urlencoded, application/json
  • Accept: application/json

HTTP response details

Status codeDescriptionResponse headers
200Request successful-
401Unauthorized operation-
404Entity not found-
0Server error-

[Back to top][Back to API list][Back to Model list][Back to README]