Skip to main content
These functions interface with the BDV conciliation API (bdvconciliacion.banvenez.com) using a configured X-API-KEY. They are used to import bank movements and verify mobile payment references. All request bodies use the data envelope.

conciliation_bdv

POST https://{region}-{project}.cloudfunctions.net/conciliation_bdv
Fetches today’s account movements from Banco de Venezuela for the configured custody account and inserts any new movements into the PostgreSQL conciliation tables (conc_conciliado_b and conc_conciliado_c). This function takes no request body parameters — the account number (cuentabdv) and date range (today–today) are determined from server-side configuration and the current timestamp.

What it does

  1. Calls POST https://bdvconciliacion.banvenez.com/apis/bdv/consulta/movimientos with the configured account number, today’s date as both fechaIni and fechaFin, currency "VES", and an empty nroMovimiento.
  2. For each movement in response.data.data.movs:
    • Determines tipo_op: "C" (CREDITO) or "D" (DEBITO).
    • Checks conc_conciliado_b to skip duplicate entries (keyed on no_cta + no_docu).
    • Inserts new rows into conc_conciliado_b (all movements) with fields: no_cia, no_cta, procedencia, tipo_doc, no_docu, fecha, monto, no_fisico, serie_fisico.
    • For DEBITO movements only, also inserts a row into conc_conciliado_c (debit-specific conciliation table).

Response

message
string
"Conciliacion Banco de Venezuela "
status
number
200 on success, 400 on API error.
data
object
Raw response from the BDV conciliation API, including the data.movs array.

Response body from BDV API (data.data.movs items)

FieldDescription
referenciaMovement reference number
fechaMovement date
importeMovement amount (string with decimal comma, e.g. "1.825,00")
movDirection: "CREDITO" or "DEBITO"

Example

curl -X POST \
  https://{region}-{project}.cloudfunctions.net/conciliation_bdv \
  -H 'Content-Type: application/json' \
  -d '{}'

Errors

ConditionstatusDescription
BDV API unreachable or returns error400"status": "error {message}" inside data

mobile_payment_bcv

POST https://{region}-{project}.cloudfunctions.net/mobile_payment_bcv
Verifies a Pago Móvil transaction against the BDV/BCV conciliation service. Use this to confirm that a payer’s mobile payment reference is valid before completing an order. Forwards to: POST https://bdvconciliacion.banvenez.com/getMovement

Request body

data.ced_pag
string
required
National ID (cédula) of the payer (cedulaPagador).
data.tel_pag
string
required
Phone number of the payer (telefonoPagador).
data.tel_dest
string
required
Destination (merchant) phone number (telefonoDestino).
data.referencia
string
required
Payment reference number provided by the payer’s bank (referencia).
data.fec_pag
string
required
Payment date (fechaPago). Format accepted by the BDV API.
data.importe
number
required
Payment amount in VES (importe).
data.cod_ban_origen
string
required
Origin bank code (bancoOrigen), e.g. "0102" for BDV, "0105" for Mercantil.

Response

message
string
"Conciliacion Pago movil BDV "
status
number
200 on success, 400 on BDV API error.
data.resultado
object
Raw result object from the BDV getMovement endpoint, containing the movement details and validation status.

Example

curl -X POST \
  https://{region}-{project}.cloudfunctions.net/mobile_payment_bcv \
  -H 'Content-Type: application/json' \
  -d '{
    "data": {
      "ced_pag": "12345678",
      "tel_pag": "04169876543",
      "tel_dest": "04241234567",
      "referencia": "00123456",
      "fec_pag": "2026-03-19",
      "importe": 1825.00,
      "cod_ban_origen": "0102"
    }
  }'

Errors

ConditionstatusDescription
BDV API error400Error object returned in data.error

Build docs developers (and LLMs) love