Skip to main content

PayMongo API: Connecting Your Website for Advanced Payments

Understand the ways you can integrate with PayMongo APIs

Updated today

For businesses seeking to fully customize their payment experience, integrate payments directly into their existing systems, or build advanced payment workflows, PayMongo offers powerful API solutions. This article will introduce you to PayMongo's two primary API integration options: the Checkout API for quick, hosted solutions, and the Custom API (Payment Intent Payment Method Workflow - PIPM) for complete control over your checkout flow. Understanding these options will help you make an informed decision and prepare for a successful technical integration.


Prerequisites for PayMongo API Integration

Before embarking on an API integration, ensure your business has the following in place:

  • Activated PayMongo Merchant Account: Your PayMongo account must be fully activated to process live payments via API. You will need your API Keys (Secret and Public) from your dashboard.

  • Dedicated Developer Resource: API integration requires technical expertise. You will need:

    • An in-house developer or development team.

    • A hired freelance developer or an agency.

    • Your chosen developer should be familiar with RESTful APIs, programming languages, and secure coding practices.

  • Clear Business Requirements: Define your desired payment flow, customer experience, and any specific features you need (e.g., custom branding, subscription billing, pre-authorizations).

  • Development Environment: Your developer will need a suitable environment for coding, testing, and deploying the integration.


Understanding Your PayMongo API Integration Options

Option 1: PayMongo Checkout API (Easiest & Fastest Integration)

The Checkout API is PayMongo's recommended solution for businesses looking for the quickest way to integrate online payments with minimal development effort.

  • How it Works: You create a "Checkout Session" from your backend, then simply redirect your customers to a secure, PayMongo-hosted payment page. PayMongo handles the entire checkout process, from displaying payment methods to collecting customer information and processing the payment securely.

  • Key Benefits for Business Owners:

    • Speed: Go live with online payments significantly faster.

    • Simplicity: Minimal coding required as PayMongo manages the checkout UI and underlying payment logic.

    • Security: Automatically benefits from PayMongo's PCI DSS compliance, fraud prevention, and secure hosting.

    • Mobile-Ready: The hosted checkout page is optimized for all devices.

  • Ideal for: Businesses that want a reliable, secure, and branded payment page without investing heavily in custom UI development.

Option 2: PayMongo Custom API (Payment Intent Payment Method Workflow - PIPM Workflow) (Maximum Customization)

The Custom API (often referred to as the Payment Intent Payment Method or PIPM Workflow) offers unparalleled flexibility, allowing you to build a completely bespoke payment experience directly within your website or application.

  • How it Works: Your developer will use PayMongo's API endpoints to build your entire payment flow from the ground up. This involves creating payment intents, attaching payment methods, handling authentication (like 3D Secure), and processing transactions, all while maintaining control over the user interface and data flow on your end.

  • Key Benefits for Business Owners:

    • Full Control: Design every aspect of your checkout page and payment flow to match your brand's look and feel precisely.

    • Seamless User Experience: Keep customers on your website or app throughout the entire payment process, reducing friction.

    • Advanced Features: Implement complex payment logic like pre-authorizations (hold-then-capture), subscriptions, or multi-party payments (if supported by your account).

    • Deeper Integration: Integrate payment data directly with your internal systems (CRM, ERP, inventory management).

  • Ideal for: Businesses with unique branding requirements, complex payment workflows, or large-scale operations that need deep integration with their existing software.


Choosing the Right API for Your Business

Consider the following when deciding between the Checkout API and Custom API:

Feature/Consideration

PayMongo Checkout API

PayMongo Custom API (PIPM)

Ease of Integration

Easiest & Fastest

More Complex, Requires Deeper Dev Work

Customization

Limited (branding, some fields)

Full Control Over UI & Workflow

Developer Effort

Minimal

Significant

Security Handling

Fully handled by PayMongo

Shared responsibility with your dev team

User Experience

Redirects to PayMongo-hosted page

Stays on your website/app

Best For

Quick setup, standard needs

Unique branding, complex logic, deep integration


Next Steps for API Integration

As a business owner, your primary next step is to prepare your developer and share the resources:

  1. Grant Dashboard Access (for your developer): If needed, create a team member account for your developer in your PayMongo Dashboard.

  2. Provide API Keys: Your developer will need your Test and Live API Keys (found in your PayMongo Dashboard under Developers > API Keys) to connect to PayMongo.

  3. Share PayMongo Developer Documentation: Direct your developer to the relevant sections:

  4. Communicate Your Requirements: Clearly articulate your business goals and the desired payment experience to your developer.

  5. Monitor Progress: Stay in communication with your developer throughout the integration process.


Troubleshooting Common API Integration Challenges (for Business Owners)

While most troubleshooting will be handled by your developer, here's what you can do if you encounter issues:

  • Payment Failures/Errors:

    • Check with your developer: They can review API logs and error messages.

    • Review PayMongo Dashboard: Look for transaction details and statuses.

    • Consult Developer Documentation: PayMongo's developer site has sections on common API errors.

  • Features Not Working as Expected:

    • Confirm API Usage: Ensure your developer is using the correct API (Checkout vs. Custom) for the desired feature.

    • Verify API Keys: Make sure the correct Live API Keys are being used for live transactions.

  • Unclear Status Updates (via Webhooks):

    • Confirm Webhook Setup: Ask your developer to verify that webhooks are correctly configured and listening for the right events.


Tip: Start with Test Mode API keys! Always thoroughly test your integration in the sandbox environment before going live with real transactions.

Warning: Never expose your Secret API Key on your website's front-end or client-side code. This key should only be used on your secure backend server.

Did this answer your question?