Payment Gateway Integration: Hosted vs. Plugin vs. API
MannyPay Products & Solutions

Payment Gateway Integration: Hosted Page, Plugin or API?

Compare payment gateway integration options by effort, checkout control and PCI questionnaire, then test and launch with our go-live checklist.

Developer with red hair reviews code in an editor on a desktop monitor beside an open laptop in an office

Photo: Pixabay

On this page 7 sections
  1. Comparing Payment Gateway Integration Options
  2. Hosted Payment Pages and Payment Links Go Live Fastest
  3. Cart Plugins: Check Who Built It and How It Collects Cards
  4. API Builds With Hosted Fields Give Control at a Developer's Price
  5. Your Integration Method Sets Your PCI Questionnaire
  6. Test the Failure Paths in Sandbox, Not Just the Approval
  7. Go-Live Checklist for a New Gateway Integration

Key takeaways

  • Pick the simplest payment gateway integration that fits how you already sell. Build on the API only for checkout features you can name.
  • Your PCI questionnaire depends on where card data is typed and sent, not on what the integration is called. A redirect usually means SAQ A, direct post means SAQ A-EP and server-side collection means SAQ D.
  • Since March 31, 2025, iframe merchants qualify for SAQ A only if their page is protected from script attacks. Ask your gateway for written confirmation under PCI SSC FAQ 1588.
  • Open gateway accounts and API keys in the merchant's legal name, even when an agency builds the site.

For most small businesses, the right payment gateway integration is the simplest one that matches how they already sell. If your store runs on a cart platform such as Shopify or WooCommerce, start with the cart's plugin. If you send invoices or sell only a few items, a hosted payment page or payment link can usually get you live the same day. Build on the gateway's API only when you need checkout behavior the other two can't deliver. Every step toward more control adds development cost, and depending on how card data is collected, it can also put you on a longer PCI questionnaire.

A gateway takes card details from your checkout, sends them for authorization and reports back whether the bank approved the sale. Our explainer on how a payment gateway gets online payments approved follows that path from start to finish. The part you or your developer build is the connection between your website and the gateway. The three options differ in how that connection works.

Comparing Payment Gateway Integration Options

The effort row is a rough guide for a simple site. Your platform, your developer and how much you customize will change it. The last row matters more than most owners expect, and the PCI section below explains why.

Hosted page or payment linkCart pluginAPI with hosted fields
Who usually does the workOwnerOwner or web designerDeveloper
Rough effortHoursA day or twoWeeks of developer time
Control over checkout look and flowLowMedium, within your themeHigh
Card data on your serverNoDepends on how the plugin collects itNo, when the gateway's fields capture the card
Who maintains itGatewayPlugin author, but you apply updatesYour developer
Typical PCI questionnaireSAQ ASAQ A, A-EP or D, depending on the pluginSAQ A or A-EP, depending on how the fields load

A hosted payment page is a checkout form on the gateway's servers. Your site sends the customer there with the amount and order details. The customer enters card details on the gateway's page and then returns to a confirmation page on your site. A payment link works the same way, and you don't need a website at all: you create a link for an amount and send it by email or text.

This setup suits businesses with a simple checkout, such as a consulting firm collecting retainers or a contractor taking deposits. If that sounds like you, read how to accept credit cards on your website without an online store. It also helps to see how payment setups for professional services firms often pair hosted pages with a virtual terminal for payments taken over the phone.

The tradeoff is control. Branding usually stops at a logo and a color scheme, and shoppers leave your domain to pay. Your site also learns about the payment only if the return URL and the gateway's notifications are set up correctly. If you sell subscriptions, check whether the hosted form can create a stored customer profile or a recurring schedule. Some gateways' hosted forms can, and others handle only one-time charges.

Cart Plugins: Check Who Built It and How It Collects Cards

A payment gateway plugin, sometimes called a prebuilt connector, is code that links your cart to the gateway. You install it and paste in your gateway credentials. Two settings matter most. The first is capture timing: you can charge at checkout, or authorize now and capture when you ship. The second is how the plugin handles orders where the address or security code doesn't match. Our guide to handling AVS and CVV mismatches can help you set that rule. MannyPay connects merchants through carts including WooCommerce and Shopify, and our payment gateway options page lists the full set.

Plugins vary more than their listings suggest. Start by finding out who built yours. Some come from the gateway itself and others from outside developers, so check when it was last updated and whether it supports your current cart version. Then find out how it collects card data. Some plugins redirect the shopper to a hosted page. Others show the gateway's own fields in an iframe on your checkout. A few send card numbers from the shopper's browser to your server, which then forwards them to the gateway. That design choice sets your PCI questionnaire, so learn it before you install.

If you bill on a schedule, confirm that the plugin works with your subscription extension and stores a gateway token rather than the card number. Our guide to choosing recurring billing software covers that decision in more depth.

Agencies should follow one rule above the rest. Open the gateway account, merchant account and API keys in the client's name, and have the client grant you access. If an agency uses its own credentials "to get things moving," the deposits and the dispute history end up under the wrong business, and that is hard to fix later. Firms that build client sites can see how we work with web design and development agencies.

API Builds With Hosted Fields Give Control at a Developer's Price

With a payment gateway API, your developer writes code that calls the gateway directly to charge cards, issue refunds and store customer profiles for subscriptions. Most modern gateways pair the API with a JavaScript library or hosted fields that place the gateway's card inputs inside your page. The card number goes from the shopper's browser to the gateway, and your server gets back a token. You control the layout and flow, and raw card data stays off your servers. Our comparison of hosted payment page vs. embedded checkout covers the tradeoffs in detail.

An API build pays off when your checkout needs something a plugin can't do, such as usage-based billing or plan upgrades inside your app. SaaS and software companies are the most common case.

It also gives your developer work that a plugin would otherwise handle. API keys belong in server-side secrets, never in browser code or a code repository. Webhooks need handling so orders update when a payment fails or is refunded. Retried requests need idempotency keys or duplicate checks so a network glitch doesn't charge a customer twice. Logs must never capture card numbers. Someone also has to track the gateway's API version changes before an old version is retired.

A Worked Example: Does a Custom Checkout Pay for Itself?

Every number here is illustrative, not a quote or a benchmark. Assume a custom API checkout costs $6,000 more in developer time than a plugin, and you sell a $50-a-month subscription. Recovering $6,000 takes 120 extra paid subscriber-months ($6,000 ÷ $50). If a new subscriber stays 12 months, you need 10 customers who would not have signed up through the plugin checkout (120 ÷ 12). The math leaves out processing fees, ongoing maintenance and any added PCI work, so the real break-even is higher.

If you can't name the specific feature that will win those 10 customers, start with the plugin. You can rebuild later, once you know what your checkout is missing.

Your Integration Method Sets Your PCI Questionnaire

PCI DSS is the card industry's data security standard. The PCI Security Standards Council publishes it, and your acquiring bank enforces it through your merchant agreement. That makes it a contract obligation, not a federal law. Merchants that accept cards validate compliance on the schedule their acquirer sets, usually each year with a self-assessment questionnaire (SAQ). Which SAQ you complete depends on how card data moves through your systems.

Many owners believe a hosted page means "no PCI" and an API means "full PCI." Neither is right. Your scope depends on three things: where the card number is typed, which servers it touches and who controls the code on the page around it.

  • Redirect to a hosted page. The card number is typed on the gateway's domain. According to the PCI Council, SAQ A covers merchants that have fully outsourced account data functions to compliant third parties and don't store, process or transmit card data electronically on their own systems. You still validate, and you still have to secure the site that sends shoppers to the gateway.
  • Iframe from the gateway. If the payment form inside your page comes from a PCI DSS-compliant provider and you meet the other criteria, an iframe setup can qualify for SAQ A. Hosted fields fall into this group when each field is an iframe served by the gateway.
  • Direct post or gateway JavaScript on your page. Your page sends card data straight from the browser to the gateway, or your page's JavaScript builds the form. The card number never reaches your server, but you control the page that collects it. Direct post puts you on SAQ A-EP, which has many more requirements.
  • Server-side collection. Card numbers pass through your server on the way to the gateway. Capturing cards directly through the API requires SAQ D, the longest questionnaire, with far more security work to maintain.

A plugin can use any of these patterns. Ask the gateway, in writing, which SAQ its method supports. Our guide to PCI, tokenization and fraud tools in secure gateways explains the security side.

The 2025 SAQ a Change Most Owners Missed

PCI DSS v4.0.1 added two requirements for payment-page scripts. Requirement 6.4.3 says every script on the payment page must be authorized, integrity-checked and inventoried. Requirement 11.6.1 requires a mechanism that detects tampering and alerts you to unauthorized changes. Both became mandatory on March 31, 2025. In January 2025, the Council revised SAQ A to remove those two requirements, and the revised version took effect on March 31, 2025.

The relief has a condition. Merchants who embed a gateway's form must now confirm that their site is not susceptible to script attacks. PCI SSC FAQ 1588, released February 28, 2025, gives two ways to make that confirmation. You can deploy controls like 6.4.3 and 11.6.1 yourself, or you can get written confirmation from your gateway that its embedded form protects your page from script attacks when it is installed according to the gateway's instructions. If you use an iframe checkout, ask your gateway for that confirmation and keep it on file. SAQ A also still includes external vulnerability scans by an Approved Scanning Vendor, whether you redirect or embed.

This is general information, not compliance advice. Confirm your SAQ with your processor or a Qualified Security Assessor.

Test the Failure Paths in Sandbox, Not Just the Approval

A sandbox is the gateway's test environment. It has its own credentials and test card numbers, which are listed in the gateway's documentation, and no money moves. That makes it the place to break things on purpose.

Begin with transaction outcomes. Run an approval, then use the gateway's test values to trigger a decline and an address mismatch, and confirm your fraud filters respond the way you set them. Next, test money going back out: partially refund one order, fully refund another, and void a third before it settles. Double-click the pay button to make sure it can't create two charges. After each test, check that webhooks updated the order status in your cart or app.

Subscription businesses need a longer test script. Run a first charge and a renewal, then force a renewal to fail and watch what the retry logic does. Have a test customer update their card mid-cycle. If you turn on 3-D Secure authentication, go through the challenge screen on a phone and a laptop, and read the receipt emails on both.

Go-Live Checklist for a New Gateway Integration

  1. Confirm the merchant account and gateway account are approved in the business's legal name.
  2. Swap sandbox credentials for live ones and store the live keys in server-side secrets.
  3. Turn test mode off everywhere, including in the plugin settings.
  4. Point webhooks and return URLs at your production domain.
  5. Run one small live transaction on a real card and confirm it settles to your bank account.
  6. Check how the charge appears on the card statement. An unclear merchant descriptor invites "I don't recognize this" disputes.
  7. Refund the test charge and confirm the refund posts.
  8. For recurring billing, confirm that saved cards are stored as tokens, and look into Account Updater for saved cards.
  9. Complete the SAQ your acquirer assigns. If you embed an iframe, file the gateway's script-protection confirmation with it. Then put next year's renewal on the calendar.
  10. Name the person responsible for plugin updates and key rotation, and decide who gets alerted when payments fail.

Before you choose, write down your cart platform, the SAQ each option would put you on, and who will maintain the site a year from now. Then add the setup, monthly and per-transaction costs of a gateway to the build cost, because the cheapest integration to build isn't always the cheapest to run. To see which MannyPay-supported gateway and integration fit your site, request a free quote. A MannyPay specialist responds within one business day.

Sources

  1. PCI Security Standards Council: Important Updates Announced for Merchants Validating to Self-Assessment Questionnaire A
  2. SecureTrust: PCI DSS v4.0.1 Requirements: Key Updates and What They Mean for Small Businesses
  3. Jscrambler: FAQ 1588 on SAQ A: Clarifications and Common Questions
  4. Schellman: SAQ A vs SAQ A-EP: What Is the Difference and What Options Do You Have?
  5. GRSee: SAQ A vs SAQ A-EP: Which One Applies?
  6. Payment Security Pros: SAQ A vs SAQ A-EP: How Payment Integration Sets PCI Scope
  7. Scandiweb: PCI DSS SAQ Guide: SAQ Types, AOC, and Who Is Responsible

About the author

Daniel Foster

Daniel Foster is Product & Payments Technology Editor for Beyond the Swipe, covering POS systems, payment gateways, virtual terminals, mobile payments and integrations.

This article is for general educational purposes and is not legal, tax or financial advice. Card network rules and state laws change; confirm current requirements for your business.

Related reading