Miscellaneous
MiscellaneousClient
Bases: BaseAPIClient
Provides a wrapper for paystack Miscellaneous API
The Miscellaneous API are supporting APIs that can be used to provide more details to other APIs. https://paystack.com/docs/api/miscellaneous/
Source code in src/pypaystack2/sub_clients/sync_clients/miscellaneous.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 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
|
get_banks(country, use_cursor=False, next_=None, previous=None, gateway=None, type_=None, currency=None, pay_with_bank_transfer=None, pay_with_bank=None, include_nip_sort_code=None, pagination=50, alternate_model_class=None)
Get a list of all supported banks and their properties
Parameters:
Name | Type | Description | Default |
---|---|---|---|
country
|
Country
|
The country from which to obtain the list of supported banks. any value from the |
required |
use_cursor
|
bool
|
Flag to enable cursor pagination. |
False
|
next_
|
str | None
|
A cursor that indicates your place in the list. It can be used to fetch the next page of the list |
None
|
previous
|
str | None
|
A cursor that indicates your place in the list. It should be used to fetch the previous page of the list after an intial next request |
None
|
gateway
|
Gateway | None
|
The gateway type of the bank. Any value from the |
None
|
type_
|
BankType | None
|
Type of financial channel. For Ghanaian channels, please use either mobile_money for mobile money channels OR ghipps for bank channels |
None
|
currency
|
Currency | None
|
Any value from the Currency enum. |
None
|
pay_with_bank_transfer
|
bool | None
|
A flag to filter for available banks a customer can make a transfer to complete a payment |
None
|
pay_with_bank
|
bool | None
|
A flag to filter for banks a customer can pay directly from |
None
|
pagination
|
int
|
The number of objects to return per page. Defaults to 50, and limited to 100 records per page. |
50
|
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
|
include_nip_sort_code
|
bool | None
|
A flag that returns Nigerian banks with their nip institution code. The returned value can be used in identifying institutions on NIP. |
None
|
Returns:
Type | Description |
---|---|
Response[list[Bank]] | Response[PaystackDataModel]
|
A pydantic model containing the response gotten from paystack's server. |
Source code in src/pypaystack2/sub_clients/sync_clients/miscellaneous.py
get_countries(alternate_model_class=None)
Gets a list of Countries that Paystack currently supports
Parameters:
Name | Type | Description | Default |
---|---|---|---|
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[PaystackSupportedCountry]] | Response[PaystackDataModel]
|
A pydantic model containing the response gotten from paystack's server. |
Source code in src/pypaystack2/sub_clients/sync_clients/miscellaneous.py
get_states(country, alternate_model_class=None)
Get a list of states for a country for address verification.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
country
|
Country | str
|
Any value from the country enum. |
required |
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[State]] | Response[PaystackDataModel]
|
A pydantic model containing the response gotten from paystack's server. |
Source code in src/pypaystack2/sub_clients/sync_clients/miscellaneous.py
AsyncMiscellaneousClient
Bases: BaseAsyncAPIClient
Provides a wrapper for paystack Miscellaneous API
The Miscellaneous API are supporting APIs that can be used to provide more details to other APIs. https://paystack.com/docs/api/miscellaneous/
Source code in src/pypaystack2/sub_clients/async_clients/miscellaneous.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 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
|
get_banks(country, use_cursor=False, next_=None, previous=None, gateway=None, type_=None, currency=None, pay_with_bank_transfer=None, pay_with_bank=None, include_nip_sort_code=None, pagination=50, alternate_model_class=None)
async
Get a list of all supported banks and their properties
Parameters:
Name | Type | Description | Default |
---|---|---|---|
country
|
Country
|
The country from which to obtain the list of supported banks. any value from the |
required |
use_cursor
|
bool
|
Flag to enable cursor pagination. |
False
|
next_
|
str | None
|
A cursor that indicates your place in the list. It can be used to fetch the next page of the list |
None
|
previous
|
str | None
|
A cursor that indicates your place in the list. It should be used to fetch the previous page of the list after an intial next request |
None
|
gateway
|
Gateway | None
|
The gateway type of the bank. Any value from the |
None
|
type_
|
BankType | None
|
Type of financial channel. For Ghanaian channels, please use either mobile_money for mobile money channels OR ghipps for bank channels |
None
|
currency
|
Currency | None
|
Any value from the Currency enum. |
None
|
pay_with_bank_transfer
|
bool | None
|
A flag to filter for available banks a customer can make a transfer to complete a payment |
None
|
pay_with_bank
|
bool | None
|
A flag to filter for banks a customer can pay directly from |
None
|
pagination
|
int
|
The number of objects to return per page. Defaults to 50, and limited to 100 records per page. |
50
|
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
|
include_nip_sort_code
|
bool | None
|
A flag that returns Nigerian banks with their nip institution code. The returned value can be used in identifying institutions on NIP. |
None
|
Returns:
Type | Description |
---|---|
Response[list[Bank]] | Response[PaystackDataModel]
|
A pydantic model containing the response gotten from paystack's server. |
Source code in src/pypaystack2/sub_clients/async_clients/miscellaneous.py
get_countries(alternate_model_class=None)
async
Gets a list of Countries that Paystack currently supports
Parameters:
Name | Type | Description | Default |
---|---|---|---|
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[PaystackSupportedCountry]] | Response[PaystackDataModel]
|
A pydantic model containing the response gotten from paystack's server. |
Source code in src/pypaystack2/sub_clients/async_clients/miscellaneous.py
get_states(country, alternate_model_class=None)
async
Get a list of states for a country for address verification.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
country
|
Country | str
|
Any value from the country enum. |
required |
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[State]] | Response[PaystackDataModel]
|
A pydantic model containing the response gotten from paystack's server. |