# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kkiapay.me/v1/en-1.0.0/plugin-et-sdk/admin-sdks-server-side/python-admin-sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
