Early Access — LATAM PHP Business Stack

Stop Building CFDI,
Payments & Billing

From Scratch.

ForgeStack ships every piece of Mexico's compliance stack as tested, typed PHP packages. Symfony and Laravel. CFDI 4.0, four payment gateways, subscription billing with IVA — all in one place.

Join the Waitlist See the full stack ↓
CFDI 4.0 MercadoPago Conekta Pagar.me OpenPay Billing + IVA WhatsApp SAT Tools MX Geo (free)
The real cost of building this yourself

Every LATAM PHP app eventually hits the same three walls.

CFDI

SAT compliance takes weeks to get right.

CFDI 4.0 requires offline XSLT chain-of-origin signing, DER-encoded CSD key decryption, and PAC connectivity. Most first implementations have subtle signing errors that only surface at scale — after your customers are already affected.

Payments

Webhook signatures are easy to get wrong.

MercadoPago, Conekta, and Pagar.me each use completely different signature schemes. One wrong implementation means missed payments, duplicate processing, or accepting forged webhooks in production.

Billing

A double charge is a customer dispute, not a bug report.

Safe billing requires three independent layers — advisory lock, unique constraint, and a deterministic idempotency key — to survive any crash or retry scenario. Getting this wrong is expensive in every sense.

Everything in the stack

Six packages. One stack. Install only what you need.

Each module ships with Symfony and Laravel bridges and can be purchased independently or as a bundle.

CFDI Mexico · Revenue Module

CFDI 4.0, done the right way. From the first stamp.

Generating a valid CFDI requires more than building an XML string. SAT's chain-of-origin algorithm, encrypted CSD private keys, and live PAC connectivity all have to be exactly right — or the stamp is rejected. We've already solved every one of these problems and written the tests.

  • Offline XSDs and XSLT bundled. No runtime dependency on SAT's servers. Stamps work even when sat.gob.mx is unreachable.
  • DER-encoded CSD decryption built in. SAT .key files are PKCS#8 DER. We handle the conversion — you just pass the file and password.
  • Facturapi and Finkok PAC drivers. REST and SOAP, free sandboxes for both. Customers bring their own PAC credentials.
  • Carta Porte 3.1 and Pagos 2.0. Plus cancellation, PDF and XML generation, 5-year retention per SAT Article 30 CFF.
Get Early Access to CFDI Mexico
GenerateInvoiceAction.php
$cfdi = CfdiBuilder::invoice() ->emisor('RFC123456ABC', 'Empresa SA de CV', '601') ->receptor('XAXX010101000', 'Cliente', '616', 'G03') ->addConcepto( description: 'Consultoría de software', quantity: 1, unitPrice: Money::mxn(5_000_00), claveProd: '81161500', ) ->withIva16() ->stamp($pac); // Facturapi or Finkok // Stamped. SAT-verified. PDF + XML ready. echo $cfdi->uuid; // A1B2C3D4-E5F6-... echo $cfdi->xmlPath; // /cfdi/2026/06/RFC.../uuid.xml
CheckoutController.php
// OXXO — customer pays cash at any store $result = $gateway->charge( PaymentRequest::oxxo(Money::mxn(1_299_00), $customer) ); // $result->voucherUrl — send to customer // Webhook fires when they pay at OXXO // Card on file — same interface, any gateway $result = $gateway->chargeStoredMethod( $customer->storedCard, Money::mxn(2_499_00) ); // Works with MercadoPago, Conekta, Pagar.me // and OpenPay — switch without rewriting.
LATAM Pay · Revenue Module

Four gateways. One interface. Webhooks verified before your code ever runs.

OXXO references, SPEI CLABEs, Pix QR codes, Boleto, and card charging — all behind a single PHP interface. Switch gateways or support multiple at once without rewriting business logic.

  • MercadoPago, Conekta, Pagar.me, OpenPay. Complete drivers — OXXO, SPEI, Pix, Boleto, and card payments across all four.
  • Each signature scheme handled correctly. Conekta uses RSA (not HMAC). Pagar.me uses IP allowlist. MercadoPago uses a signed template. Every driver implements its own scheme — verified against live documentation.
  • PCI scope stays in the gateway. Only opaque gateway tokens ever leave the package. No raw card numbers anywhere in your system.
  • Idempotency built into every driver. Retries and webhook replays are handled at the driver level — your charge logic sees each event exactly once.
Get Early Access to LATAM Pay
Billing Engine · Revenue Module

Subscriptions that run themselves — with IVA, CFDI, and dunning built in.

Most billing libraries ignore the LATAM reality: every invoice needs IVA calculated correctly, a CFDI stamped before the charge, and an OXXO voucher delivered if the customer pays cash. This package handles all of it — correctly.

  • CFDI stamped before every charge. If the stamp fails, the charge is aborted. You never take money for an invoice SAT hasn't seen.
  • IVA 16/8/0/exento + retenciones ISR/IVA. BCMath at scale=6 throughout the billing path. No float arithmetic, no rounding surprises.
  • Three-layer idempotency. Advisory lock + unique constraint + deterministic charge key. Double-charges are impossible under any crash or retry scenario.
  • OXXO/SPEI/Pix voucher path is first-class. Async payments work out of the box — billing reconciles the moment the gateway webhook fires.
Get Early Access to Billing Engine
SubscriptionService.php
// One call. Everything else is automatic. $sub = $billing->subscribe( $customer, Plan::monthly('professional', Money::mxn(2_499_00)) ); // Every renewal cycle, automatically: // ① Compute IVA + retenciones (BCMath scale=6) // ② Stamp CFDI 4.0 via your PAC // → abort the charge if stamp fails // ③ Charge via your gateway // → OXXO: send voucher ref via WhatsApp // → Card: MIT charge + idempotency key // ④ Retry with dunning on failed payments // ⑤ Emit PSR-14 events → your listeners echo $sub->status; // active | awaiting_payment | past_due
More in the stack

Three more modules that complete the picture.

WhatsApp Business

Send OXXO vouchers, payment reminders, trial warnings, and stamped CFDI PDFs directly via WhatsApp. Works with Meta Cloud API and Twilio. Wires automatically to billing and payment events.

OXXO voucher delivery Dunning notices CFDI receipt ES + EN templates
Join waitlist for early access →

SAT Tools

RFC validation with SAT's Modulo-11 check digit algorithm, catalog lookups across all 6 SAT catalogs (52K+ c_ClaveProdServ entries), and CSD certificate metadata parsing. Zero runtime API calls.

RFC validation 52K+ catalog entries CSD cert parser $29 standalone
Join waitlist for early access →

MX Geo FREE

Mexico postal code → colonia, municipio, and estado. All 32 estados, 68K+ postal codes. Compiled from SEPOMEX's public data into an embedded SQLite database. No API calls, no rate limits, no account required.

68K+ postal codes 32 estados Offline SQLite Free forever
Get it free — join the waitlist →
Why our code quality is different

Written by the most advanced Claude models. Engineered by a 25-year PHP-Symfony veteran.

Every task in this stack was executed using Claude Opus — Anthropic's most capable model — running Claude Code's subagent-driven development: structured plans with test-first discipline, PHPStan level 8, and PSR-12 on every file. The AI handles the implementation volume; the architecture, security decisions, and integration contracts are designed and supervised by Ruben E. — a PHP-Symfony engineer with 25+ years building production systems.

That combination is hard to replicate: AI speed and consistency at scale, grounded by senior engineering judgment that catches what models miss — subtle invariants, edge-case security concerns, and architectural decisions that hold up past the first deploy.

Join the Waitlist
L8 PHPStan level 8 enforced on every package and every commit
OWASP Top 10 enforced — injection, XSS, replay attacks, and more — every package, every commit
3.5× Development velocity versus a traditional single-developer team
6+ Independent packages — buy one or the full bundle
Security

OWASP Top 10 — every package.
Built to resist threats from humans and AI alike.

Security is a first-class constraint across every ForgeStack module — not a post-launch patch. Each of the OWASP Top 10 attack vectors is blocked at the architectural level: in the ORM, the type system, the webhook verification pipeline, and the secrets vault. Senior-engineered, AI-assisted, and audited before every release. In a world where AI-generated attack tooling ships as fast as AI-generated code, verified security posture is the difference between production-grade and demo-grade.

Injection-Proof Data Layer (A03)

Doctrine ORM parameterized queries throughout — no raw SQL, no string interpolation in any query path. PHPStan level 8 flags injection-prone patterns at static analysis time, before they reach a test suite or a production server.

Webhook Payload Integrity (A08)

Signatures are verified before the body is ever parsed — always, no exceptions. MercadoPago HMAC-SHA256, Conekta RSA public key, Pagar.me IP allowlist. Constant-time comparison on every gateway. Tampered or replayed payloads are rejected at the perimeter.

PCI Guards — Zero Secrets in Logs (A02)

PciGuard::scrub() runs on every log write path — card numbers and API keys never appear in logs or traces. HTTPS-only is enforced at driver construction time, not by convention. Non-compliance throws at boot, not in production at 2 AM.

Replay Attack Prevention (A01, A07)

Three-layer idempotency on all charge paths — advisory lock, unique constraint, deterministic key — makes replay attacks on payment endpoints structurally impossible. Unsigned webhook payloads never reach business logic.

Non-Extractable Key Vault (A02)

CFDI private keys sign inside the KMS — they never leave the vault as raw bytes. Stored credentials use envelope encryption. A compromised app container gains zero access to signing material or payment secrets.

Type Safety as Defense-in-Depth (A04)

PHP 8.2 strict types, readonly DTOs, and PHPStan level 8 eliminate entire categories of type-confusion exploits before runtime. Final classes block unexpected inheritance. The type system is the first line of defense, not just documentation.

OWASP Top 10 (2021) — attack vectors A01 through A10 addressed at the architectural level across all six packages. No "security sprint later." No checklist theater. Security is the foundation, not a feature.
Early Access

Ready to stop building this yourself?

Join the waitlist and get early access pricing when we launch. We'll notify you as each module ships — no spam, unsubscribe anytime.

No credit card required. Waitlist members receive early access pricing.