Cliente para el servicio REST de STP
Python v3.6 o superior.
pip install stpmex
make venv
source venv/bin/activate
make test
from stpmex import Client
client = Client(
empresa='TU_EMPRESA',
priv_key='PKEY_CONTENIDO',
priv_key_passphrase='supersecret',
)
cuenta = client.cuentas.alta(
nombre='Eduardo',
apellidoPaterno='Salvador',
apellidoMaterno='Hernández',
rfcCurp='SAHE800416HDFABC01',
cuenta='646180110400000007',
)
orden = client.ordenes.registra(
monto=1.2,
cuentaOrdenante=cuenta.cuenta,
nombreBeneficiario='Ricardo Sanchez',
cuentaBeneficiario='072691004495711499',
institucionContraparte='40072',
conceptoPago='Prueba',
)
cuenta.baja()