Skip to main content
TMT Platform integrates with the Banco Mercantil API to support domestic Venezuelan payment methods. The integration covers debit card payments (TDD), credit card payments (TDC), and Pago Móvil C2P transfers.
All Mercantil API calls use encrypted credentials (cifr, merchantId, clientidibm) stored in Firebase Functions config. The integration uses AES-256 encryption via the encryption module for sensitive fields.

Payment methods

MethodFunctionDescription
Debit card (TDD)api_mercantil_tdd_payDirect debit from Venezuelan bank account
Credit card (TDC)api_mercantil_tdc_payCredit card charge
Pago Móvil C2Papi_mercantil_c2p_payPhone-to-phone mobile payment

api_mercantil_auth

Authenticates with the Mercantil API to obtain an access token. Call this before making payment requests if your token has expired.

Endpoint

POST https://{region}-{project}.cloudfunctions.net/api_mercantil_auth

Request

No body parameters required. The function uses the configured clientidibm and cifr credentials.
{
  "data": {}
}

Response

{
  "message": "Procesado",
  "status": 200,
  "data": {
    "access_token": "eyJhbGciOiJSUzI1NiJ9...",
    "token_type": "Bearer",
    "expires_in": 3600
  }
}

api_mercantil_tdd_pay

Processes a debit card (TDD) payment through Banco Mercantil.

Endpoint

POST https://{region}-{project}.cloudfunctions.net/api_mercantil_tdd_pay

Request

data.amount
number
required
Payment amount in VES (bolivares).
data.card_number
string
required
Debit card number. Encrypted before transmission.
data.expiry
string
required
Card expiry date.
data.cvv
string
required
Card verification value. Encrypted before transmission.
data.cedula
string
required
Venezuelan national ID (cédula) of the cardholder.

Response

{
  "message": "Procesado",
  "status": 200,
  "data": {
    "success": true,
    "referencia": "1234567890",
    "mensaje": "Transaccion Aprobada"
  }
}

api_mercantil_tdc_pay

Processes a credit card (TDC) payment through Banco Mercantil.

Endpoint

POST https://{region}-{project}.cloudfunctions.net/api_mercantil_tdc_pay

Request

data.amount
number
required
Payment amount in VES.
data.card_number
string
required
Credit card number. Encrypted before transmission.
data.expiry
string
required
Card expiry date.
data.cvv
string
required
Card verification value. Encrypted before transmission.
data.cedula
string
required
Venezuelan national ID of the cardholder.

Response

{
  "message": "Procesado",
  "status": 200,
  "data": {
    "success": true,
    "referencia": "9876543210",
    "mensaje": "Transaccion Aprobada"
  }
}

api_mercantil_c2p_auth

Authenticates a Pago Móvil C2P transaction — initiates the phone verification step before the payment.

Endpoint

POST https://{region}-{project}.cloudfunctions.net/api_mercantil_c2p_auth

Request

data.telefono
string
required
Payer’s phone number registered with their bank.
data.banco
string
required
Payer’s bank code (e.g., 0105 for Mercantil).
data.cedula
string
required
Venezuelan national ID of the payer.

Response

{
  "message": "Procesado",
  "status": 200,
  "data": {
    "token": "abc123token",
    "referencia": "REF001"
  }
}

api_mercantil_c2p_pay

Completes a Pago Móvil C2P payment after authentication.

Endpoint

POST https://{region}-{project}.cloudfunctions.net/api_mercantil_c2p_pay

Request

data.telefono
string
required
Payer’s phone number.
data.banco
string
required
Payer’s bank code.
data.cedula
string
required
Payer’s national ID.
data.monto
number
required
Payment amount in VES.
data.token
string
required
OTP token received from api_mercantil_c2p_auth.
data.referencia
string
required
Reference from api_mercantil_c2p_auth.

Response

{
  "message": "Procesado",
  "status": 200,
  "data": {
    "success": true,
    "referencia": "TXN9900",
    "mensaje": "Pago exitoso"
  }
}

Searches for a Pago Móvil C2P transaction by reference.

Endpoint

POST https://{region}-{project}.cloudfunctions.net/api_mercantil_c2p_search

Request

data.referencia
string
required
Transaction reference to look up.

Response

{
  "message": "Procesado",
  "status": 200,
  "data": {
    "referencia": "TXN9900",
    "estado": "APROBADO",
    "monto": 150.00
  }
}

api_mercantil

Fetches TED (electronic transfer) batch files from Banco Mercantil for reconciliation. Lists available files, downloads and decrypts them, then loads records into the conc_conciliado_b and conc_conciliado_c PostgreSQL tables.

Endpoint

POST https://{region}-{project}.cloudfunctions.net/api_mercantil
This is an administrative function used for bank reconciliation. It uses encrypted date ranges and AES-256 credentials to authenticate with the Mercantil TED API at https://apimbu.mercantilbanco.com/mercantil-banco/prod/v2/ted/.

Request

{
  "data": {}
}
No body parameters required. The date range is currently hardcoded in the function configuration.

Response

{
  "message": "Procesado",
  "status": 200
}

Build docs developers (and LLMs) love