> 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/plugin-et-sdk/admin-sdks-server-side/python-admin-sdk.md).

# Python Admin SDK

L'installation du Python Admin SDK se fait par le biais des lignes de commande ci-après :&#x20;

```python
#Initialisation d'un environnement virtuel avec python3 
python3 -m venv venv

#Installation du SDK Admin
pip install kkiapay
```

## Statut d'une transaction

Il vous est offert, avec le SDK Admin Serveur, la possibilité de récupérer l’ensemble des informations liées à une transaction, en utilisant la référence de l’opération ayant été effectuée. Il vous faudra pour cela fournir les informations suivantes :

* Vos clés publique, privée et secrète d'API
* La référence de l’opération (voir l’image ci-dessous)

![](/files/-LhkBg3LnqA8lHNZqn1i)

### Exemple d'utilisation

Vous pouvez afin de tester cette fonctionnalité user du code ci-après :

```python
#Procéder à la création d'une instance de KKiaPay
from kkiapay import Kkiapay
k = Kkiapay('public_key', 'private_key', 'secret', sandbox=True)

#Initialiser le processus de vérification de la transaction
transaction = k.verify_transaction('LVFNrK1nx')
#Où LVFNrK1nx est la référence de la 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" %}
Retrouvez [ici](https://github.com/kkiapay/kkiapay-python) notre code source initié par la communauté [PythonBenin](https://github.com/PythonBenin) !
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
