Billing and betting
BillingAndBetting
Bases: BaseAPIWrapper
Source code in pykuda2/wrappers/sync_wrappers/billing_and_betting.py
7 8 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 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 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 |
|
get_bill_purchase_status(bill_request_ref, bill_response_reference, request_reference=None)
Retrieve the status of a bill purchase.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
bill_request_ref |
Optional[str]
|
The bill request reference. |
required |
bill_response_reference |
Optional[str]
|
The bill reference gotten from purchasing the bill. |
required |
request_reference |
Optional[str]
|
a unique identifier for this api call. it is automatically generated if not provided. |
None
|
Returns:
Type | Description |
---|---|
APIResponse
|
An |
Raises:
Type | Description |
---|---|
ConnectionException
|
when the request times out or in the absence of an internet connection. |
Source code in pykuda2/wrappers/sync_wrappers/billing_and_betting.py
get_bill_type_options(bill_type, request_reference=None)
Retrieves all the options of a bill type that are available from Kuda.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
bill_type |
BillType
|
The bill type we want to get the options available for e.g. BillType.INTERNET_DATA, BillType.CABLE_TV |
required |
request_reference |
Optional[str]
|
a unique identifier for this api call. it is automatically generated if not provided. |
None
|
Returns:
Type | Description |
---|---|
APIResponse
|
An |
Raises:
Type | Description |
---|---|
ConnectionException
|
when the request times out or in the absence of an internet connection. |
Source code in pykuda2/wrappers/sync_wrappers/billing_and_betting.py
get_purchased_bill_from_virtual_account(tracking_reference, request_reference=None)
Retrieve bills purchased from a virtual account.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tracking_reference |
str
|
The unique identifier of the virtual account. |
required |
request_reference |
Optional[str]
|
a unique identifier for this api call. it is automatically generated if not provided. |
None
|
Returns:
Type | Description |
---|---|
APIResponse
|
An |
Raises:
Type | Description |
---|---|
ConnectionException
|
when the request times out or in the absence of an internet connection. |
Source code in pykuda2/wrappers/sync_wrappers/billing_and_betting.py
get_purchased_bills(request_reference=None)
Retrieve bills purchased from the main account.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
request_reference |
Optional[str]
|
a unique identifier for this api call. it is automatically generated if not provided. |
None
|
Returns:
Type | Description |
---|---|
APIResponse
|
An |
Raises:
Type | Description |
---|---|
ConnectionException
|
when the request times out or in the absence of an internet connection. |
Source code in pykuda2/wrappers/sync_wrappers/billing_and_betting.py
purchase_bill(amount, bill_item_identifier, customer_identifier, phone_number=None, request_reference=None)
Purchase a bill from your main account.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
amount |
Union[int, float]
|
Bill amount. Note care should be taken when performing calculations as money is involved.
a |
required |
bill_item_identifier |
str
|
The Kuda bill unique identifier |
required |
customer_identifier |
str
|
The customer's unique identifier |
required |
phone_number |
Optional[str]
|
The customer's phone number It is not required if you're purchasing airtime. |
None
|
request_reference |
Optional[str]
|
a unique identifier for this api call. it is automatically generated if not provided. |
None
|
Returns:
Type | Description |
---|---|
APIResponse
|
An |
Raises:
Type | Description |
---|---|
ConnectionException
|
when the request times out or in the absence of an internet connection. |
Source code in pykuda2/wrappers/sync_wrappers/billing_and_betting.py
purchase_bill_from_virtual_account(tracking_reference, amount, bill_item_identifier, phone_number, customer_identifier, request_reference=None)
Purchase a bill from your virtual account.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tracking_reference |
str
|
The customer virtual account Identifier. |
required |
amount |
Union[int, float]
|
Bill amount. Note care should be taken when performing calculations as money is involved.
a |
required |
bill_item_identifier |
str
|
The Kuda bill unique identifier |
required |
customer_identifier |
str
|
The customer's unique identifier |
required |
phone_number |
str
|
The customer's phone number It is not required if you're purchasing airtime. |
required |
request_reference |
Optional[str]
|
a unique identifier for this api call. it is automatically generated if not provided. |
None
|
Returns:
Type | Description |
---|---|
APIResponse
|
An |
Raises:
Type | Description |
---|---|
ConnectionException
|
when the request times out or in the absence of an internet connection. |
Source code in pykuda2/wrappers/sync_wrappers/billing_and_betting.py
verify_customer_before_purchase(tracking_reference, kuda_bill_item_identifier, customer_identification, request_reference=None)
Verifies the identity of the beneficiary.
Just like an account or bank transfer, You need to verify a customer's identity before successfully initiating a bill purchase instance. This way you reduce the issue of theft or erroneous bill payments which are hard to retrieve. You don't need to verify the customer if the bill type is airtime
Parameters:
Name | Type | Description | Default |
---|---|---|---|
tracking_reference |
str
|
Customer's wallet identifier. |
required |
kuda_bill_item_identifier |
str
|
The Kuda bill unique identifier. |
required |
customer_identification |
str
|
The customer's unique identifier. |
required |
request_reference |
Optional[str]
|
a unique identifier for this api call. it is automatically generated if not provided. |
None
|
Returns:
Type | Description |
---|---|
APIResponse
|
An |
Raises:
Type | Description |
---|---|
ConnectionException
|
when the request times out or in the absence of an internet connection. |