> For the complete documentation index, see [llms.txt](https://docs.kkiapay.me/v1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kkiapay.me/v1/en-1.0.0/plugin-et-sdk/admin-sdks-server-side/python-admin-sdk.md).

# Python Admin SDK

To install the Python Admin SDK you must follow the code below :

```python
#Initialize a virtual environment with python3 
python3 -m venv venv

#Install the SDK Admin
pip install kkiapay
```

## Status of a transaction

KKiaPay allow you to retrieve all the information related to a transaction. To do this, you will need to fill in the following fields:&#x20;

* Your public, private and secret API keys
* The reference of the operation (see the image below)

![](/files/-LhkBg3LnqA8lHNZqn1i)

### Example&#x20;

You can use the following code to test this feature :

```python
#Create an instance of KKiaPay
from kkiapay import Kkiapay
k = Kkiapay('public_key', 'private_key', 'secret', sandbox=True)

#Initialize the process of verification
transaction = k.verify_transaction('LVFNrK1nx')
#Where LVFNrK1nx is the reference of the transaction

print(transaction)

# => KkiapayTransaction(
#       performed_at='2019-07-11T11:24:42.687Z',
#       type='DEBIT',
#       status='FAILED',
#       source='MOBILE_MONEY',
#       amount=1,
#       fees=0,
#       country='BJ',
#       reason='invalid_number',
#       transactionId='LVFNrK1nx',
#       performedAt='07/11/2019'
#   )

print(transaction.status)
# => FAILED
print(transaction.amount)
# => 1
```

{% hint style="info" %}
Find [here](https://github.com/kkiapay/kkiapay-python) our source code initiated by the [PythonBenin community](https://github.com/PythonBenin) !
{% endhint %}
