Integrate with vexpay (Python)
Official Python SDK with sync and async clients, matching the Node resource surface.
Install
pip install vexpayfrom vexpay import VexPay, AsyncVexPay
client = VexPay(api_key=os.environ["VEXPAY_API_KEY"])
# async: AsyncVexPay(api_key=...)C2P payment
intent = client.payments.c2p.request(
usd_amount=12.5,
debtor_id="V12345678",
debtor_cell_phone="584121234567",
debtor_bank_code=102,
external_ref="order_1042",
)
receipt = client.payments.c2p.execute(
intent_id=intent.intent_id,
usd_amount=12.5,
debtor_id="V12345678",
debtor_cell_phone="584121234567",
debtor_bank_code=102,
token=customer_token,
external_ref="order_1042",
)Verify webhooks
from vexpay import Webhook
event = Webhook.construct_event(
request.body,
request.headers["VexPay-Signature"],
os.environ["VEXPAY_WEBHOOK_SECRET"],
)