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
| Method | Function | Description |
|---|---|---|
| Debit card (TDD) | api_mercantil_tdd_pay | Direct debit from Venezuelan bank account |
| Credit card (TDC) | api_mercantil_tdc_pay | Credit card charge |
| Pago Móvil C2P | api_mercantil_c2p_pay | Phone-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
Request
No body parameters required. The function uses the configuredclientidibm and cifr credentials.
Response
api_mercantil_tdd_pay
Processes a debit card (TDD) payment through Banco Mercantil.
Endpoint
Request
Payment amount in VES (bolivares).
Debit card number. Encrypted before transmission.
Card expiry date.
Card verification value. Encrypted before transmission.
Venezuelan national ID (cédula) of the cardholder.
Response
api_mercantil_tdc_pay
Processes a credit card (TDC) payment through Banco Mercantil.
Endpoint
Request
Payment amount in VES.
Credit card number. Encrypted before transmission.
Card expiry date.
Card verification value. Encrypted before transmission.
Venezuelan national ID of the cardholder.
Response
api_mercantil_c2p_auth
Authenticates a Pago Móvil C2P transaction — initiates the phone verification step before the payment.
Endpoint
Request
Payer’s phone number registered with their bank.
Payer’s bank code (e.g.,
0105 for Mercantil).Venezuelan national ID of the payer.
Response
api_mercantil_c2p_pay
Completes a Pago Móvil C2P payment after authentication.
Endpoint
Request
Payer’s phone number.
Payer’s bank code.
Payer’s national ID.
Payment amount in VES.
OTP token received from
api_mercantil_c2p_auth.Reference from
api_mercantil_c2p_auth.Response
api_mercantil_c2p_search
Searches for a Pago Móvil C2P transaction by reference.
Endpoint
Request
Transaction reference to look up.
Response
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
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/.