notify-vtex-client
Cliente HTTP para a API de Checkout da VTEX com suporte a pagamento PIX.
Instalacao
pip install notify-vtex-client
Uso
from notify_tls_client import NotifyTLSClient
from notify_vtex_client.client.notifyvtexclient import NotifyVtexClient
from notify_vtex_client.client.structures.item import Item
from notify_vtex_client.payloads.additemspayload import AddItemsPayload
from notify_vtex_client.payloads.attachclientprofilepayload import AttachClientProfilePayload
from notify_vtex_client.payloads.attachshippingdatapayload import AttachShippingDataPayload
from notify_vtex_client.payloads.attachpaymentdatapayloads.attachpixpaymentdatapayload import AttachPixPaymentDataPayload
# Inicializar cliente
tls = NotifyTLSClient()
client = NotifyVtexClient(tls=tls, base_url="https://www.loja.com.br")
# Iniciar sessao
session = client.start_session()
# Adicionar item ao carrinho
item = Item(id="123", quantity=1, seller="1")
response = client.add_item_to_cart(item=item, sc=1)
# Anexar dados do cliente
profile = AttachClientProfilePayload(email="cliente@email.com")
client.attach_client_profile_data(payload=profile)
# Anexar endereco
shipping = AttachShippingDataPayload(
postal_code="01001000",
street="Praca da Se",
number="1",
city="Sao Paulo",
state="SP",
neighborhood="Se",
receiver_name="Nome do Cliente"
)
client.attach_client_shipping_data(payload=shipping)
# Pagamento PIX
payment = AttachPixPaymentDataPayload(reference_value=9990)
client.attach_payment_data(payload=payment)
# Criar e processar transacao
transaction = client.create_transaction(value=9990)
# Obter QR code PIX
callback = client.process_callback_url(order_id="order-id")
print(callback.pix_code)
Fluxo de Checkout
start_session()- Inicia sessao e obtem order_form_idcheck_email()/attach_client_profile_data()- Perfil do clienteget_postal_code_info()- Valida CEPattach_client_shipping_data()- Dados de envioadd_item_to_cart()- Adiciona produtoattach_payment_data()- Dados de pagamento PIXcreate_transaction()- Cria transacao no gatewayprocess_transaction()- Processa pagamentoprocess_callback_url()- Obtem QR code PIX
Licenca
MIT
Metadata
Release files for notify-vtex-client 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| notify_vtex_client-0.4.0.tar.gz | 13.5 kB | Without provenance | Details for notify_vtex_client-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| notify_vtex_client-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for notify_vtex_client-0.4.0-py3-none-any.whl |
Total release size: 36.2 kB
Release files / notify_vtex_client-0.4.0.tar.gz
| Download URL | notify_vtex_client-0.4.0.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc46650e075c771a707406cd8121b8ef0670546855f60ac7132d12f51b9b93a5
|
|
BLAKE2b-256 checksum How to use checksums |
7029a59d5f0949ba5f935de6c68cb3392d4097218a341fe91652f7c1a2302fb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / notify_vtex_client-0.4.0-py3-none-any.whl
| Download URL | notify_vtex_client-0.4.0-py3-none-any.whl |
|---|---|
| Size | 22.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
35cdf33aebbc7fd794a39f8c8a60d2b4493e85200184c618d24a5311a1dc5de3
|
|
BLAKE2b-256 checksum How to use checksums |
0cdec230357545f3581a5a3cb4b5a331bc69b12f017e5e829e7d2c3ca2d909ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for notify-vtex-client 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.