Back to Articles
Tutorials5 minJanuary 15, 2025

How Devin Builds MoneyGraph Integrations Autonomously

Devin, the autonomous AI engineer, can build complete MoneyGraph payment integrations. Learn how our wiki.json teaches Devin to navigate our SDK.

By MoneyGraph Team

Devin is the leading "autonomous AI engineer"—an agent that can build entire features without constant human guidance. With MoneyGraph SDK v2.2, Devin can autonomously build compliant payment integrations.

How Devin Learns MoneyGraph

Devin uses a .devin/wiki.json file to understand codebases. Our wiki.json teaches Devin:

Domain Mapping

Where to find code for different concerns:

  • Banking Logic: src/resources/fx.ts - quote, confirm, rates
  • Entity Verification: src/resources/customers.ts - create, kyc.submit, kyc.canPayout
  • Payment Processing: src/resources/payouts.ts - create, swift.create, mobileMoney.create

When Devin needs to implement KYC, it knows to look at src/resources/customers.ts.

Patterns

Reusable patterns Devin can apply:

Golden Path:

  1. Initialize: new MoneyGraph({ apiKey })
  2. Create customer: mg.customers.create()
  3. Submit KYC: mg.customers.kyc.submit()
  4. Verify KYC: mg.customers.kyc.canPayout()
  5. Get quote: mg.fx.quote()
  6. Lock rate: mg.fx.confirm()
  7. Send payout: mg.payouts.create()

Smart Payout: mg.executeSmartPayout() - Combines R3 + FX + Payout in one call

Compliance Rules

Rules Devin must follow:

RuleSeverityRequirement
KYC Before PayoutCRITICAL`mg.customers.kyc.canPayout(customerId).allowed === true`
Never use raw fetchCRITICALAlways use SDK methods
Environment variablesCRITICALNever hardcode API keys
Quote → Confirm → PayoutHIGHFollow correct FX flow
Error handlingMEDIUMHandle all MoneyGraph error types

System Notes

High-priority instructions: - ALWAYS check the examples/ and recipes/ folders before writing new code - Use mg.executeSmartPayout() for the simplest payout integration - KYC verification is REQUIRED before any payout operation

What Devin Can Build

With our wiki.json, Devin can autonomously build:

Application TypeWhat Devin Builds
Remittance FlowsComplete customer onboarding through payout
Multi-Rail Payment SystemsLocal, SWIFT, mobile money, crypto integrations
Card Issuance PlatformsVirtual and physical card creation
Payment AcceptanceCard processing with 3DS authentication
Wallet SystemsMulti-currency balance management
Compliance DashboardsKYC status tracking and reporting

Example: Autonomous Build

Task given to Devin: "Build a payroll system that sends salaries to employees in Nigeria, Kenya, and Ghana"

What Devin does:

  1. Reads .devin/wiki.json → Understands MoneyGraph architecture
  2. Checks recipes/ folder → Finds REMITTANCE_FLOW.md
  3. Identifies domains → Banking Logic, Entity Verification, Payment Processing
  4. Follows golden_path → Implements Init → Onboard → Quote → Payout
  5. Applies compliance_rules → Adds KYC checks before every payout
  6. Uses correct namespaces → mg.payouts.create for Nigeria, mg.payouts.mobileMoney.create for Kenya

Result: A complete, compliant payroll system in under an hour.

Setup

Installation: ``bash npm install @moneygraph/sdk ``

How It Works: Devin automatically discovers .devin/wiki.json from your project's node_modules/@moneygraph/sdk folder when exploring the codebase. It uses this to understand MoneyGraph's architecture and patterns.

Quick Start Prompt

Give Devin this task:

Build a payroll system that sends salaries to employees in multiple countries.

Requirements: - npm install @moneygraph/sdk - Support Nigeria (bank transfer), Kenya (M-Pesa), Ghana (mobile money) - Check KYC for each employee before payout - Handle FX conversion from USD to local currency - Use executeSmartPayout() for optimal routing - Add error handling and retry logic - Create API endpoints for: employee registration, KYC upload, payout processing

Use the MoneyGraph SDK recipes folder for best practices. ```

Devin will autonomously build the entire system with compliance and multi-rail support!

Best Practices for Devin + MoneyGraph

Best PracticeWhy It Helps
**Start with smart_payout**Tell Devin to use `executeSmartPayout()` for simple, all-in-one integrations
**Point to recipes**Mention the `recipes/` folder so Devin finds example patterns
**Specify compliance**Remind Devin that KYC is required (it knows, but reinforcement helps)
**Reference domains**Mention specific domains like "Banking Logic" to guide Devin's code organization

The Future of Fintech Development

Autonomous AI engineers like Devin represent the future of software development. By providing structured knowledge in wiki.json, we enable Devin to build production-grade fintech applications without constant human oversight.

Ready to Get Started?

Install MoneyGraph SDK and start building AI-native payment applications today