- Mobile payment verification — confirm that a Pago Móvil payment was received in the TMT BDV account
- Bank reconciliation — pull today’s account movements and load them into the reconciliation tables
Both functions use the
apibdv API key configured in Firebase Functions and the cuentabdv account number. These are loaded from config/config.js.conciliation_bdv
Fetches today’s movements from the BDV account and loads them into the PostgreSQL reconciliation tables (conc_conciliado_b and conc_conciliado_c).
The function calls https://bdvconciliacion.banvenez.com/apis/bdv/consulta/movimientos with today’s date range and tipoMoneda: "VES", then processes each movement:
- CREDITO movements → mapped as type
NC(credit) - DEBITO movements → mapped as type
ND(debit), also inserted intoconc_conciliado_c - Duplicate prevention: checks
conc_conciliado_bfor existingno_docubefore inserting
Endpoint
Request
Response
Success:Data inserted
For each movement, a row is inserted intoconc_conciliado_b:
| Column | Value | Description |
|---|---|---|
no_cia | '1' | Company ID |
no_cta | BDV account number | From cuentabdv config |
procedencia | 'A' | Source: automatic |
tipo_doc | 'NC' or 'ND' | Credit or debit |
no_docu | referencia | BDV reference number |
fecha | ISO timestamp | Movement date |
monto | importe | Amount in VES |
no_fisico | referencia | Physical reference |
serie_fisico | referencia | Series reference |
mobile_payment_bcv
Verifies a Pago Móvil payment by querying the BDV API with the payer’s details.
Endpoint
Request
Venezuelan national ID (cédula) of the payer.
Phone number of the payer.
Destination phone number (TMT’s BDV-registered phone).
Payment reference number provided by the payer.
Payment date in the format expected by the BDV API.
Payment amount as a string (e.g.,
"150.00").Origin bank code (e.g.,
"0105" for Mercantil, "0102" for Banco de Venezuela).