ePag Developer Documentation
website·Indexed 32 days ago
https://developer.epag.comAPI documentation for ePag's payment processing services, including global card payments, regional bank transfers (SPEI in Mexico, PIX in Brazil), payouts, subscriptions, and automated report scheduling.
What's inside ePag
- Boleto is a regulated payment method in Brazil acting as a bank slip or voucher. Customers pay via cash at banks, ATMs, lottery agents, supermarkets, post offices, or through online/mobile banking. For merchants, Boletos eliminate chargeback risk as payments are upfront and irreversible. It is particularly useful for reaching consumers without credit cards or traditional bank accounts.
Overview of Tiendas Y Farmacias cash payments
Tiendas Y Farmacias is a cash payment method in Mexico. Customers select this option at checkout and receive a voucher with a unique reference number or barcode. They then pay in cash at affiliated retail stores (pharmacies, convenience stores, supermarkets). For merchants, these transactions are secure, confirmed upon payment, and carry no risk of chargebacks as they are irreversible cash payments.Overview of SPEI payments in Mexico
SPEI (Sistema de Pagos Electrónicos Interbancarios) is a real-time bank transfer system by the Bank of Mexico. It allows customers to pay for online purchases via their own banking portal or mobile app using a unique CLABE number and a payment reference. Transactions are secure, final, and cannot be reversed, eliminating chargeback risks for merchants.Overview of Ecuador Bank Transfer (Banco Guayaquil)
The Bank Transfer process for Ecuador facilitates payments specifically through Banco Guayaquil. Instead of redirecting the user, the API generates apayment_codeand a set of instructions. The merchant displays these to the customer, who then completes the payment within their own Banco Guayaquil online banking portal. The only personal data required from the customer is their email address.Overview of Paycash payment method
Paycash is an Alternative Payment Method (APM) used primarily for cash transactions in Latin America. It supports two primary payment flows:
- Payment Transfer: The business generates a Paycash reference. The customer uses their mobile banking app, the agreement number, and the reference to complete the payment.
- Cash Payment: The business generates a Paycash reference. The customer visits a physical payment point to pay in cash.
In both scenarios, the business is notified immediately upon payment completion. If a user's email is provided in the
person.emailfield during API request, an automated confirmation email with payment instructions is sent to the customer.Overview of Subscriptions Checkout schemes
The Subscriptions Checkout allows merchants to initiate recurring payment agreements without calling the Subscriptions API directly. It supports two primary schemes:
- PIX_AUTOMATICO: Used in Brazil for recurring PIX enrollment via QR Code authorization.
- CARD: Used across multiple countries for card-based recurring billing using tokenized cards.
Overview of Colombia Bank Transfer (PSE)
The Bank Transfer process facilitates direct payments via PSE (Pagos Seguros en Línea) in Colombia. It is designed to maximize conversion rates by providing a unified solution covering the entire Colombian banking landscape. Merchants can either collect payer identification (Cédula de Ciudadanía, NIT) beforehand or on the checkout page. To ensure transaction success, the payer's identification number must be provided in theidentifierfield with the correspondingidentifier_type(e.g.,CCorNIT) and a validemail.Overview of Automated Report Scheduling Methods
The Automated Report Scheduling methods allow developers to automate the generation and delivery of reports. These methods enable the creation, modification, and retrieval of schedules to ensure reports run at specified times and frequencies (e.g., daily, weekly, or monthly) without manual intervention.Overview of OXXO voucher payments
OXXO is a cash-based voucher payment method used in Mexico. The customer selects OXXO at checkout, receives a payment voucher with a barcode and reference number, and completes the payment in cash at any OXXO convenience store. Payments are secure and irreversible once paid, eliminating chargeback risks for merchants.Understand Network Tokens for Card Payments
Network tokens are secure, digital substitutes for a customer's Primary Account Number (PAN), managed by card networks (Visa, Mastercard, American Express). They act as a proxy for real card data and are unique to a specific combination of card, merchant, and payment processor.
Key advantages include:
- Security: Tokens have no value outside their intended use; if stolen, they cannot be used at other merchants.
- Automatic Updates: If a physical card expires or is replaced, the network token is automatically updated by the card network, preventing involuntary churn for recurring payments.
- Compliance: Using tokens reduces the merchant's PCI DSS compliance burden by removing the need to store sensitive PAN data.
- Authorization: Tokenized payments often see higher approval rates as they are viewed as more secure by issuers.
Reference available fields for transaction_fee table
Thetransaction_feetable contains detailed information about fees applied to transactions, including their classification, calculation strategy, and amounts.Field Alias Description Type fee_subtype Fee Subtype More specific classification of the fee (e.g., service_fee). VARCHAR fee_strategy Fee Strategy Strategy used to calculate the fee. VARCHAR amount Amount Flat fee amount. DECIMAL percent Percent Percentage fee applied. DECIMAL calculated_value Calculated Value Total fee charged. DECIMAL is_merchant_fee Is Merchant Fee Indicates if the fee is paid by the merchant. BOOLEAN payment_id Payment Id Payment linked to the fee. VARCHAR rate_id Rate Id FX rate reference used for the fee. INT payout_transaction_id Payout Transaction Id Payout linked to the fee. INT Understand Credit Card subscription lifecycle and core rules
Credit Card subscriptions use card tokenization for recurring billing. Unlike other schemes, there is no enrollment step; card authorization occurs on the merchant's website before the subscription request is sent to ePag.
Lifecycle:
CREATED→ACTIVE. If a valid card token is associated upon creation, the status transitions immediately toACTIVE.Core Rules:
- Provider Consistency: Payments are processed by any provider supporting the card token.
- No Scheduling Window: Charges are triggered directly on the
dueDate. - Cycle Logic: The engine calculates the
dueDatefor eachBillingCyclebased on thestartDateandperiodicity(e.g.,MONTHLY). - Amount Override: Merchants can override the charge amount on a per-cycle basis.