Settlements
SettlementClient
Bases: BaseAPIClient
Provides a wrapper for paystack Settlement API
The Settlements API allows you to gain insights into payouts made by Paystack to your bank account. https://paystack.com/docs/api/settlement/
Source code in src/pypaystack2/sub_clients/sync_clients/settlements.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
|
get_settlement_transactions(id_, pagination=50, page=1, start_date=None, end_date=None, alternate_model_class=None)
Get the transactions that make up a particular settlement
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id_
|
int | str
|
The settlement ID in which you want to fetch its transactions |
required |
pagination
|
int
|
Specifies how many records you want to retrieve per page. If not specified we use a default value of 50. |
50
|
page
|
int
|
Specifies exactly what page you want to retrieve. If not specified we use a default value of 1. |
1
|
start_date
|
str | None
|
A timestamp from which to start listing settlement transactions e.g. 2016-09-24T00:00:05.000Z, 2016-09-21 |
None
|
end_date
|
str | None
|
A timestamp at which to stop listing settlement transactions e.g. 2016-09-24T00:00:05.000Z, 2016-09-21 |
None
|
alternate_model_class
|
type[PaystackDataModel] | None
|
A pydantic model class to use instead of the
default pydantic model used by the library to present the data in
the |
None
|
Returns:
Type | Description |
---|---|
Response[Transaction] | Response[PaystackDataModel]
|
A pydantic model containing the response gotten from paystack's server. |
Source code in src/pypaystack2/sub_clients/sync_clients/settlements.py
get_settlements(page=1, pagination=50, start_date=None, end_date=None, subaccount=None, alternate_model_class=None)
Fetch settlements made to your settlement accounts.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
page
|
int
|
Specifies exactly what page you want to retrieve. If not specified we use a default value of 1. |
1
|
pagination
|
int
|
Specifies how many records you want to retrieve per page. If not specified we use a default value of 50. |
50
|
start_date
|
str | None
|
A timestamp from which to start listing settlements e.g. 2016-09-24T00:00:05.000Z, 2016-09-21 |
None
|
end_date
|
str | None
|
A timestamp at which to stop listing settlements e.g. 2016-09-24T00:00:05.000Z, 2016-09-21 |
None
|
subaccount
|
str | None
|
Provide a subaccount ID to export only settlements for that subaccount.
Set to |
None
|
alternate_model_class
|
type[PaystackDataModel] | None
|
A pydantic model class to use instead of the
default pydantic model used by the library to present the data in
the |
None
|
Returns:
Type | Description |
---|---|
Response[list[Settlement]] | Response[PaystackDataModel]
|
A pydantic model containing the response gotten from paystack's server. |
Source code in src/pypaystack2/sub_clients/sync_clients/settlements.py
AsyncSettlementClient
Bases: BaseAsyncAPIClient
Provides a wrapper for paystack Settlement API
The Settlements API allows you to gain insights into payouts made by Paystack to your bank account. https://paystack.com/docs/api/settlement/
Source code in src/pypaystack2/sub_clients/async_clients/settlements.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
|
get_settlement_transactions(id_, pagination=50, page=1, start_date=None, end_date=None, alternate_model_class=None)
async
Get the transactions that make up a particular settlement
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id_
|
int | str
|
The settlement ID in which you want to fetch its transactions |
required |
pagination
|
int
|
Specifies how many records you want to retrieve per page. If not specified we use a default value of 50. |
50
|
page
|
int
|
Specifies exactly what page you want to retrieve. If not specified we use a default value of 1. |
1
|
start_date
|
str | None
|
A timestamp from which to start listing settlement transactions e.g. 2016-09-24T00:00:05.000Z, 2016-09-21 |
None
|
end_date
|
str | None
|
A timestamp at which to stop listing settlement transactions e.g. 2016-09-24T00:00:05.000Z, 2016-09-21 |
None
|
alternate_model_class
|
type[PaystackDataModel] | None
|
A pydantic model class to use instead of the
default pydantic model used by the library to present the data in
the |
None
|
Returns:
Type | Description |
---|---|
Response[Transaction] | Response[PaystackDataModel]
|
A pydantic model containing the response gotten from paystack's server. |
Source code in src/pypaystack2/sub_clients/async_clients/settlements.py
get_settlements(page=1, pagination=50, start_date=None, end_date=None, subaccount=None, alternate_model_class=None)
async
Fetch settlements made to your settlement accounts.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
page
|
int
|
Specifies exactly what page you want to retrieve. If not specified we use a default value of 1. |
1
|
pagination
|
int
|
Specifies how many records you want to retrieve per page. If not specified we use a default value of 50. |
50
|
start_date
|
str | None
|
A timestamp from which to start listing settlements e.g. 2016-09-24T00:00:05.000Z, 2016-09-21 |
None
|
end_date
|
str | None
|
A timestamp at which to stop listing settlements e.g. 2016-09-24T00:00:05.000Z, 2016-09-21 |
None
|
subaccount
|
str | None
|
Provide a subaccount ID to export only settlements for that subaccount.
Set to |
None
|
alternate_model_class
|
Type[PaystackDataModel] | None
|
A pydantic model class to use instead of the
default pydantic model used by the library to present the data in
the |
None
|
Returns:
Type | Description |
---|---|
Response[list[Settlement]] | Response[PaystackDataModel]
|
A pydantic model containing the response gotten from paystack's server. |